home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / convregh.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  2KB  |  62 lines

  1. // --convregh.h-----------------------------------------------------------------
  2. //
  3. //  Conversion registry helper routines.
  4. // 
  5. // Copyright 1986 - 1998 Microsoft Corporation.  All Rights Reserved.
  6. //
  7. // -----------------------------------------------------------------------------
  8.  
  9. #ifndef _CONVREGH_H
  10. #define _CONVREGH_H
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif // __cplusplus
  15.  
  16. //$--HrGetArbSizeValue---------------------------------------------------------
  17. //
  18. //  DESCRIPTION: Allocate sufficient memory to read a value from the the registry 
  19. //  and read it.  
  20. //
  21. //  INPUT:  hk  --  key that contains value
  22. //          lpszValueName   --  name of value
  23. //       
  24. //  OUTPUT: pValue  --  pointer to key's value
  25. //          cbSize  --  size of value (including null)
  26. //          nType   --  type of value
  27. //
  28. //  RETURNS:    HRESULT -   NOERROR if successful,
  29. //                          E_INVALIDARG if bad input,
  30. //                          E_EOF if key not found,
  31. //                          E_FAIL otherwise.
  32. //
  33. //------------------------------------------------------------------------------
  34. HRESULT HrGetArbSizeValue(       // RETURNS: HRESULT
  35.     IN HKEY hk,                 // key that contains the value
  36.     IN LPWSTR lpszValueName,    // name of the value
  37.     OUT PVOID & pValue,         // pointer to its value
  38.     OUT DWORD & cbSize,         // how big is it (including trailing null(s)
  39.     OUT DWORD & nType);         // what type
  40.  
  41. //$--HrStrstriW-------------------------------------------------------
  42. //
  43. // DESCRIPTION: determines whether one string is a prefix of another.
  44. // case sensitive.
  45. //
  46. // INPUT:   pszSubString   --  the sub-string to check for
  47. //          pszString   --  the string
  48. //
  49. // RETURNS: HRESULT --  NOERROR if sub-string exists in string,
  50. //                      E_FAIL otherwise.
  51. //
  52. //---------------------------------------------------------------------
  53. HRESULT HrStrstriW( 
  54.     IN LPCWSTR pszSubString,    // the candidate sub-string
  55.     IN LPCWSTR pszString);      // the string.
  56.  
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60.  
  61. #endif
  62.