Enumeração SHGLOBALCOUNTER (shlwapi.h)

Identificadores para vários contadores globais ou variáveis compartilhadas. Cada contador global pode ser incrementado ou decrementado usando SHGlobalCounterIncrement e 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;

Constantes

 
GLOBALCOUNTER_SEARCHMANAGER
O contador global para uso com o ISearchManager.
GLOBALCOUNTER_SEARCHOPTIONS
O contador global a ser usado com ISearchQueryHelper para identificar se as configurações de um analisador de consulta foram alteradas.
GLOBALCOUNTER_FOLDERSETTINGSCHANGE
O contador global usado para identificar se as configurações de pasta foram alteradas.
GLOBALCOUNTER_RATINGS
O contador global usado para identificar se as classificações foram alteradas.
GLOBALCOUNTER_APPROVEDSITES
O contador global usado para identificar se os sites aprovados foram alterados.
GLOBALCOUNTER_RESTRICTIONS
O contador global usado para identificar se as restrições foram alteradas.
GLOBALCOUNTER_SHELLSETTINGSCHANGED
O contador global usado para identificar se as configurações do Shell foram alteradas.
GLOBALCOUNTER_SYSTEMPIDLCHANGE
O contador global usado para identificar se um PIDL do sistema foi alterado.
GLOBALCOUNTER_OVERLAYMANAGER
O contador global usado para identificar se o estado do gerenciador de sobreposição foi alterado.
GLOBALCOUNTER_QUERYASSOCIATIONS
O contador global usado para identificar se as associações de consulta foram alteradas.
GLOBALCOUNTER_IESESSIONS
O contador global usado para identificar se o número de sessões do IE foi alterado.
GLOBALCOUNTER_IEONLY_SESSIONS
O contador global usado para identificar se o número de sessões do IE foi alterado.
GLOBALCOUNTER_APPLICATION_DESTINATIONS
Identifica o contador global usado para identificar se os aplicativos foram adicionados ou removidos do sistema.
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_CSCSYNCINPROGRESS
Não utilizado.
GLOBALCOUNTER_BITBUCKETNUMDELETERS
O contador global usado para identificar exclusões para a Lixeira.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_SHARES
O contador global usado para identificar se as configurações foram alteradas em um compartilhamento.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_A
O contador global usado para identificar se as configurações foram alteradas na unidade A.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_B
O contador global usado para identificar se as configurações foram alteradas na unidade B.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_C
O contador global usado para identificar se as configurações foram alteradas na unidade C.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_D
O contador global usado para identificar se as configurações foram alteradas na unidade D.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_E
O contador global usado para identificar se as configurações foram alteradas na unidade E.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_F
O contador global usado para identificar se as configurações foram alteradas na unidade F.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_G
O contador global usado para identificar se as configurações foram alteradas na unidade G.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_H
O contador global usado para identificar se as configurações foram alteradas na unidade H.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_I
O contador global usado para identificar se as configurações foram alteradas na unidade I.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_J
O contador global usado para identificar se as configurações foram alteradas na unidade J.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_K
O contador global usado para identificar se as configurações foram alteradas na unidade K.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_L
O contador global usado para identificar se as configurações foram alteradas na unidade L.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_M
O contador global usado para identificar se as configurações foram alteradas na unidade M.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_N
O contador global usado para identificar se as configurações foram alteradas na unidade N.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_O
O contador global usado para identificar se as configurações foram alteradas na unidade O.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_P
O contador global usado para identificar se as configurações foram alteradas na unidade P.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_Q
O contador global usado para identificar se as configurações foram alteradas na unidade Q.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_R
O contador global usado para identificar se as configurações foram alteradas na unidade R.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_S
O contador global usado para identificar se as configurações foram alteradas na unidade S.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_T
O contador global usado para identificar se as configurações foram alteradas na unidade T.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_U
O contador global usado para identificar se as configurações foram alteradas na unidade U.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_V
O contador global usado para identificar se as configurações foram alteradas na unidade V.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_W
O contador global usado para identificar se as configurações foram alteradas na unidade W.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_X
O contador global usado para identificar se as configurações foram alteradas na unidade X.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_Y
O contador global usado para identificar se as configurações foram alteradas na unidade Y.
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_Z
O contador global usado para identificar se as configurações foram alteradas na unidade Z.
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEDIRTYCOUNT_SERVERDRIVE
Não utilizado.
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEGLOBALDIRTYCOUNT
Não utilizado.
GLOBALCOUNTER_RECYCLEBINENUM
O contador global usado para identificar se as configurações da Lixeira foram alteradas.
GLOBALCOUNTER_RECYCLEBINCORRUPTED
O contador global usado para identificar se uma Lixeira foi excluída.
GLOBALCOUNTER_RATINGS_STATECOUNTER
O contador global usado para identificar se as classificações foram alteradas.
GLOBALCOUNTER_PRIVATE_PROFILE_CACHE
O estado do contador global.
GLOBALCOUNTER_INTERNETTOOLBAR_LAYOUT
O contador global usado para identificar se o layout da barra de ferramentas da Internet foi alterado.
GLOBALCOUNTER_FOLDERDEFINITION_CACHE
O contador global usado para identificar alterações no cache de definição de pasta.
GLOBALCOUNTER_COMMONPLACES_LIST_CACHE
O contador global usado para identificar alterações de estado para o cache de lista de comuns.
GLOBALCOUNTER_PRIVATE_PROFILE_CACHE_MACHINEWIDE
O estado do contador global, em todo o computador.
GLOBALCOUNTER_ASSOCCHANGED
O contador global usado para identificar o valor atual do registro GlobalAssocChangedCounter para HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer.
GLOBALCOUNTER_APP_ITEMS_STATE_STORE_CACHE
Introduzido em Windows 8. O contador global usado para identificar se a Loja é atual.
GLOBALCOUNTER_SETTINGSYNC_ENABLED
Introduzido em Windows 8. O contador global usado para determinar se a sincronização está habilitada ou desabilitada.
GLOBALCOUNTER_APPSFOLDER_FILETYPEASSOCIATION_COUNTER
Introduzido em Windows 8. O contador global usado para identificar o valor atual do registro FTACounter para HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\StateStore.
GLOBALCOUNTER_USERINFOCHANGED
Introduzido em Windows 8. O contador global usado para identificar o estado de alteração de informações do usuário.
GLOBALCOUNTER_SYNC_ENGINE_INFORMATION_CACHE_MACHINEWIDE
Introduzido em Windows 8.1. O contador global usado para identificar o estado do contador do mecanismo de sincronização, todo o computador.
GLOBALCOUNTER_BANNERS_DATAMODEL_CACHE_MACHINEWIDE
GLOBALCOUNTER_MAXIMUMVALUE
O valor máximo que qualquer variável compartilhada pode ter.

Comentários

Esses contadores globais são variáveis compartilhadas que podem ajudar a identificar se o estado de um componente do Windows foi alterado ao longo do tempo. Eles podem ser usados com essas funções: SHGlobalCounterDecrement, SHGlobalCounterIncrement, SHGlobalCounterGetValue.

Exemplo

O exemplo de pseudocódigo a seguir mostra como um contador global pode ser usado.
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.
            ...
        }
    }

Requisitos

Requisito Valor
Cliente mínimo com suporte Windows 7 [somente aplicativos da área de trabalho]
Servidor mínimo com suporte Windows Server 2008 R2 [somente aplicativos da área de trabalho]
Cabeçalho shlwapi.h

Confira também

SHGlobalCounterDecrement

SHGlobalCounterGetValue

SHGlobalCounterIncrement