DRMGetUsers function (msdrm.h)

[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 DRMGetUsers function retrieves a specific user from an issuance license.

Syntax

DRMEXPORT HRESULT UDAPICALL DRMGetUsers(
  [in]  DRMPUBHANDLE hIssuanceLicense,
  [in]  UINT         uIndex,
  [out] DRMPUBHANDLE *phUser
);

Parameters

[in] hIssuanceLicense

The handle of the issuance license to retrieve the user from.

[in] uIndex

The zero-based index of the user in the issuance license to retrieve. To enumerate all the users in the issuance license, create a loop starting at zero and incrementing by one. When the function returns E_DRM_NO_MORE_DATA, there are no more users in the issuance license.

[out] phUser

A pointer to a DRMPUBHANDLE value that receives the handle to the requested user. Call DRMClosePubHandle to close the handle.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following list. For a list of common error codes, see Common HRESULT Values.

Remarks

To enumerate all the users in the issuance license, create a loop starting at zero and incrementing by one. When the function returns E_DRM_NO_MORE_DATA, there are no more users in the issuance license. Call DRMClosePubHandle to close the user handle created by calling this function.

Requirements

Requirement Value
Target Platform Windows
Header msdrm.h
Library Msdrm.lib
DLL Msdrm.dll

See also

AD RMS Functions

DRMGetUserInfo

DRMGetUserRights