wintypes.pp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. unit wintypes;
  2. interface
  3. type
  4. Bool = WordBool;
  5. UINT = Word;
  6. LONG = LongInt;
  7. WPARAM = UINT;
  8. LPARAM = LONG;
  9. LRESULT = LONG;
  10. { The Win16 C headers define the P-prefixed types - PSTR, etc. as near pointers.
  11. Borland Pascal 7 defines them as far pointers (in other words, the same as the
  12. LP-prefixed type - LPSTR) We define them as the default pointer type for the
  13. current memory model. This means we'll be BP7 compatible in the large memory
  14. model (which is the only memory model supported by BP7).
  15. Also, using memory models other than 'large' under win16 is somewhat nasty and
  16. is better to be avoided. }
  17. PSTR = ^Char;
  18. NPSTR = ^Char; near;
  19. LPSTR = ^Char; far;
  20. LPCSTR = ^Char; far;
  21. { PBYTE is already defined in system }
  22. LPBYTE = ^Byte; far;
  23. PINT = ^SmallInt;
  24. LPINT = ^SmallInt; far;
  25. { PWORD is already defined in system }
  26. LPWORD = ^Word; far;
  27. PLONG = ^LONG;
  28. LPLONG = ^LONG; far;
  29. { PDWORD is already defined in system }
  30. LPDWORD = ^DWORD; far;
  31. LPVOID = FarPointer;
  32. FARPROC = FarPointer;
  33. TFarProc = FARPROC;
  34. PHANDLE = ^THandle;
  35. SPHANDLE = ^THandle; near;
  36. LPHANDLE = ^THandle; far;
  37. HGLOBAL = THandle;
  38. HLOCAL = THandle;
  39. TGlobalHandle = THandle;
  40. TLocalHandle = THandle;
  41. ATOM = UINT;
  42. TAtom = ATOM;
  43. HINST = THandle; { instead of HINSTANCE, to avoid conflict with var hInstance }
  44. HMODULE = HINST;
  45. const
  46. { GetWinFlags result mask values }
  47. WF_PMODE = $0001;
  48. WF_CPU286 = $0002;
  49. WF_CPU386 = $0004;
  50. WF_CPU486 = $0008;
  51. WF_STANDARD = $0010;
  52. WF_WIN286 = $0010;
  53. WF_ENHANCED = $0020;
  54. WF_WIN386 = $0020;
  55. WF_CPU086 = $0040;
  56. WF_CPU186 = $0080;
  57. WF_LARGEFRAME = $0100;
  58. WF_SMALLFRAME = $0200;
  59. WF_80x87 = $0400;
  60. WF_PAGING = $0800;
  61. WF_WLO = $8000;
  62. { ExitWindows values }
  63. EW_RESTARTWINDOWS = $42;
  64. { SetErrorMode() constants }
  65. SEM_FAILCRITICALERRORS = $0001;
  66. SEM_NOGPFAULTERRORBOX = $0002;
  67. SEM_NOOPENFILEERRORBOX = $8000;
  68. type
  69. LPCATCHBUF = ^CATCHBUF; far;
  70. CATCHBUF = array [0..8] of SmallInt;
  71. PCatchBuf = ^TCatchBuf;
  72. TCatchBuf = CATCHBUF;
  73. implementation
  74. end.