htregmng.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 3k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. /*
  2.  * Registry Association Management
  3.  *
  4.  * HTREGMNG.H
  5.  *
  6.  * Copyright (c) 1995 Microsoft Inc.
  7.  *
  8.  */
  9. #ifndef HTREGMNG_H
  10. #define HTREGMNG_H
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. /*
  15.  * Registry Management Structures
  16.  *
  17.  * We need a way to specify a set of registry entries to
  18.  * represent an association.   We can then test and
  19.  * set the registry appropriately to restore associations
  20.  * as needed
  21.  *
  22.  */
  23. typedef enum 
  24.     RC_ADD, 
  25.     RC_RUNDLL,
  26.     RC_DEL,              // Remove key
  27.     RC_CALLBACK
  28. } REGCMD;
  29. // Flags for RegEntry
  30. #define REF_NORMAL      0x00000000      // Required and forcefully set
  31. #define REF_NOTNEEDED   0x00000001      // Ignored during checks
  32. #define REF_IFEMPTY     0x00000002      // Set only if value/key is empty
  33. #define REF_DONTINTRUDE 0x00000004      // Don't intrude at setup time
  34. #define REF_NUKE        0x00000008      // Remove a key, regardless of the subkeys/values
  35. #define REF_PRUNE       0x00000010      // Walk up this path and remove empty keys
  36. #define REF_EDITFLAGS   0x00000020      // Remove edit flags only if the rest of the tree is empty
  37. // NOTE: these structures are deliberately CHAR, not TCHAR, so we don't
  38. // have to mess with the TEXT macro in all the tables.
  39. typedef struct _RegEntry {
  40.     REGCMD  regcmd;         // Special Handling
  41.     DWORD   dwFlags;        // REF_* 
  42.     HKEY    hkeyRoot;       // Root key
  43.     LPCSTR  pszKey;         // Key Name
  44.     LPCSTR  pszValName;     // Value Name
  45.     DWORD   dwType;         // Value Type
  46.     union 
  47.     {
  48.         LPARAM  lParam;     // lParam
  49.         DWORD   dwSize;     // Value Size (in bytes)
  50.     }DUMMYUNIONNAME;
  51.     VOID const * pvValue;   // Value
  52. } RegEntry;
  53. typedef RegEntry RegList[];
  54. typedef struct _RegSet {
  55.     DWORD       cre;       // Count of entries
  56.     const RegEntry * pre;
  57. } RegSet;
  58. #define IEA_NORMAL          0x00000001 // Only install IE assoc. if IE is currently owner.
  59. #define IEA_FORCEIE         0x00000002 // Force IE to take over associations
  60. HRESULT InstallIEAssociations(DWORD dwFlags);   // IEA_* flags
  61. HRESULT UninstallPlatformRegItems(BOOL bIntegrated);
  62. void    UninstallCurrentPlatformRegItems();
  63. BOOL    IsCheckAssociationsOn();
  64. void    SetCheckAssociations( BOOL );
  65. BOOL    GetIEPath(LPSTR szPath, DWORD cch);
  66. BOOL    IsIEDefaultBrowser(void);
  67. BOOL IsIEDefaultBrowserQuick(void);
  68. HRESULT ResetWebSettings(HWND hwnd, BOOL *pfChangedHomePage);
  69. extern const TCHAR c_szCLSID[];
  70. #ifdef __cplusplus
  71. };
  72. #endif
  73. #endif /* HTREGMNG_H */