CfGetWin32HandleFromProtectedHandle function (cfapi.h)

Converts a protected handle to a Win32 handle so that it can be used with all handle-based Win32 APIs.

Syntax

HANDLE CfGetWin32HandleFromProtectedHandle(
  [in] HANDLE ProtectedHandle
);

Parameters

[in] ProtectedHandle

The protected handle to be converted.

Return value

The corresponding Win32 handle.

Remarks

The caller must have referenced the protected handle prior to this call using CfReferenceProtectedHandle to ensure that the use of the Win32 handle is tracked, and the Win32 API call that consumes the Win32 handle is synchronized with the oplock break notification acknowledgment.

The caller must release the reference on the protected handle after being done with the Win32 handle using CfReleaseProtectedHandle.

In no circumstances should the caller close the Win32 handle returned using CfCloseHandle.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1709 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header cfapi.h
Library CldApi.lib
DLL CldApi.dll

See also

CfReferenceProtectedHandle

CfReleaseProtectedHandle

CfCloseHandle