GetPrintExecutionData function
The GetPrintExecutionData retrieves the current print context.
Note
This function is intended for use by printer drivers that are running in the context of the print spooler.
Syntax
BOOL WINAPI GetPrintExecutionData(
_Out_ PRINT_EXECUTION_DATA *pData
);
Parameters
-
pData [out]
-
A pointer to a variable that receives the address of the PRINT_EXECUTION_DATA structure.
Return value
Returns TRUE if the function succeeds; otherwise FALSE. If the return value is FALSE, call GetLastError to get the error status.
Remarks
Printer drivers should call GetProcAddress on the winspool.drv module to get the address of the GetPrintExecutionData function because GetPrintExecutionData is not supported on Windows Vista or earlier versions of Windows.
GetPrintExecutionData only fails if the value of pData is NULL.
The value of the clientAppPID member of PRINT_EXECUTION_DATA is only meaningful if the value of context is PRINT_EXECUTION_CONTEXT_WOW64. If the value of context is not PRINT_EXECUTION_CONTEXT_WOW64, the value of clientAppPID is 0.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 7 [desktop apps only] |
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
Header |
|
DLL |
|