GetPrinterDriverDirectory


BOOL GetPrinterDriverDirectory(
  LPTSTR  lpszName,    /* address of server name                */
  LPTSTR  lpszEnv,     /* address of environment                */
  DWORD   dwLevel,     /* address of structure                  */
  LPBYTE  lpbDir,      /* address of structure array that       */
                       /* receives path                         */
  DWORD   cbBuf,       /* size, in bytes, of array              */
  LPDWORD lpdwNeeded   /* addr. of variable with count of bytes */
                       /* retrieved (or required)               */
);

Retrieves the path to the specified printer driver.

lpszName

Points to a null-terminated string that specifies the name of the server on which the printer driver resides. If this string is NULL, the path to the Local Print Provider is retrieved.

lpszEnv

Points to a null-terminated string that specifies the environment. For example, "Windows 96 x86" specifies Windows 96 running on an Intel(r) 80386 or 80486 processor. If this string is NULL, the current environment of the caller/client (not of the destination/server) is used.

dwLevel

Specifies the structure level. This value must be 1.

lpbDir

Points to an array of bytes that receives the path.

cbBuf

Specifies the size of the array to which lpbDir points.

lpdwNeeded

Points to a value that specifies the number of bytes copied if the function succeeds, or the number of bytes required if cbBuf is too small.