DRMCloseEnvironmentHandle function

[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 DRMCloseEnvironmentHandle function closes an environment handle.

Syntax

DRMEXPORT HRESULT UDAPICALL DRMCloseEnvironmentHandle(
  IN DRMENVHANDLE hEnv
);

Parameters

hEnv

A handle to an environment.

Return Value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

Remarks

This function is the last function an application should call in a secure environment. Close embedded handles first by calling DRMCloseHandle. Calling DRMClose* functions clears out sensitive information from memory and allows the Active Directory Rights Management system to keep an accurate reference count on objects used.

If this function fails, an application should destroy the current process before reinitializing an environment to use.

Requirements

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

See Also

AD RMS Functions