//+------------------------------------------------------------------------- // // Microsoft Windows // // Copyright (C) Microsoft Corporation, 1997 - 1999 // // File: pch.h // //-------------------------------------------------------------------------- #ifndef _PCH_H_ #define _PCH_H_ #ifdef __cplusplus extern "C" { #endif #include #include #include #ifdef __cplusplus } // end of extern "C" #endif #include #include #include #include #include // SHFree #include #include // QITAB, QISearch #include // STWM_ENABLESERVICE, etc. #include #include #include #include #include // OneStop/SyncMgr interfaces #include // Memphis disk cleanup interface #include // resource IDs #include #include #include #include #include #ifndef FLAG_CSC_SHARE_STATUS_PINNED_OFFLINE // // NTRAID#NTBUG9-350509-2001/04/11-brianau // // JHarper defined this new flag in shdcom.h but I don't think he's // yet added it to cscapi.h. // # define FLAG_CSC_SHARE_STATUS_PINNED_OFFLINE 0x2000 #endif #ifndef FLAG_CSC_HINT_PIN_ADMIN // This should be defined in cscapi.h, but since // Remote Boot has been cancelled, use the system hint flag. #define FLAG_CSC_HINT_PIN_ADMIN FLAG_CSC_HINT_PIN_SYSTEM #endif #ifndef ARRAYSIZE #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) #endif // // Convert a value to a "bool". // Lower-case "boolify" is intentional to enforce relationship // to type "bool". // template inline bool boolify(const T& x) { return !!x; } // // Global function prototypes // STDAPI_(void) DllAddRef(void); STDAPI_(void) DllRelease(void); #include "debug.h" #include "cscentry.h" #include "uuid.h" // GUIDs #include "util.h" #include "filelist.h" // CscFileNameList, PCSC_NAMELIST_HDR #include "shellex.h" #include "update.h" #include "volclean.h" #include "config.h" // // Global variables // extern LONG g_cRefCount; extern HINSTANCE g_hInstance; extern CLIPFORMAT g_cfShellIDList; extern HANDLE g_heventTerminate; extern HANDLE g_hmutexAdminPin; // // Magic debug flags // #define TRACE_UTIL 0x00000001 #define TRACE_SHELLEX 0x00000002 #define TRACE_UPDATE 0x00000004 #define TRACE_VOLFREE 0x00000008 #define TRACE_CSCST 0x00000080 #define TRACE_CSCENTRY 0x00000100 #define TRACE_ADMINPIN 0x00000200 #define TRACE_COMMON_ASSERT 0x40000000 /*----------------------------------------------------------------------------- / Exit macros / - these assume that a label "exit_gracefully:" prefixes the epilog / to your function /----------------------------------------------------------------------------*/ #define ExitGracefully(hr, result, text) \ { TraceMsg(text); hr = result; goto exit_gracefully; } #define FailGracefully(hr, text) \ { if ( FAILED(hr) ) { TraceMsg(text); goto exit_gracefully; } } /*----------------------------------------------------------------------------- / Interface helper macros /----------------------------------------------------------------------------*/ #define DoRelease(pInterface) \ { if ( pInterface ) { pInterface->Release(); pInterface = NULL; } } /*----------------------------------------------------------------------------- / String helper macros /----------------------------------------------------------------------------*/ #define StringByteSize(sz) \ ((lstrlen(sz)+1)*sizeof(TCHAR)) /*----------------------------------------------------------------------------- / Other helpful macros /----------------------------------------------------------------------------*/ #define ByteOffset(base, offset) \ (((LPBYTE)base)+offset) // // This is from shell32. From the comments in browseui // this value will not change. // #define FCIDM_REFRESH 0xA220 #define MAX_PATH_BYTES (MAX_PATH * sizeof(TCHAR)) #endif // _PCH_H_