home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winui / shell / regview / utility.h < prev   
Encoding:
C/C++ Source or Header  |  1997-08-27  |  2.1 KB  |  67 lines

  1. /**************************************************************************
  2.    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3.    ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4.    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5.    PARTICULAR PURPOSE.
  6.  
  7.    Copyright 1997 Microsoft Corporation.  All Rights Reserved.
  8. **************************************************************************/
  9.  
  10. /**************************************************************************
  11.  
  12.    File:          Utility.h
  13.    
  14.    Description:   Utility definitions.
  15.  
  16. **************************************************************************/
  17.  
  18. #ifndef UTILITY_H
  19. #define UTILITY_H
  20.  
  21. /**************************************************************************
  22.    #include statements
  23. **************************************************************************/
  24.  
  25. #include <windows.h>
  26. #include <shlobj.h>
  27. #include <Regstr.h>
  28.  
  29. #ifdef _cplusplus
  30. extern "C" {
  31. #endif   //_cplusplus
  32.  
  33. /**************************************************************************
  34.    global variables
  35. **************************************************************************/
  36.  
  37. extern int  g_nColumn1;
  38. extern int  g_nColumn2;
  39. extern BOOL g_bViewKeys;
  40. extern BOOL g_bShowIDW;
  41.  
  42. /**************************************************************************
  43.    function prototypes
  44. **************************************************************************/
  45.  
  46. //registry utility functions
  47. DWORD GetKeyName(HKEY, LPCTSTR, DWORD, LPTSTR, DWORD);
  48. BOOL GetValueName(HKEY, LPCTSTR, DWORD, LPTSTR, DWORD);
  49. DWORD GetRootKeyText(HKEY, LPTSTR, DWORD);
  50. BOOL RootKeyExists(HKEY);
  51.  
  52. //utility functions
  53. BOOL SaveGlobalSettings(void);
  54. BOOL GetGlobalSettings(void);
  55. int CALLBACK CompareItems(LPARAM, LPARAM, LPARAM);
  56. VOID CreateImageLists(VOID);
  57. VOID DestroyImageLists(VOID);
  58. int WideCharToLocal(LPTSTR, LPWSTR, DWORD);
  59. int LocalToWideChar(LPWSTR, LPTSTR, DWORD);
  60.  
  61. #ifdef _cplusplus
  62. }
  63. #endif   //_cplusplus
  64.  
  65. #define ARRAYSIZE(a)    (sizeof(a)/sizeof(a[0]))
  66.  
  67. #endif   //UTILITY_H