Aracılığıyla paylaş


IpcAccessCheck function

Checks whether a key object grants the requested right.

Syntax

HRESULT WINAPI IpcAccessCheck(
  _In_  IPC_KEY_HANDLE hKey,
  _In_  LPCWSTR        wszRequestedRight,
  _Out_ LPBOOL         pfAccessGranted
);

Parameters

hKey [in]

A handle to a key object returned by either IpcSerializeLicense or IpcGetKey.

wszRequestedRight [in]

A Unicode string that represents a single right. The string is not case-sensitive. Rights can be defined by the application or can be one of the rights defined by RMS SDK 2.1. For more information, see Rights.

pfAccessGranted [out]

A pointer to a variable that receives the result of the operation. The result is TRUE if the requested right has been granted; otherwise, FALSE.

Return value

If the function succeeds, the return value is S_OK. If the function fails, it returns an HRESULT value that indicates the error.

For more information, see Error codes for a description of all RMS SDK 2.1 return values.

Remarks

This function should be used to determine whether to enforce a usage restriction, application defined or otherwise. For more information, see the Usage restriction reference.

Requirements

Minimum supported client
Windows Vista with SP2
Minimum supported server
Windows Server 2008
Header
Ipcprot.h (include Msipc.h)
Library
Msipc.lib
DLL
Msipc.dll

See also

IpcGetKey

IpcSerializeLicense

Rights

Usage restriction reference

Error codes