Re: Windows System error Codes 0 - 16000 userlib
Posted: Thu Nov 24, 2011 3:42 pm
Many work, but what is the difference to:
This comes in my locale language.
greetings - Thomas
Code: Select all
Procedure.s GetLastErrorStr(error.l = 0)
If Not error
error = GetLastError_()
EndIf
Protected Buffer.i, result.s
If FormatMessage_(#FORMAT_MESSAGE_ALLOCATE_BUFFER|#FORMAT_MESSAGE_FROM_SYSTEM,0,error,0,@Buffer,0,0)
result = PeekS(Buffer)
LocalFree_(Buffer)
ProcedureReturn result
EndIf
EndProcedure

greetings - Thomas