Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 3.39 KB

nf-shobjidl_core-ifileisinuse-getcapabilities.md

File metadata and controls

83 lines (62 loc) · 3.39 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:shobjidl_core.IFileIsInUse.GetCapabilities
IFileIsInUse::GetCapabilities (shobjidl_core.h)
Determines whether the file can be closed and whether the UI is capable of switching to the window of the application that is using the file.
GetCapabilities
GetCapabilities method [Windows Shell]
GetCapabilities method [Windows Shell]
IFileIsInUse interface
IFileIsInUse interface [Windows Shell]
GetCapabilities method
IFileIsInUse.GetCapabilities
IFileIsInUse::GetCapabilities
OF_CAP_CANCLOSE
OF_CAP_CANSWITCHTO
_shell_IFileIsInUse_GetCapabilities
shell.IFileIsInUse_GetCapabilities
shobjidl_core/IFileIsInUse::GetCapabilities
shell\IFileIsInUse_GetCapabilities.htm
shell
d2ce674a-4c06-401d-bfb0-bc2a086ef89c
12/05/2018
GetCapabilities, GetCapabilities method [Windows Shell], GetCapabilities method [Windows Shell],IFileIsInUse interface, IFileIsInUse interface [Windows Shell],GetCapabilities method, IFileIsInUse.GetCapabilities, IFileIsInUse::GetCapabilities, OF_CAP_CANCLOSE, OF_CAP_CANSWITCHTO, _shell_IFileIsInUse_GetCapabilities, shell.IFileIsInUse_GetCapabilities, shobjidl_core/IFileIsInUse::GetCapabilities
shobjidl_core.h
Shobjidl.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Shobjidl.idl
Windows
19H1
IFileIsInUse::GetCapabilities
shobjidl_core/IFileIsInUse::GetCapabilities
c++
APIRef
kbSyntax
COM
shobjidl_core.h
IFileIsInUse.GetCapabilities

IFileIsInUse::GetCapabilities

-description

Determines whether the file can be closed and whether the UI is capable of switching to the window of the application that is using the file.

-parameters

-param pdwCapFlags [out]

Type: DWORD*

A pointer to a value that, when this method returns successfully, receives the capability flags. One or both of the following values:

OF_CAP_CANSWITCHTO (0x0001)

0x0001. The UI can switch to the top-level window of the application that is using the file.

OF_CAP_CANCLOSE (0x0002)

0x0002. The file can be closed.

-returns

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-remarks

The capabilities returned by this method can be used in the composition of the dialog box presented to the user that informs them of the sharing conflict. For instance, if the OF_CAP_CANSWITCHTO flag is retrieved, a button can be added to the dialog box that will switch the user to the conflicting application window (based on the HWND information retrieved by IFileIsInUse::GetSwitchToHWND) so that the user can address the situation as they see fit. If the OF_CAP_CANCLOSE flag is retrieved, the dialog box can present a Close button that calls the CloseFile method.