home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples1.exe / Profiler / RegUtil.h < prev   
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.9 KB  |  62 lines

  1. //*****************************************************************************
  2. // regutil.h
  3. //
  4. // This module contains a set of functions that can be used to access the
  5. // regsitry.
  6. //
  7. // Copyright (c) Microsoft Corp., 1996, All rights reserved.
  8. //*****************************************************************************
  9. #ifndef __REGUTIL_H__
  10. #define __REGUTIL_H__
  11.  
  12. #include "BasicHdr.h"
  13.  
  14. #define NumItems(s) ( sizeof(s) / sizeof(s[0]) )
  15.  
  16. static const char*    gszKey = "Software\\Microsoft\\COMPlus";
  17.  
  18. class REGUTIL
  19. {
  20.     public:
  21.  
  22.     static BOOL SetKeyAndValue( const char *szKey,     
  23.                                 const char *szSubkey,  
  24.                                 const char *szValue ); 
  25.  
  26.     static BOOL DeleteKey( const char *szKey,        
  27.                            const char *szSubkey );  
  28.  
  29.     static BOOL SetRegValue( const char *szKeyName,    
  30.                              const char *szKeyword, 
  31.                              const char *szValue ); 
  32.  
  33.     static HRESULT RegisterCOMClass( REFCLSID rclsid,                  
  34.                                      const char *szDesc,            
  35.                                      const char *szProgIDPrefix,
  36.                                      int iVersion,  
  37.                                      const char *szClassProgID,     
  38.                                      const char *szThreadingModel, 
  39.                                      const char *szModule );       
  40.  
  41.     static HRESULT UnregisterCOMClass( REFCLSID rclsid,            
  42.                                        const char *szProgIDPrefix, 
  43.                                        int iVersion,               
  44.                                        const char *szClassProgID ); 
  45.  
  46.     private:
  47.  
  48.     static HRESULT RegisterClassBase( REFCLSID rclsid,          
  49.                                       const char *szDesc,       
  50.                                       const char *szProgID,     
  51.                                       const char *szIndepProgID,
  52.                                       char *szOutCLSID );       
  53.  
  54.     static HRESULT UnregisterClassBase( REFCLSID rclsid,            
  55.                                         const char *szProgID,       
  56.                                         const char *szIndepProgID,  
  57.                                         char *szOutCLSID );          
  58. };
  59.  
  60.  
  61. #endif // __REGUTIL_H__
  62.