Top "Getlasterror" questions

The `GetLastError` function is part of Microsoft Windows and is part of an error-reporting mechanism used by many libraries.

CreateFile() returns INVALID_HANDLE_VALUE but GetLastError() is ERROR_SUCCESS

I am opening a serial port using CreateFile(). I've got a testcase (too complicated to redistribute) that consistently causes CreateFile() …

winapi serial-port createfile iocp getlasterror
CreateFile() Serial Communication Issue

I am trying to do some serial communication through my usb port (named COM15), and I am getting an error. …

c++ serial-communication createfile getlasterror
WinAPI: OpenProcess() returns error 5 with SeDebugPrivilege enabled for host process

I've got a routine where I process-walk to obtain the HANDLE of each process as I 'walk' down the list (…

c++ winapi handle getlasterror openprocess
OpenProcess error 87 invalid parameter

I'm trying to write a program which executes make.exe from MinGW distribution in the current directory and makes use …

winapi makefile getlasterror openprocess
GetLastError(), errno, FormatMessageA() and strerror_s()?

I'm confused as to the exact relationship between GetLastError() and errno. Are they the same numerical values, or something completely …

c windows errno getlasterror
Program exit status conventions

What is conventional return values for applications in Windows and GNU/Linux respectivly. 0 means success. But what should be used …

linux windows exit-code errno getlasterror
Installing a device driver programmatically

i need to install a device driver (INF file) through c#. I used the function UpdateDriverForPlugAndPlayDevices. However, it returns me …

c# installation device-driver inf getlasterror