home *** CD-ROM | disk | FTP | other *** search
/ Better Windows, Better Works / CDRM93801.bin / winutil / util42 / extras.c next >
C/C++ Source or Header  |  1991-03-26  |  1KB  |  48 lines

  1. /*
  2.  *  extras.c
  3.  *      Source for more Windows-type functions
  4.  *
  5.  *  Author:         Jeff Bienstadt
  6.  *
  7.  *  Environment:
  8.  *
  9.  *      Run-Time:   Microsoft Windows 3.0
  10.  *
  11.  *      Compilers/Tools:
  12.  *                  Microsoft C 6.0
  13.  *                  Microsoft Windows SDK 3.0
  14.  *
  15.  */
  16.  
  17.  
  18. #include    <windows.h>     // for the Windows goodies
  19. #include    <stdlib.h>      // for itoa()
  20. #include    "extras.h"      // function prototypes
  21.  
  22. // Write an integer value to a specified .INI file
  23. BOOL FAR PASCAL WritePrivateProfileInt(App, Key, Value, File)
  24. LPSTR   App,
  25.         Key,
  26.         File;
  27. int     Value;
  28. {
  29.     char    str[17];
  30.  
  31.     return WritePrivateProfileString(App, Key,
  32.                                      (LPSTR)itoa(Value, str, 10), File);
  33. }
  34.  
  35.  
  36. // Write an integer value to the Windows WIN.INI file
  37. BOOL FAR PASCAL WriteProfileInt(App, Key, Value)
  38. LPSTR   App,
  39.         Key;
  40. int     Value;
  41. {
  42.     char    str[17];
  43.  
  44.     return WriteProfileString(App, Key,
  45.                               (LPSTR)itoa(Value, str, 10));
  46. }
  47.  
  48.