Source code of Windows XP (NT5)
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.

70 lines
2.8 KiB

  1. /*****************************************************************************
  2. * *
  3. * FILEOFF.H *
  4. * *
  5. * Copyright (C) Microsoft Corporation 1995. *
  6. * All Rights reserved. *
  7. * *
  8. ******************************************************************************
  9. * *
  10. * Module Intent *
  11. * *
  12. * File Offset data type to replace using LONG for file offsets to handle *
  13. * files larger than 4 gigs in size. *
  14. * *
  15. ******************************************************************************
  16. * *
  17. * Current Owner: davej *
  18. *****************************************************************************/
  19. /*****************************************************************************
  20. *
  21. * Created 07/28/95 - davej
  22. *
  23. *****************************************************************************/
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. #ifndef __FILEOFF_H__
  28. #define __FILEOFF_H__
  29. #pragma pack(1)
  30. typedef struct _fileoffset_t
  31. {
  32. DWORD dwOffset;
  33. DWORD dwHigh;
  34. } FILEOFFSET;
  35. #pragma pack()
  36. #endif // __FILEOFF_H__
  37. // Advance byte pointer past address (pointer must be at start of address)
  38. #define ADVANCE_FO(sz) {while ((*(sz))&0x80) (sz)++; (sz)++;}
  39. extern FILEOFFSET foNil;
  40. extern FILEOFFSET foMax;
  41. extern FILEOFFSET foMin;
  42. extern FILEOFFSET foInvalid;
  43. FILEOFFSET PASCAL FAR EXPORT_API MakeFo(DWORD, DWORD);
  44. FILEOFFSET PASCAL FAR EXPORT_API FoFromSz(LPBYTE);
  45. WORD PASCAL FAR EXPORT_API FoToSz(FILEOFFSET, LPBYTE);
  46. WORD PASCAL FAR EXPORT_API LenSzFo(LPBYTE);
  47. FILEOFFSET FAR EXPORT_API FoAddFo(FILEOFFSET, FILEOFFSET);
  48. FILEOFFSET FAR EXPORT_API FoSubFo(FILEOFFSET, FILEOFFSET);
  49. FILEOFFSET FAR EXPORT_API FoAddDw(FILEOFFSET, DWORD);
  50. DWORD FAR EXPORT_API DwSubFo(FILEOFFSET, FILEOFFSET);
  51. BOOL PASCAL FAR EXPORT_API FoIsNil(FILEOFFSET);
  52. BOOL PASCAL FAR EXPORT_API FoEquals(FILEOFFSET, FILEOFFSET);
  53. FILEOFFSET FAR EXPORT_API FoMultFo(FILEOFFSET fo1, FILEOFFSET fo2);
  54. FILEOFFSET PASCAL FAR EXPORT_API FoMultDw(DWORD dw1, DWORD dw2);
  55. short int PASCAL FAR EXPORT_API FoCompare(FILEOFFSET, FILEOFFSET);
  56. #ifdef __cplusplus
  57. }
  58. #endif