Reputation: 141
Please, explain me what means 1780 RPC_X_NULL_REF_POINTER - "A null reference pointer was passed to the stub." There is some code/ where I am calling GetPrinterDriverDirectory():
char DriverDir[MAX_PATH];
LPDWORD needed = 0;
Result = GetPrinterDriverDirectory(NULL, TEXT("Windows x86"), 1, (LPBYTE)&DriverDir, MAX_PATH, needed);
P.S. Spooler and RPC services are running.
Upvotes: 1
Views: 513
Reputation:
The last parameter should be a pointer to a DWORD
rather than 0
. This should work:
DWORD needed = 0;
Result = GetPrinterDriverDirectory(NULL, TEXT("Windows x86"), 1, (LPBYTE)&DriverDir, MAX_PATH, &needed);
Upvotes: 2