Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Identifiers for various global counters, or shared variables. Each global counter can be incremented or decremented using SHGlobalCounterIncrement and SHGlobalCounterDecrement.
Syntax
typedef enum {
GLOBALCOUNTER_SEARCHMANAGER,
GLOBALCOUNTER_SEARCHOPTIONS,
GLOBALCOUNTER_FOLDERSETTINGSCHANGE,
GLOBALCOUNTER_RATINGS,
GLOBALCOUNTER_APPROVEDSITES,
GLOBALCOUNTER_RESTRICTIONS,
GLOBALCOUNTER_SHELLSETTINGSCHANGED,
GLOBALCOUNTER_SYSTEMPIDLCHANGE,
GLOBALCOUNTER_OVERLAYMANAGER,
GLOBALCOUNTER_QUERYASSOCIATIONS,
GLOBALCOUNTER_IESESSIONS,
GLOBALCOUNTER_IEONLY_SESSIONS,
GLOBALCOUNTER_APPLICATION_DESTINATIONS,
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_CSCSYNCINPROGRESS,
GLOBALCOUNTER_BITBUCKETNUMDELETERS,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_SHARES,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_A,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_B,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_C,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_D,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_E,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_F,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_G,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_H,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_I,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_J,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_K,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_L,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_M,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_N,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_O,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_P,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_Q,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_R,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_S,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_T,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_U,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_V,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_W,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_X,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_Y,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_Z,
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEDIRTYCOUNT_SERVERDRIVE,
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEGLOBALDIRTYCOUNT,
GLOBALCOUNTER_RECYCLEBINENUM,
GLOBALCOUNTER_RECYCLEBINCORRUPTED,
GLOBALCOUNTER_RATINGS_STATECOUNTER,
GLOBALCOUNTER_PRIVATE_PROFILE_CACHE,
GLOBALCOUNTER_INTERNETTOOLBAR_LAYOUT,
GLOBALCOUNTER_FOLDERDEFINITION_CACHE,
GLOBALCOUNTER_COMMONPLACES_LIST_CACHE,
GLOBALCOUNTER_PRIVATE_PROFILE_CACHE_MACHINEWIDE,
GLOBALCOUNTER_ASSOCCHANGED,
GLOBALCOUNTER_APP_ITEMS_STATE_STORE_CACHE,
GLOBALCOUNTER_SETTINGSYNC_ENABLED,
GLOBALCOUNTER_APPSFOLDER_FILETYPEASSOCIATION_COUNTER,
GLOBALCOUNTER_USERINFOCHANGED,
GLOBALCOUNTER_SYNC_ENGINE_INFORMATION_CACHE_MACHINEWIDE,
GLOBALCOUNTER_BANNERS_DATAMODEL_CACHE_MACHINEWIDE,
GLOBALCOUNTER_MAXIMUMVALUE
} SHGLOBALCOUNTER;
Constants
GLOBALCOUNTER_SEARCHMANAGERThe global counter for use with the ISearchManager. |
GLOBALCOUNTER_SEARCHOPTIONSThe global counter for use with ISearchQueryHelper to identify whether a query parser's settings have changed. |
GLOBALCOUNTER_FOLDERSETTINGSCHANGEThe global counter used to identify whether folder settings have changed. |
GLOBALCOUNTER_RATINGSThe global counter used to identify whether ratings have changed. |
GLOBALCOUNTER_APPROVEDSITESThe global counter used to identify whether approved sites have changed. |
GLOBALCOUNTER_RESTRICTIONSThe global counter used to identify whether restrictions have changed. |
GLOBALCOUNTER_SHELLSETTINGSCHANGEDThe global counter used to identify whether Shell settings have changed. |
GLOBALCOUNTER_SYSTEMPIDLCHANGEThe global counter used to identify whether a system PIDL has changed. |
GLOBALCOUNTER_OVERLAYMANAGERThe global counter used to identify whether the overlay manager state has changed. |
GLOBALCOUNTER_QUERYASSOCIATIONSThe global counter used to identify whether query associations have changed. |
GLOBALCOUNTER_IESESSIONSThe global counter used to identify whether the number of IE sessions has changed. |
GLOBALCOUNTER_IEONLY_SESSIONSThe global counter used to identify whether the number of IE sessions has changed. |
GLOBALCOUNTER_APPLICATION_DESTINATIONSIdentifies The global counter used to identify whether applications have been added or removed from the system. |
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_CSCSYNCINPROGRESSUnused. |
GLOBALCOUNTER_BITBUCKETNUMDELETERSThe global counter used to identify deletions to the Recycle Bin. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_SHARESThe global counter used to identify whether settings have changed on a share. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_AThe global counter used to identify whether settings have changed on drive A. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_BThe global counter used to identify whether settings have changed on drive B. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_CThe global counter used to identify whether settings have changed on drive C. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_DThe global counter used to identify whether settings have changed on drive D. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_EThe global counter used to identify whether settings have changed on drive E. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_FThe global counter used to identify whether settings have changed on drive F. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_GThe global counter used to identify whether settings have changed on drive G. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_HThe global counter used to identify whether settings have changed on drive H. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_IThe global counter used to identify whether settings have changed on drive I. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_JThe global counter used to identify whether settings have changed on drive J. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_KThe global counter used to identify whether settings have changed on drive K. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_LThe global counter used to identify whether settings have changed on drive L. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_MThe global counter used to identify whether settings have changed on drive M. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_NThe global counter used to identify whether settings have changed on drive N. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_OThe global counter used to identify whether settings have changed on drive O. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_PThe global counter used to identify whether settings have changed on drive P. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_QThe global counter used to identify whether settings have changed on drive Q. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_RThe global counter used to identify whether settings have changed on drive R. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_SThe global counter used to identify whether settings have changed on drive S. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_TThe global counter used to identify whether settings have changed on drive T. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_UThe global counter used to identify whether settings have changed on drive U. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_VThe global counter used to identify whether settings have changed on drive V. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_WThe global counter used to identify whether settings have changed on drive W. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_XThe global counter used to identify whether settings have changed on drive X. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_YThe global counter used to identify whether settings have changed on drive Y. |
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_ZThe global counter used to identify whether settings have changed on drive Z. |
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEDIRTYCOUNT_SERVERDRIVEUnused. |
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEGLOBALDIRTYCOUNTUnused. |
GLOBALCOUNTER_RECYCLEBINENUMThe global counter used to identify whether the Recycle Bin settings have changed. |
GLOBALCOUNTER_RECYCLEBINCORRUPTEDThe global counter used to identify whether a Recycle Bin has been deleted. |
GLOBALCOUNTER_RATINGS_STATECOUNTERThe global counter used to identify whether ratings have changed. |
GLOBALCOUNTER_PRIVATE_PROFILE_CACHEThe global counter state. |
GLOBALCOUNTER_INTERNETTOOLBAR_LAYOUTThe global counter used to identify whether the Internet toolbar layout has changed. |
GLOBALCOUNTER_FOLDERDEFINITION_CACHEThe global counter used to identify changes to the folder definition cache. |
GLOBALCOUNTER_COMMONPLACES_LIST_CACHEThe global counter used to identify state changes for the commonplaces list cache. |
GLOBALCOUNTER_PRIVATE_PROFILE_CACHE_MACHINEWIDEThe global counter state, machine-wide. |
GLOBALCOUNTER_ASSOCCHANGEDThe global counter used to identify the current GlobalAssocChangedCounter registry value for HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer. |
GLOBALCOUNTER_APP_ITEMS_STATE_STORE_CACHEIntroduced in Windows 8. The global counter used to identify whether the Store is current. |
GLOBALCOUNTER_SETTINGSYNC_ENABLEDIntroduced in Windows 8. The global counter used to determine whether sync is enabled or disabled. |
GLOBALCOUNTER_APPSFOLDER_FILETYPEASSOCIATION_COUNTERIntroduced in Windows 8. The global counter used to identify the current FTACounter registry value for HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\StateStore. |
GLOBALCOUNTER_USERINFOCHANGEDIntroduced in Windows 8. The global counter used to identify user info change state. |
GLOBALCOUNTER_SYNC_ENGINE_INFORMATION_CACHE_MACHINEWIDEIntroduced in Windows 8.1. The global counter used to identify sync engine counter state, machine wide.. |
GLOBALCOUNTER_BANNERS_DATAMODEL_CACHE_MACHINEWIDE |
GLOBALCOUNTER_MAXIMUMVALUEThe maximum value any shared variable can have. |
Remarks
These global counters are shared variables that can help identify whether the state of a Windows component has changed over time. They can be used with these functions: SHGlobalCounterDecrement, SHGlobalCounterIncrement, SHGlobalCounterGetValue.
Example
The following pseudocode example shows how a global counter can be used.void ValidateSomeSettings()
{
// Get the current GLOBALCOUNTER_SHELLSETTINGSCHANGED value.
long lGlobalSettingsCounter = SHGlobalCounterGetValue(GLOBALCOUNTER_SHELLSETTINGSCHANGED);
// Do some other work
...
// Verify whether the Shell settings have changed since entering this method.
if (lGlobalSettingsCounter == SHGlobalCounterGetValue(GLOBALCOUNTER_SHELLSETTINGSCHANGED))
{
// Commit the work that was done earlier
...
}
else
{
// Shell settings have changed. Rollback and redo.
...
}
}
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 7 [desktop apps only] |
| Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
| Header | shlwapi.h |