BOOL GetPrinterDriverDirectory(pName, pEnvironment, Level, pDriverDirectory, cbBuf, pcbNeeded) | |||
LPTSTR pName; | |||
LPTSTR pEnvironment; | |||
DWORD Level; | |||
LPBYTE pDriverDirectory; | |||
DWORD cbBuf; | |||
LPDWORD pcbNeeded; |
This function returns the fully qualified pathname of the directory where the Printer Driver should reside.
pName
This points to a null-terminated string that specifies the name of the server where this directory resides.
pEnvironment
Pointer to a string that specifies the machine and operating system environment. An example is the string “W32X86”.
Level
This value must be 1.
pDriverDirectory
A pointer to a buffer that the function will fill with a fully qualified pathname to the directory where the Printer Driver resides.
cbBuf
Specifies the size of the buffer pointed to by pDriverDirectory.
pcbNeeded
This points to a variable that will be updated to contain the actual buffer size required that is pointed to by pDriverDirectory. If cbBuf is too small then GetLastError will indicate ERROR_BUFFER_TOO_SMALL, and pcbNeeded will contain the size required. If cbBuf is large enough, then pcbNeeded will contain the number of bytes that were copied.
The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.