home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / video / vidcap / profile.h < prev    next >
Encoding:
Text File  |  1997-10-05  |  2.4 KB  |  91 lines

  1. /**************************************************************************
  2.  *
  3.  *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4.  *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5.  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6.  *  PURPOSE.
  7.  *
  8.  *  Copyright (C) 1992 - 1997 Microsoft Corporation.  All Rights Reserved.
  9.  *
  10.  **************************************************************************/
  11. /****************************************************************************
  12.  *
  13.  *   profile.h: Registry access 
  14.  *
  15.  *   Vidcap32 Source code
  16.  *
  17.  ***************************************************************************/
  18.  
  19. /*
  20.  * utility functions to read and write values to the profile,
  21.  * using mmtools.ini for Win16 or current user\software\microsoft\mm tools
  22.  * in the registry for Win32
  23.  */
  24.  
  25. /*
  26.  * read a BOOL flag from the profile, or return default if
  27.  * not found.
  28.  */
  29. BOOL mmGetProfileFlag(LPSTR appname, LPSTR valuename, BOOL bDefault);
  30.  
  31. /*
  32.  * write a boolean value to the registry, if it is not the
  33.  * same as the default or the value already there
  34.  */
  35. VOID mmWriteProfileFlag(LPSTR appname, LPSTR valuename, BOOL bValue, BOOL bDefault);
  36.  
  37. /*
  38.  * read a UINT from the profile, or return default if
  39.  * not found.
  40.  */
  41. UINT mmGetProfileInt(LPSTR appname, LPSTR valuename, UINT uDefault);
  42.  
  43. /*
  44.  * write a UINT to the profile, if it is not the
  45.  * same as the default or the value already there
  46.  */
  47. VOID mmWriteProfileInt(LPSTR appname, LPSTR valuename, UINT uValue, UINT uDefault);
  48.  
  49. /*
  50.  * read a string from the profile into pResult.
  51.  * result is number of bytes written into pResult
  52.  */
  53. DWORD
  54. mmGetProfileString(
  55.     LPSTR appname,
  56.     LPSTR valuename,
  57.     LPSTR pDefault,
  58.     LPSTR pResult,
  59.     int cbResult
  60. );
  61.  
  62.  
  63. /*
  64.  * write a string to the profile
  65.  */
  66. VOID mmWriteProfileString(LPSTR appname, LPSTR valuename, LPSTR pData);
  67.  
  68.  
  69. /*
  70.  * read binary values from the profile into pResult.
  71.  * result is number of bytes written into pResult
  72.  */
  73. DWORD
  74. mmGetProfileBinary(
  75.     LPSTR appname,
  76.     LPSTR valuename,
  77.     LPVOID pDefault,  
  78.     LPVOID pResult,   // if NULL, return the required buffer size
  79.     int cbSize);
  80.  
  81. /*
  82.  * write binary data to the profile
  83.  */
  84. VOID
  85. mmWriteProfileBinary(LPSTR appname, LPSTR valuename, LPVOID pData, int cbData);
  86.            
  87.  
  88.  
  89.  
  90.  
  91.