Skip to content

Latest commit

 

History

History
118 lines (75 loc) · 5.47 KB

nf-cscobj-iofflinefilesconnectioninfo-setconnectstate.md

File metadata and controls

118 lines (75 loc) · 5.47 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:cscobj.IOfflineFilesConnectionInfo.SetConnectState
IOfflineFilesConnectionInfo::SetConnectState (cscobj.h)
Sets the connection state for an item.
IOfflineFilesConnectionInfo interface [Offline Files]
SetConnectState method
IOfflineFilesConnectionInfo.SetConnectState
IOfflineFilesConnectionInfo::SetConnectState
OFFLINEFILES_CONNECT_STATE_OFFLINE
OFFLINEFILES_CONNECT_STATE_ONLINE
OFFLINEFILES_TRANSITION_FLAG_CONSOLE
OFFLINEFILES_TRANSITION_FLAG_INTERACTIVE
SetConnectState
SetConnectState method [Offline Files]
SetConnectState method [Offline Files]
IOfflineFilesConnectionInfo interface
cscobj/IOfflineFilesConnectionInfo::SetConnectState
of.iofflinefilesconnectioninfo_setconnectstate
of\iofflinefilesconnectioninfo_setconnectstate.htm
of
42412f42-7a70-4110-88ec-a38b3df7d2da
12/05/2018
IOfflineFilesConnectionInfo interface [Offline Files],SetConnectState method, IOfflineFilesConnectionInfo.SetConnectState, IOfflineFilesConnectionInfo::SetConnectState, OFFLINEFILES_CONNECT_STATE_OFFLINE, OFFLINEFILES_CONNECT_STATE_ONLINE, OFFLINEFILES_TRANSITION_FLAG_CONSOLE, OFFLINEFILES_TRANSITION_FLAG_INTERACTIVE, SetConnectState, SetConnectState method [Offline Files], SetConnectState method [Offline Files],IOfflineFilesConnectionInfo interface, cscobj/IOfflineFilesConnectionInfo::SetConnectState, of.iofflinefilesconnectioninfo_setconnectstate
cscobj.h
Windows
Windows Vista
Windows Server 2008
CscSvc.dll; CscObj.dll
Windows
19H1
IOfflineFilesConnectionInfo::SetConnectState
cscobj/IOfflineFilesConnectionInfo::SetConnectState
c++
APIRef
kbSyntax
COM
CscSvc.dll
CscObj.dll
IOfflineFilesConnectionInfo.SetConnectState

IOfflineFilesConnectionInfo::SetConnectState

-description

Sets the connection state for an item.

Note that the entire scope of the item is transitioned, not just the item. An item's scope is defined as the closest ancestor shared folder of the item.

-parameters

-param hwndParent [in]

Provides a parent window handle used for any interactive user interface elements such as credential request dialogs. This parameter may be NULL. This parameter is ignored if the OFFLINEFILES_TRANSITION_FLAG_INTERACTIVE flag is not specified in the dwFlags parameter.

-param dwFlags [in]

One or more of the following flag values:

OFFLINEFILES_TRANSITION_FLAG_INTERACTIVE (0x00000001)

Set this flag if the operation is allowed to display user interface elements as necessary. An example is the system's credential-request dialog. If this flag is set, the value in the hwndParent parameter is used as the parent window for any user interface elements displayed.

OFFLINEFILES_TRANSITION_FLAG_CONSOLE (0x00000002)

This flag is ignored if the OFFLINEFILES_TRANSITION_FLAG_INTERACTIVE flag is not set. If the OFFLINEFILES_TRANSITION_FLAG_INTERACTIVE flag is set, this flag indicates that any UI produced should be directed to the console window associated with the process invoking the operation.

-param ConnectState [in]

Specify one of the following OFFLINEFILES_CONNECT_STATE enumeration values.

OFFLINEFILES_CONNECT_STATE_OFFLINE

Transition the item to offline. Note that this operation will fail if there are currently open handles to affected files that are not cached by Offline Files. The IOfflineFilesConnectionInfo::TransitionOffline method allows you to control the closing of such handles.

OFFLINEFILES_CONNECT_STATE_ONLINE

Transitions the item online if possible. This is equivalent to the IOfflineFilesConnectionInfo::TransitionOnline method.

-returns

Returns S_OK if successful, or an error value otherwise.

-remarks

The IOfflineFilesConnectionInfo::TransitionOnline and IOfflineFilesConnectionInfo::TransitionOffline methods are preferred over this method as they provide greater control over the handling and detecting of open handles in the online-to-offline transition.

-see-also

IOfflineFilesConnectionInfo

IOfflineFilesConnectionInfo::TransitionOffline

IOfflineFilesConnectionInfo::TransitionOnline

OFFLINEFILES_CONNECT_STATE