ImpersonatePrinterClient function (winsplp.h)
ImpersonatePrinterClient resumes impersonation of the client, completing the operation begun by RevertToPrinterSelf.
Syntax
BOOL ImpersonatePrinterClient(
[in] HANDLE hToken
);
Parameters
[in] hToken
Caller-supplied handle to a thread. This parameter must have been previously returned by a call to RevertToPrinterSelf.
Return value
If the operation succeeds, the function returns TRUE. Otherwise the function returns FALSE. The caller can obtain an error code by calling GetLastError (described in the Microsoft Windows SDK documentation).
Remarks
This function must be called after a successful call to RevertToPrinterSelf. It resumes impersonation of the client and cleans up the thread handle.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | winsplp.h (include Winsplp.h) |
Library | Spoolss.lib |
DLL | Spoolss.dll |