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.

106 lines
2.4 KiB

  1. /***
  2. *dos.h - definitions for MS-DOS interface routines
  3. *
  4. * Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Defines the structs and unions used for the direct DOS interface
  8. * routines; includes macros to access the segment and offset
  9. * values of far pointers, so that they may be used by the routines; and
  10. * provides function prototypes for direct DOS interface functions.
  11. *
  12. * [Public]
  13. *
  14. ****/
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif
  18. #ifndef _INC_DOS
  19. #define _INC_DOS
  20. #if !defined(_WIN32)
  21. #error ERROR: Only Win32 target supported!
  22. #endif
  23. #ifdef _MSC_VER
  24. /*
  25. * Currently, all MS C compilers for Win32 platforms default to 8 byte
  26. * alignment.
  27. */
  28. #pragma pack(push,8)
  29. #endif /* _MSC_VER */
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. /* Define _CRTIMP */
  34. #ifndef _CRTIMP
  35. #ifdef _DLL
  36. #define _CRTIMP __declspec(dllimport)
  37. #else /* ndef _DLL */
  38. #define _CRTIMP
  39. #endif /* _DLL */
  40. #endif /* _CRTIMP */
  41. /* Define __cdecl for non-Microsoft compilers */
  42. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  43. #define __cdecl
  44. #endif
  45. #if !defined(_WCHAR_T_DEFINED) && !defined(_NATIVE_WCHAR_T_DEFINED)
  46. typedef unsigned short wchar_t;
  47. #define _WCHAR_T_DEFINED
  48. #endif
  49. #ifndef _DISKFREE_T_DEFINED
  50. /* _getdiskfree structure (duplicated in DIRECT.H) */
  51. struct _diskfree_t {
  52. unsigned total_clusters;
  53. unsigned avail_clusters;
  54. unsigned sectors_per_cluster;
  55. unsigned bytes_per_sector;
  56. };
  57. #define _DISKFREE_T_DEFINED
  58. #endif
  59. /* File attribute constants */
  60. #define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */
  61. #define _A_RDONLY 0x01 /* Read only file */
  62. #define _A_HIDDEN 0x02 /* Hidden file */
  63. #define _A_SYSTEM 0x04 /* System file */
  64. #define _A_SUBDIR 0x10 /* Subdirectory */
  65. #define _A_ARCH 0x20 /* Archive file */
  66. /* Function prototypes */
  67. _CRTIMP unsigned __cdecl _getdiskfree(unsigned, struct _diskfree_t *);
  68. #ifdef _M_IX86
  69. void __cdecl _disable(void);
  70. void __cdecl _enable(void);
  71. #endif /* _M_IX86 */
  72. #if !__STDC__
  73. /* Non-ANSI name for compatibility */
  74. #define diskfree_t _diskfree_t
  75. #endif /* __STDC__ */
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79. #ifdef _MSC_VER
  80. #pragma pack(pop)
  81. #endif /* _MSC_VER */
  82. #endif /* _INC_DOS */