Leaked source code of windows server 2003
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.

54 lines
1.8 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1993-1994
  4. *
  5. * TITLE: REG1632.H
  6. *
  7. * VERSION: 4.01
  8. *
  9. * AUTHOR: Tracy Sharpe
  10. *
  11. * DATE: 06 Apr 1994
  12. *
  13. * Win32 and MS-DOS compatibility macros for the Registry Editor.
  14. *
  15. ********************************************************************************
  16. *
  17. * CHANGE LOG:
  18. *
  19. * DATE REV DESCRIPTION
  20. * ----------- --- -------------------------------------------------------------
  21. * 06 Apr 1994 TCS Original implementation.
  22. *
  23. *******************************************************************************/
  24. #ifndef _INC_REG1632
  25. #define _INC_REG1632
  26. #ifndef LPCHAR
  27. typedef CHAR FAR* LPCHAR;
  28. #endif
  29. #define FILE_HANDLE HANDLE
  30. #define OPENREADFILE(pfilename, handle) \
  31. ((handle = CreateFile(pfilename, GENERIC_READ, FILE_SHARE_READ, \
  32. NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) != \
  33. INVALID_HANDLE_VALUE)
  34. #define OPENWRITEFILE(pfilename, handle) \
  35. ((handle = CreateFile(pfilename, GENERIC_WRITE, 0, \
  36. NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)) != \
  37. INVALID_HANDLE_VALUE)
  38. #define READFILE(handle, buffer, count, pnumbytes) \
  39. ReadFile(handle, buffer, count, pnumbytes, NULL)
  40. #define WRITEFILE(handle, buffer, count, pnumbytes) \
  41. WriteFile(handle, buffer, count, pnumbytes, NULL)
  42. #define SEEKCURRENTFILE(handle, count) \
  43. (SetFilePointer(handle, (LONG) count, NULL, FILE_CURRENT))
  44. #endif // _INC_REG1632