OfflineFilesQueryStatus function (cscapi.h)

Determines whether the Offline Files feature is enabled and, if so, whether it is active.

Syntax

DWORD OfflineFilesQueryStatus(
  [out] BOOL *pbActive,
  [out] BOOL *pbEnabled
);

Parameters

[out] pbActive

Receives TRUE if both the CSC driver and Offline Files Service are in the running state, or FALSE otherwise. This parameter is optional and can be NULL.

[out] pbEnabled

Receives TRUE if the CSC driver's start type is set to SERVICE_SYSTEM_START and the Offline Files service's start type is set to SERVICE_AUTO_START, or FALSE otherwise. This parameter is optional and can be NULL.

Return value

Returns ERROR_SUCCESS if successful or a Win32 error value otherwise.

Remarks

If the values returned in the pbActive and pbEnabled parameters are not both TRUE, the caller must restart the computer to enable or disable the Offline Files feature. If one of the values is still FALSE after the computer is restarted, check the system event logs to identify the problem with starting either the CSC driver or the Offline Files service.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header cscapi.h
Library CscApi.lib
DLL CscApi.dll

See also

OfflineFilesQueryStatusEx