IPC_PROMPT_CTX structure

Provides context for user prompts; in the event that a process must be prompted for credentials or to display information, this context is used to determine the behavior of the prompts.


typedef struct _IPC_PROMPT_CTX {
  DWORD            cbSize;
  HWND             hwndParent;
  DWORD            dwFlags;
  HANDLE           hCancelEvent;
  PCIPC_CREDENTIAL pcCredential;



Used for version control. Must be set to sizeof(IPC_PROMPT_CTX).


Optional handle to parent window for dialogs.

Setting this handle will cause the function to display all UI modal to the specified handle.

Set to NULL if not used.


Flags that specify prompt behavior.


Do not prompt the user for input. Use of this flag will cause the IPCERROR_NEEDS_UI error to be returned if a prompt is required.


Do not access the network. Use of this flag will cause the IPCERROR_NEEDS_ONLINE error to be returned if accessing the network is required.

This flag should not be used under normal conditions. When this flag is not set, the platform will attempt to service all requests offline and will go online only when necessary to service the request successfully. Setting this flag will not improve the platform's performance characteristics for requests that can be serviced offline, and will cause unwanted failures when the request could have been serviced online.


This flag causes the privacy dialog display to be skipped when contacting an RMS server for the first time.

Using this flag will cause the URLs to be cached as if consent has already given.


Optional handle to an event created by CreateEvent or OpenEvent.

Setting this event cancels active calls to which this structure was passed. The initial state of the event should be non-signaled . If the event is in signaled state, the call will be aborted.

Set to NULL if not used.


Credential, represented by an IPC_CREDENTIAL structure, to authenticate to an RMS Server. This value can be NULL.

Credential will be ignored if IPC_PROMPT_FLAG_OFFLINE flag is used. See the dwFlags member of this structure.


If the application does not want the user to be prompted, the IPC_PROMPT_FLAG_SILENT flag can be used.

If user prompting is allowed, the parent window for modal dialogs can be specified.


Minimum supported client
Windows Vista with SP2
Minimum supported server
Windows Server 2008
Ipcbase.h (include Msipc.h)

See also