From the documentation :
DWORD
32-bit unsigned integer. The range is from 0 to 4294967295 decimal. This type is declared in IntSafe.h as follows:
typedef unsigned long DWORD;
So LPDWORD is unsigned long int* . But you are trying to pass unsigned int* . I know that types point to variables of the same size, but pointer types are incompatible.
The solution is to declare a variable of type DWORD and pass the address of that variable. Something like that:
DWORD dwExitCode; if (!GetExitCodeProcess(hProcess, &dwExitCode)) {
source share