DRM_MSG_ACTIVATE_MACHINE message

[The AD RMS SDK leveraging functionality exposed by the client in Msdrm.dll is available for use in Windows Server 2008, Windows Vista, Windows Server 2008 R2, Windows 7, Windows Server 2012, and Windows 8. It may be altered or unavailable in subsequent versions. Instead, use Active Directory Rights Management Services SDK 2.1, which leverages functionality exposed by the client in Msipc.dll.]

The DRM_MSG_ACTIVATE_MACHINE message is sent to the custom callback function in response to the DRMActivate function being called with the DRM_ACTIVATE_MACHINE option.

Parameters

hr

The result of the action being monitored. The contents of the pvParam parameter is dependent on the value of this parameter. This can be one of the following values.

S_DRM_ALREADY_ACTIVATED (NULL)

The machine is already activated.

S_DRM_COMPLETED (If the DRM_ACTIVATE_DELAYED flag is used for delayed activation, pvParam will be a pointer to a null-terminated Unicode string that contains the path to the activation CAB file (version 1.0 only) holding activation files that must be expanded and run manually. pvParam is NULL otherwise.)

The activation process is complete.

S_DRM_CONNECTED (NULL)

The system has connected to a server.

S_DRM_CONNECTING (NULL)

A connection has not yet occurred.

S_DRM_INPROGRESS (A pointer to a DWORD value that contains an integer that represents the progress of the current request, from zero to 100.)

This can be used for a progress bar or other visual indicator.

E_DRM_ABORTED (NULL)

The activation operation was aborted.

E_DRM_ACTIVATIONFAILED (NULL)

The activation operation failed.

E_DRM_ALREADY_IN_PROGRESS (NULL)

A machine activation operation is already in progress.

E_DRM_HID_CORRUPTED (NULL)

The hardware ID for the machine being activated is corrupt.

E_DRM_INSTALLATION_FAILED (NULL)

The machine activation package could not be installed.

E_DRM_INVALID_SERVER_RESPONSE (NULL)

The server sent a response that was not valid.

E_DRM_NO_CONNECT (NULL)

The AD RMS client could not connect to the Internet.

E_DRM_SERVER_ERROR (NULL)

A server error occurred.

E_DRM_SERVER_NOT_FOUND (NULL)

No machine activation server could be found.

pvParam

The contents of this parameter is dependent on the value in the hr parameter. For more information, see the hr parameter description.

pvContext

An application-defined value, such as a pointer to a callback function, a pointer to an event handle, or other value.

Return value

If the callback function succeeds, the function returns S_OK.

If the callback function fails, it returns an HRESULT error code.

Remarks

The DRMActivate function is an asynchronous function that will return before this message is sent to the callback function. It is the application's responsibility to ensure that this synchronization is properly handled.

Requirements

Product
Rights Management Services client 1.0 SP2 or later
Header
Msdrmdefs.h

See also

Creating a Callback Function

DRM_STATUS_MSG

DRMActivate