SplPromptUIInUsersSession function

The SplPromptUIInUsersSession function displays a standard message box in the session indicated by the printer handle and job ID.

Syntax

BOOL SplPromptUIInUsersSession(
  HANDLE        hPrinter,
  DWORD         JobId,
  PSHOWUIPARAMS pUIParams,
  DWORD         *pResponse
);

Parameters

hPrinter

Handle to the printer.

JobId

Specifies the print job.

pUIParams

Pointer to a SHOWUIPARAMS structure that contains values that determine the appearance and behavior of the message box.

pResponse

Pointer to a memory location that contains either the user's response or the IDASYNC constant. For more information, see the Remarks section.

Return Value

On success, the SplPromptUIInUsersSession function returns TRUE; otherwise it returns FALSE.

Remarks

If pUIParams ->bWait is FALSE, this function returns immediately without waiting for the user's response. In that case, *pResponse is set to IDASYNC.

If you plan to use this function in a driver intended to run under Windows 2000, you must load spoolss.dll by a call to the LoadLibrary function, and then find the address of this function within that DLL by a call to the GetProcAddress function. (LoadLibrary and GetProcAddress are described in the Microsoft Windows SDK documentation.) If the call to GetProcAddress fails, you must use an alternative mechanism to display user interface elements.

Requirements

   
Minimum supported client The SplPromptUIInUsersSession function is available in Windows XP and later
Target Platform Desktop
Header winsplp.h (include Winsplp.h)
Library Spoolss.lib
DLL Spoolss.dll

See Also

SHOWUIPARAMS

SplIsSessionZero