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. |
|
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 |
|
|
|
|
|
|
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.
Type: DWORD*
A pointer to a value that, when this method returns successfully, receives the capability flags. One or both of the following values:
0x0001. The UI can switch to the top-level window of the application that is using the file.
0x0002. The file can be closed.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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.