Condividi tramite


IpcUnprotectWindow function

Removes the protection from a window protected using IpcProtectWindow.

Syntax

HRESULT WINAPI IpcUnprotectWindow(
  _In_ HWND     hwnd
);

Parameters

hwnd [in]

The window to unprotect.

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.

Remarks

To ensure that your application works with current and future versions of the RMS SDK 2.1, you should use the following code to unprotect a window.

hr = IpcUnprotectWindow(hwnd);
if (FAILED(hr) && (IPCERROR_PROPERTY_ALREADY_SET != hr)) 
{ 

// Failed to unprotect the window. 
// Your application code must determine whether to treat this condition as fatal. 

} 

else 
{ 
// Success! Continue... 
hr = S_OK;
}

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

IpcProtectWindow

Error codes