oscalls.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 3k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. /***
  2. *oscalls.h - contains declarations of Operating System types and constants.
  3. *
  4. * Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Declares types and constants that are defined by the target OS.
  8. *
  9. * [Internal]
  10. *
  11. *Revision History:
  12. * 12-01-90  SRW Module created
  13. * 02-01-91  SRW Removed usage of NT header files (_WIN32)
  14. * 02-28-91  SRW Removed usage of ntconapi.h (_WIN32)
  15. * 04-09-91  PNT   Added _MAC_ definitions
  16. * 04-26-91  SRW   Disable min/max definitions in windows.h and added debug
  17. * definitions for DbgPrint and DbgBreakPoint(_WIN32)
  18. * 08-05-91  GJF Use win32.h instead of windows.h for now.
  19. * 08-20-91  JCR C++ and ANSI naming
  20. * 09-12-91  GJF Go back to using windows.h for win32 build.
  21. * 09-26-91  GJF Don't use error.h for Win32.
  22. * 11-07-91  GJF win32.h renamed to dosx32.h
  23. * 11-08-91  GJF Don't use windows.h, excpt.h. Add ntstatus.h.
  24. * 12-13-91  GJF Fixed so that exception stuff will build for Win32
  25. * 02-04-92  GJF Now must include ntdef.h to get LPSTR type.
  26. * 02-07-92  GJF Backed out change above, LPSTR also got added to
  27. * winnt.h
  28. * 03-30-92  DJM POSIX support.
  29. * 04-06-92  SRW Backed out 11-08-91 change and went back to using
  30. *                       windows.h only.
  31. * 05-12-92  DJM Moved POSIX code to it's own ifdef.
  32. * 08-01-92  SRW Let windows.h include excpt.h now that it replaces winxcpt.h
  33. * 09-30-92  SRW   Use windows.h for _POSIX_ as well
  34. * 02-23-93  SKS Update copyright to 1993
  35. * 09-06-94  CFW Remove Cruiser support.
  36. * 02-06-95  CFW DEBUG -> _DEBUG
  37. *       02-14-95  CFW   Clean up Mac merge.
  38. *       03-29-95  CFW   Add error message to internal headers.
  39. *       12-14-95  JWM   Add "#pragma once".
  40. *
  41. ****/
  42. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  43. #pragma once
  44. #endif
  45. #ifndef _INC_OSCALLS
  46. #define _INC_OSCALLS
  47. #ifndef _CRTBLD
  48. /*
  49.  * This is an internal C runtime header file. It is used when building
  50.  * the C runtimes only. It is not to be used as a public header file.
  51.  */
  52. #error ERROR: Use of C runtime library internal header file.
  53. #endif /* _CRTBLD */
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57. #ifdef _WIN32
  58. #ifdef NULL
  59. #undef NULL
  60. #endif
  61. #if defined(_DEBUG) && defined(_WIN32)
  62. void DbgBreakPoint(void);
  63. int DbgPrint(char *Format, ...);
  64. #endif /* _DEBUG && _WIN32 */
  65. #define NOMINMAX
  66. #include <windows.h>
  67. #undef NULL
  68. #ifndef NULL
  69. #ifdef __cplusplus
  70. #define NULL 0
  71. #else
  72. #define NULL ((void *)0)
  73. #endif
  74. #endif
  75. /* File time and date types */
  76. typedef struct _FTIME {         /* ftime */
  77.     unsigned short twosecs : 5;
  78.     unsigned short minutes : 6;
  79.     unsigned short hours   : 5;
  80. } FTIME;
  81. typedef FTIME *PFTIME;
  82. typedef struct _FDATE {         /* fdate */
  83.     unsigned short day    : 5;
  84.     unsigned short month   : 4;
  85.     unsigned short year    : 7;
  86. } FDATE;
  87. typedef FDATE *PFDATE;
  88. #else /* ndef _WIN32 */
  89. #ifdef _POSIX_
  90. #undef NULL
  91. #ifdef __cplusplus
  92. #define NULL 0
  93. #else
  94. #define NULL ((void *)0)
  95. #endif
  96. #include <windows.h>
  97. #else   /* ndef _POSIX_ */
  98. #if defined(_M_M68K) || defined(_M_MPPC)
  99. #else /* ndef defined(_M_M68K) || defined(_M_MPPC) */
  100. #error ERROR - ONLY WIN32, POSIX, OR MAC TARGET SUPPORTED!
  101. #endif  /* _POSIX_ */
  102. #endif /* defined(_M_M68K) || defined(_M_MPPC) */
  103. #endif /* _WIN32 */
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107. #endif /* _INC_OSCALLS */