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.

82 lines
2.5 KiB

4 years ago
  1. /***************************************************************************\
  2. *
  3. * FID.H
  4. *
  5. * Copyright (C) Microsoft Corporation 1989.
  6. * All Rights reserved.
  7. *
  8. *****************************************************************************
  9. *
  10. * Program Description: THC Layer - Low Level File Access; Windows Version
  11. *
  12. * Dependencies: prior inclusion of misc.h and fm.h
  13. *
  14. *****************************************************************************
  15. *
  16. * Revision History: Created 03/03/89 by JohnSc
  17. 3/24/89 johnsc changed most functions to macros; removed includes
  18. 3/28/89 johnsc commented
  19. 7/11/90 leon Added FidPathOpenQfd
  20. 8/09/90 t-AlexC Changed from FILE.h
  21. 02/04/91 Maha changed ints to INT
  22. *
  23. *
  24. *****************************************************************************
  25. *
  26. * Known Bugs:
  27. *
  28. \***************************************************************************/
  29. /***************************************************************************\
  30. *
  31. * Defines
  32. *
  33. \***************************************************************************/
  34. /***************************************************************************\
  35. *
  36. * wRead and wWrite are used both as file permissions and as file open
  37. * flags. They can be |ed together.
  38. *
  39. * Implementation note: they are used as array indices
  40. *
  41. \***************************************************************************/
  42. #define wRead 0x0001
  43. #define wWrite 0x0002
  44. #define wReadOnly wRead
  45. #define wReadWrite ( wRead | wWrite )
  46. #define wRWMask ( wRead | wWrite )
  47. #define wShareRead 0x0004
  48. #define wShareWrite 0x0008
  49. #define wShareAll ( wShareRead | wShareWrite )
  50. #define wShareNone 0x000
  51. #define wShareMask ( wShareRead | wShareWrite )
  52. #define wShareShift 2
  53. /***************************************************************************\
  54. *
  55. * Types
  56. *
  57. \***************************************************************************/
  58. /***************************************************************************\
  59. *
  60. * Global Data
  61. *
  62. \***************************************************************************/
  63. extern RC_TYPE rcIOError;
  64. /***************************************************************************\
  65. *
  66. * Functions and Macros
  67. *
  68. \***************************************************************************/
  69. #define FUnlinkFm(fm) ((BOOL) (RcUnlinkFm(fm) == RC_Success))
  70. #define FCloseFid(fid) ((BOOL) (_lclose((HFILE) fid) == 0))
  71. #define FChSizeFid(fid, lcb) ((BOOL) (chsize((fid), (lcb)) == 0))
  72. #define RcGetIOError() (rcIOError)