Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.9 KiB

4 years ago
  1. /*
  2. * utility functions to read and write values to the profile,
  3. * using win.ini for Win16 or current user\software\microsoft\mciavi
  4. * in the registry for Win32
  5. */
  6. #ifndef _WIN32
  7. // For Win16 calls, mmWriteProfileInt passes a STRING for parm 3
  8. //VOID mmWriteProfileInt(LPSTR appname, LPSTR valuename, UINT uValue);
  9. #define mmWriteProfileInt(app, value, default) \
  10. WriteProfileString(app, value, (LPSTR)default)
  11. #define mmGetProfileInt(app, value, default) \
  12. GetProfileInt(app, value, (LPSTR)default)
  13. #define mmGetProfileIntA(app, value, default) \
  14. GetProfileInt(app, value, (LPSTR)default)
  15. #define mmWriteProfileString(appname, valuename, pData) \
  16. WriteProfileString(appname, valuename, pData)
  17. #define mmGetProfileString(appname, valuename, pDefault, pResult, cbResult) \
  18. GetProfileString(appname, valuename, pDefault, pResult, cbResult)
  19. #define mmGetProfileStringA(appname, valuename, pDefault, pResult, cbResult) \
  20. GetProfileString(appname, valuename, pDefault, pResult, cbResult)
  21. #else
  22. /*
  23. * read a UINT from the profile, or return default if
  24. * not found.
  25. */
  26. UINT mmGetProfileInt(LPCTSTR appname, LPCTSTR valuename, INT uDefault);
  27. UINT mmGetProfileIntA(LPCSTR appname, LPCSTR valuename, INT uDefault);
  28. /*
  29. * write an INT to the profile, if it is not the
  30. * same as the value already there
  31. */
  32. VOID mmWriteProfileInt(LPCTSTR appname, LPCTSTR valuename, INT uValue);
  33. /*
  34. * read a string from the profile into pResult.
  35. * result is number of bytes written into pResult
  36. */
  37. DWORD
  38. mmGetProfileString(
  39. LPCTSTR appname,
  40. LPCTSTR valuename,
  41. LPCTSTR pDefault,
  42. LPTSTR pResult,
  43. int cbResult
  44. );
  45. DWORD
  46. mmGetProfileStringA(
  47. LPCSTR appname,
  48. LPCSTR valuename,
  49. LPCSTR pDefault,
  50. LPSTR pResult,
  51. int cbResult
  52. );
  53. /*
  54. * write a string to the profile
  55. */
  56. VOID mmWriteProfileString(LPCTSTR appname, LPCTSTR valuename, LPCTSTR pData);
  57. #endif