fpc/rtl/win16/wintypes.pp
nickysn f751b18754 + import the win16 task apis
git-svn-id: trunk@31542 -
2015-09-05 22:17:41 +00:00

122 lines
2.5 KiB
ObjectPascal

unit wintypes;
interface
type
Bool = WordBool;
UINT = Word;
LONG = LongInt;
WPARAM = UINT;
LPARAM = LONG;
LRESULT = LONG;
{ The Win16 C headers define the P-prefixed types - PSTR, etc. as near pointers.
Borland Pascal 7 defines them as far pointers (in other words, the same as the
LP-prefixed type - LPSTR) We define them as the default pointer type for the
current memory model. This means we'll be BP7 compatible in the large memory
model (which is the only memory model supported by BP7).
Also, using memory models other than 'large' under win16 is somewhat nasty and
is better to be avoided. }
PSTR = ^Char;
NPSTR = ^Char; near;
LPSTR = ^Char; far;
LPCSTR = ^Char; far;
{ PBYTE is already defined in system }
LPBYTE = ^Byte; far;
PINT = ^SmallInt;
LPINT = ^SmallInt; far;
{ PWORD is already defined in system }
LPWORD = ^Word; far;
PLONG = ^LONG;
LPLONG = ^LONG; far;
{ PDWORD is already defined in system }
LPDWORD = ^DWORD; far;
LPVOID = FarPointer;
FARPROC = FarPointer;
TFarProc = FARPROC;
PHANDLE = ^THandle;
SPHANDLE = ^THandle; near;
LPHANDLE = ^THandle; far;
HGLOBAL = THandle;
HLOCAL = THandle;
TGlobalHandle = THandle;
TLocalHandle = THandle;
ATOM = UINT;
TAtom = ATOM;
HINST = THandle; { instead of HINSTANCE, to avoid conflict with var hInstance }
HMODULE = HINST;
const
{ GetWinFlags result mask values }
WF_PMODE = $0001;
WF_CPU286 = $0002;
WF_CPU386 = $0004;
WF_CPU486 = $0008;
WF_STANDARD = $0010;
WF_WIN286 = $0010;
WF_ENHANCED = $0020;
WF_WIN386 = $0020;
WF_CPU086 = $0040;
WF_CPU186 = $0080;
WF_LARGEFRAME = $0100;
WF_SMALLFRAME = $0200;
WF_80x87 = $0400;
WF_PAGING = $0800;
WF_WLO = $8000;
{ ExitWindows values }
EW_RESTARTWINDOWS = $42;
{ SetErrorMode() constants }
SEM_FAILCRITICALERRORS = $0001;
SEM_NOGPFAULTERRORBOX = $0002;
SEM_NOOPENFILEERRORBOX = $8000;
type
LPCATCHBUF = ^CATCHBUF; far;
CATCHBUF = array [0..8] of SmallInt;
PCatchBuf = ^TCatchBuf;
TCatchBuf = CATCHBUF;
const
HINSTANCE_ERROR = HINST(32);
{ Windows Exit Procedure flag values }
WEP_SYSTEM_EXIT = 1;
WEP_FREE_DLL = 0;
type
LPSEGINFO = ^SEGINFO; far;
SEGINFO = record
offSegment: UINT;
cbSegment: UINT;
flags: UINT;
cbAlloc: UINT;
h: HGLOBAL;
alignShift: UINT;
reserved: array [0..1] of UINT;
end;
PSegInfo = ^TSegInfo;
TSegInfo = SEGINFO;
HTASK = THandle;
implementation
end.