Bagikan melalui


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.

Syntax

typedef struct _IPC_PROMPT_CTX {
  DWORD            cbSize;
  HWND             hwndParent;
  DWORD            dwFlags;
  HANDLE           hCancelEvent;
  PCIPC_CREDENTIAL pcCredential;
} IPC_PROMPT_CTX, *PIPC_PROMPT_CTX;typedef const IPC_PROMPT_CTX *PCIPC_PROMPT_CTX;

Members

cbSize

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

hwndParent

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.

dwFlags

Flags that specify prompt behavior.

IPC_PROMPT_FLAG_SILENT (0x1)

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.

IPC_PROMPT_FLAG_OFFLINE (0x2)

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.

IPC_PROMPT_FLAG_HAS_USER_CONSENT (0x4)

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.

hCancelEvent

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.

pcCredential

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.

Remarks

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.

Requirements

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

See also

IPC_CREDENTIAL

CreateEvent

OpenEvent