Partilhar via


IpcSetGlobalProperty function

Sets environment properties for the system. Every environment configuration setting has a default value that can be overridden by using this function.

These properties can only be set once per process. Once the RMS system has been initialized with the call to IpcInitialize, you may then set these properties, doing so before calling other Rights Management Services SDK 2.1 APIs.

Syntax

HRESULT WINAPI IpcSetGlobalProperty(
       DWORD   dwPropID,
  _In_ LPCVOID pvProperty
);

Parameters

dwPropID

The ID of the property that is being set. For a list of valid property IDs, see Environment properties.

pvProperty [in]

A pointer to a buffer that contains the value for the property. The structure of the property information depends on the property ID specified in the dwPropID parameter. For more information, see Environment properties.

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.

Possible values include, but are not limited to, those in the following list.

IPCERROR_PROPERTY_ALREADY_SET

Meaning: When the dwPropID parameter is set to IPC_EI_API_MODE, this property has been set before.

Action: This function should be called before any other RMS SDK 2.1 function if the application needs to change the API mode. The RMS SDK 2.1 will set the API mode automatically, and the API mode cannot be changed after it is set.

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

Environment properties

IpcGetGlobalProperty

Error codes