home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / tpw / doc / winprocs.pas < prev    next >
Pascal/Delphi Source File  |  1991-05-20  |  71KB  |  1,414 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Turbo Pascal Runtime Library                    }
  5. {       Windows API Interface Unit                      }
  6. {                                                       }
  7. {       Copyright (c) 1991 Borland International        }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit WinProcs;
  12.  
  13. interface
  14.  
  15. uses WinTypes;
  16.  
  17. function AccessResource(Instance, ResInfo: THandle): Integer;
  18. function AddAtom(Str: PChar): TAtom;
  19. function AddFontResource(Filename: PChar): Integer;
  20. procedure AdjustWindowRect(var Rect: TRect; Style: LongInt; Menu: Bool);
  21. procedure AdjustWindowRectEx(var Rect: TRect; Style: LongInt; Menu: Bool;
  22.   ExtStyle: LongInt);
  23. function AllocCStoDSAlias(Selector: Word): Word;
  24. function AllocDStoCSAlias(Selector: Word): Word;
  25. function AllocResource(Instance: THandle; ResInfo: THandle;
  26.   Size: LongInt): THandle;
  27. function AllocSelector(Selector: Word): Word;
  28. procedure AnimatePalette(Palette: HPalette; StartIndex,    NumEntires: Word; 
  29.   var PaletteColors);
  30. function AnsiLower(Str: PChar): PChar;
  31. function AnsiLowerBuff(Str: PChar; Length: Word): Word;
  32. function AnsiNext(CurrentChar: PChar): PChar;
  33. function AnsiPrev(Start, CurrentChar: PChar): PChar;
  34. function AnsiToOem(AnsiStr, OemStr: PChar): Integer;
  35. procedure AnsiToOemBuff(AnsiStr, OemStr: PChar; Length: Integer);
  36. function AnsiUpper(Str: PChar): PChar;
  37. function AnsiUpperBuff(Str: PChar; Length: Word): Word;
  38. function AnyPopup: Bool;
  39. function AppendMenu(Menu: HMenu; Flags, IDNewItem: Word; 
  40.   NewItem: PChar): Bool;
  41. function Arc(DC: HDC; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer): Bool;
  42. function ArrangeIconicWindows(Wnd: HWnd): Word;
  43. function BeginDeferWindowPos(NumWindows: Integer): THandle;
  44. function BeginPaint(Wnd: HWnd; var Paint: TPaintStruct): HDC;
  45. function BitBlt(DestDC: HDC; X, Y, nWidth, Height: Integer; SrcDC: HDC; 
  46.   XSrc, YSrc: Integer; Rop: LongInt): Bool;
  47. procedure BringWindowToTop(Wnd: HWnd);
  48. function BuildCommDCB(Def: PChar; var DCB: TDCB): Integer;
  49. function CallMsgFilter(var Msg: TMsg; Code: Integer): Bool;
  50. function CallWindowProc(PrevWndFunc: TFarProc; Wnd: HWnd; Msg, wParam: Word; 
  51.   lParam: LongInt): LongInt;
  52. function Catch(var CatchBuf: TCatchBuf): Integer;
  53. function ChangeClipboardChain(Wnd, WndNext: HWnd): Bool;
  54. function ChangeMenu(A: HMenu; B: Word; C: PChar; D: Word; E: Word): Bool;
  55. function ChangeSelector(DestSelector, SourceSelector: Word): Word;
  56. procedure CheckDlgButton(Dlg: HWnd; IDButton: Integer; Check: Word);
  57. function CheckMenuItem(Menu: HMenu; IDCheckItem, Check: Word): Bool;
  58. procedure CheckRadioButton(Dlg: HWnd; IDFirstButton, IDLastButton,
  59.   IDCheckButton: Integer);
  60. function ChildWindowFromPoint(Wnd: HWnd; Point: TPoint): HWnd;
  61. function Chord(DC: HDC; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer): Bool;
  62. function ClearCommBreak(Cid: Integer): Integer;
  63. procedure ClientToScreen(Wnd: HWnd; var Point: TPoint);
  64. procedure ClipCursor(Rect: PRect);
  65. function CloseClipboard: Bool;
  66. function CloseComm(Cid: Integer): Integer;
  67. function CloseMetaFile(DC: THandle): THandle;
  68. procedure CloseSound;
  69. procedure CloseWindow(Wnd: HWnd);
  70. function CombineRgn(DestRgn, SrcRgn1, SrcRgn2: HRgn; 
  71.   CombineMode: Integer): Integer;
  72. function CopyMetaFile(SrcMetaFile: THandle; FileName: PChar): THandle;
  73. procedure CopyRect(var DestRect, SourceRect: TRect);
  74. function CountClipboardFormats: Integer;
  75. function CountVoiceNotes(Voice: Integer): Integer;
  76. function CreateBitmap(Width, Height: Integer; Planes, BitCount: Byte;
  77.   Bits: Pointer): HBitmap;
  78. function CreateBitmapIndirect(var Bitmap: TBitmap): HBitmap;
  79. function CreateBrushIndirect(var LogBrush: TLogBrush): HBrush;
  80. procedure CreateCaret(Wnd: HWnd; Bitmap: HBitmap;
  81.   Width, Height: Integer);
  82. function CreateCompatibleBitmap(DC: HDC; Width, Height: Integer): HBitmap;
  83. function CreateCompatibleDC(DC: HDC): HDC;
  84. function CreateCursor(Instance: THandle; Xhotspot, Yhotspot: Integer;
  85.   Width, Height: Integer; ANDbitPlane, XORbitPlane: Pointer): HCursor;
  86. function CreateDC(DriverName, DeviceName, OutPut: PChar;
  87.   InitData: Pointer): HDC;
  88. function CreateDialog(Instance: THandle; TemplateName: PChar;
  89.   WndParent: HWnd; DialogFunc: TFarProc): HWnd;
  90. function CreateDialogIndirect(Instance: THandle; DialogTemplate: Pointer;
  91.   WndParent: HWnd; DialogFunc: TFarProc): HWnd;
  92. function CreateDialogIndirectParam(Instance: THandle;
  93.   DialogTemplate: Pointer; WndParent: HWnd; DialogFunc: TFarProc;
  94.   InitParam: LongInt): HWnd;
  95. function CreateDialogParam(Instance: THandle; TemplateName: PChar;
  96.   WndParent: HWnd; DialogFunc: TFarProc; InitParam: LongInt): HWnd;
  97. function CreateDIBitmap(DC: HDC; var InfoHeader: TBitmapInfoHeader;
  98.   dwUsage: LongInt; InitBits: PChar; var InitInfo: TBitmapInfo;
  99.   wUsage: Word): HBitmap;
  100. function CreateDIBPatternBrush(PackedDIB: THandle; Usage: Word): HBrush;
  101. function CreateDiscardableBitmap(DC: HDC; Width, Height: Integer): HBitmap;
  102. function CreateEllipticRgn(X1, Y1, X2, Y2: Integer): HRgn;
  103. function CreateEllipticRgnIndirect(var Rect: TRect): HRgn;
  104. function CreateFont(Height, Width, Escapement, Orientation,
  105.   Weight: Integer; Italic, Underline, StrikeOut, CharSet, OutputPrecision, 
  106.   ClipPrecision, Quality, PitchAndFamily: Byte;    Facename: PChar): HFont;
  107. function CreateFontIndirect(var LogFont: TLogFont): HFont;
  108. function CreateHatchBrush(Index: Integer; Color: TColorRef): HBrush;
  109. function CreateIC(DriverName, DeviceName, Output: PChar; 
  110.   InitData: Pointer): HDC;
  111. function CreateIcon(Instance: THandle; Width, Height: Integer;
  112.   Planes, BitsPixel: Byte; ANDbits, XORbits: Pointer): HIcon;
  113. function CreateMenu: HMenu;
  114. function CreateMetaFile(Filename: PChar): THandle;
  115. function CreatePalette(var LogPalette: TLogPalette): HPalette;
  116. function CreatePatternBrush(Bitmap: HBitmap): HBrush;
  117. function CreatePen(PenStyle, Width: Integer; Color: TColorRef): HPen;
  118. function CreatePenIndirect(var LogPen: TLogPen): HPen;
  119. function CreatePolygonRgn(var Points; Count, PolyFillMode: Integer): HRgn;
  120. function CreatePolyPolygonRgn(var Points; var PolyCounts; Count, 
  121.   PolyFillMode: Integer): HRgn;
  122. function CreatePopupMenu: HMenu;
  123. function CreateRectRgn(X1, Y1, X2, Y2: Integer): HRgn;
  124. function CreateRectRgnIndirect(var Rect: TRect): HRgn;
  125. function CreateRoundRectRgn(X1, Y1, X2, Y2, X3, Y3: Integer): HRgn;
  126. function CreateSolidBrush(Color: TColorRef): HBrush;
  127. function CreateWindow(ClassName, WindowName: PChar; Style: LongInt;
  128.   X, Y, Width, Height: Integer; WndParent: HWnd; Menu: HMenu;
  129.   Instance: THandle; Param: Pointer): HWnd;
  130. function CreateWindowEx(ExStyle: LongInt; ClassName, WindowName: PChar;
  131.   Style: LongInt; X, Y, Width, Height: Integer; WndParent: HWnd;
  132.   Menu: HMenu; Instance: THandle; Param: Pointer): HWnd;
  133. procedure DebugBreak;
  134. function DefDlgProc(Dlg: HWnd; Msg, wParam: Word; lParam: LongInt): LongInt;
  135. function DeferWindowPos(WinPosInfo: THandle; Wnd, WndInsertAfter: HWnd;
  136.   x, y, cx, cy: Integer; Flags: Word): THandle;
  137. function DefFrameProc(Wnd, WndMDIClient: HWnd; Msg, wParam: Word; 
  138.   lParam: LongInt): LongInt;
  139. function DefHookProc(Code: Integer; wParam: Word; lParam: LongInt;
  140.   lpfnNextHook: TFarProc): LongInt;
  141. function DefineHandleTable(Offset: Word): Bool;
  142. function DefMDIChildProc(Wnd: HWnd; Msg, wParam: Word;
  143.   lParam: LongInt): LongInt;
  144. function DefWindowProc(Wnd: HWnd; Msg, wParam: Word; 
  145.   lParam: LongInt): LongInt;
  146. function DeleteAtom(AnAtom: TAtom): TAtom;
  147. function DeleteDC(DC: HDC): Bool;
  148. function DeleteMenu(Menu: HMenu; Position, Flags: Word): Bool;
  149. function DeleteMetaFile(MF: THandle): Bool;
  150. function DeleteObject(Handle: THandle): Bool;
  151. procedure DestroyCaret;
  152. function DestroyCursor(Cursor: HCursor): Bool;
  153. function DestroyIcon(Icon: HIcon): Bool;
  154. function DestroyMenu(Menu: HMenu): Bool;
  155. function DestroyWindow(Wnd: HWnd): Bool;
  156. function DialogBox(Instance: THandle; Templatename: PChar;
  157.   WndParent: HWnd; DialogFunc: TFarProc): Integer;
  158. function DialogBoxIndirect(Instance, DialogTemplate: THandle; WndParent: HWnd; 
  159.   DialogFunc: TFarProc): Integer;
  160. function DialogBoxIndirectParam(Instance, DialogTemplate: THandle;
  161.   WndParent: HWnd; DialogFunc: TFarProc; InitParam: LongInt): Integer;
  162. function DialogBoxParam(Instance: THandle; TemplateName: PChar;
  163.   WndParent: HWnd; DialogFunc: TFarProc; InitParam: LongInt): Integer;
  164. function DispatchMessage(var Msg: TMsg): LongInt;
  165. function DlgDirList(Dlg: HWnd; PathSpec: PChar; IDListBox,
  166.   IDStaticPath: Integer; Filetype: Word): Integer;
  167. function DlgDirListComboBox(Dlg: HWnd; PathSpec: PChar; IDComboBox,
  168.  IDStaticText: Integer; Filetype: Word): Integer;
  169. function DlgDirSelect(Dlg: HWnd; Str: PChar; IDListBox: Integer): Bool;
  170. function DlgDirSelectComboBox(Dlg: HWnd; Str: PChar;
  171.   IDComboBox: Integer): Bool;
  172. procedure DOS3Call;
  173. function DPtoLP(DC: HDC; var Points; Count: Integer): Bool;
  174. procedure DrawFocusRect(DC: HDC; var Rect: TRect);
  175. function DrawIcon(DC: HDC; X, Y: Integer; Icon: HIcon): Bool;
  176. procedure DrawMenuBar(Wnd: HWnd);
  177. function DrawText(DC: HDC; Str: PChar; Count: Integer; var Rect: TRect;
  178.   Format: Word): Integer;
  179. function Ellipse(DC: HDC; X1, Y1, X2, Y2: Integer): Bool;
  180. function EmptyClipboard: Bool;
  181. function EnableHardwareInput(EnableInput: Bool): Bool;
  182. function EnableMenuItem(Menu: HMenu; IDEnableItem: Word;
  183.   Enable: Word): Bool;
  184. function EnableWindow(Wnd: HWnd; Enable: Bool): Bool;
  185. procedure EndDeferWindowPos(WinPosInfo: THandle);
  186. procedure EndDialog(Dlg: HWnd; Result: Integer);
  187. procedure EndPaint(Wnd: HWnd; var Paint: TPaintStruct);
  188. function EnumChildWindows(WndParent: HWnd; EnumFunc: TFarProc;
  189.   lParam: LongInt): Bool;
  190. function EnumClipboardFormats(Format: Word): Word;
  191. function EnumFonts(DC: HDC; Facename: PChar; FontFunc: TFarProc;
  192.   Data: Pointer): Integer;
  193. function EnumMetaFile(DC: HDC; MF: THandle; CallbackFunc: TFarProc;
  194.   ClientData: Pointer): Bool;
  195. function EnumObjects(DC: HDC; ObjectType: Integer; ObjectFunc: TFarProc;
  196.   Data: Pointer): Integer;
  197. function EnumProps(Wnd: HWnd; EnumFunc: TFarProc): Integer;
  198. function EnumTaskWindows(Task: THandle; EnumFunc: TFarProc; 
  199.   lParam: LongInt): Bool;
  200. function EnumWindows(EnumFunc: TFarProc; lParam: LongInt): Bool;
  201. function EqualRect(var Rect1, Rect2: TRect): Bool;
  202. function EqualRgn(SrcRgn1, SrcRgn2: HRgn): Bool;
  203. function Escape(DC: HDC; Escape, Count: Integer; InData, 
  204.   OutData: Pointer): Integer;
  205. function EscapeCommFunction(Cid: Integer; Func: Integer): Integer;
  206. function ExcludeClipRect(DC: HDC; X1, Y1, X2, Y2: Integer): Integer;
  207. function ExcludeUpdateRgn(DC: HDC; Wnd: HWnd): Integer;
  208. function ExitWindows(Reserved: LongInt; ReturnCode: Word): Bool;
  209. function ExtFloodFill(DC: HDC; X, Y: Integer; Color: TColorRef;
  210.   FillType: Word): Bool;
  211. function ExtTextOut(DC: HDC; X, Y: Integer; Options: Word;
  212.   Rect: PRect; Str: PChar; Count: Word; Dx: PInteger): Bool;
  213. procedure FatalAppExit(Action: Word; MessageText: PChar);
  214. procedure FatalExit(Code: Integer);
  215. function FillRect(DC: HDC; var Rect: TRect; Brush: HBrush): Integer;
  216. function FillRgn(DC: HDC; Rgn: HRgn; Brush: HBrush): Bool;
  217. function FindAtom(Str: PChar): TAtom;
  218. function FindResource(Instance: THandle; Name, ResType: PChar): THandle;
  219. function FindWindow(Classname, WindowName: PChar): HWnd;
  220. function FlashWindow(Wnd: HWnd; Invert: Bool): Bool;
  221. function FloodFill(DC: HDC; X, Y: Integer; Color: TColorRef): Bool;
  222. function FlushComm(Cid, Queue: Integer): Integer;
  223. procedure FrameRect(DC: HDC; var Rect: TRect; Brush: HBrush);
  224. function FrameRgn(DC: HDC; Rgn: HRgn; Brush: HBrush; Width,
  225.   Height: Integer): Bool;
  226. procedure FreeLibrary(LibModule: THandle);
  227. function FreeModule(Module: THandle): Bool;
  228. procedure FreeProcInstance(Proc: TFarProc);
  229. function FreeResource(ResData: THandle): Bool;
  230. function FreeSelector(Selector: Word): Word;
  231. function GetActiveWindow: HWnd;
  232. function GetAspectRatioFilter(DC: HDC): LongInt;
  233. function GetAsyncKeyState(Key: Integer): Integer;
  234. function GetAtomHandle(AnAtom: TAtom): THandle;
  235. function GetAtomName(AnAtom: TAtom; Buffer: PChar; Size: Integer): Word;
  236. function GetBitmapBits(Bitmap: HBitmap; Count: LongInt; 
  237.   Bits: Pointer): LongInt;
  238. function GetBitmapDimension(Bitmap: HBitmap): LongInt;
  239. function GetBkColor(DC: HDC): LongInt;
  240. function GetBkMode(DC: HDC): Integer;
  241. function GetBrushOrg(DC: HDC): LongInt;
  242. function GetCapture: HWnd;
  243. function GetCaretBlinkTime: Word;
  244. procedure GetCaretPos(var Point: TPoint);
  245. function GetCharWidth(DC: HDC; FirstChar, LastChar: Word;
  246.   var Buffer): Bool;
  247. function GetClassInfo(Instance: THandle; ClassInfo: PChar;
  248.   var WndClass: TWndClass): Bool;
  249. function GetClassLong(Wnd: HWnd; Index: Integer): LongInt;
  250. function GetClassName(Wnd: HWnd; ClassName: PChar; 
  251.   MaxCount: Integer): Integer;
  252. function GetClassWord(Wnd: HWnd; Index: Integer): Word;
  253. procedure GetClientRect(Wnd: HWnd; var Rect: TRect);
  254. function GetClipboardData(Format: Word): THandle;
  255. function GetClipboardFormatName(Format: Word; FormatName: PChar; 
  256.   MaxCount: Integer): Integer;
  257. function GetClipboardOwner: HWnd;
  258. function GetClipboardViewer: HWnd;
  259. function GetClipBox(DC: HDC; var Rect: TRect): Integer;
  260. function GetCodeHandle(Proc: TFarProc): THandle;
  261. procedure GetCodeInfo(Proc: TFarProc; SegInfo: Pointer);
  262. function GetCommError(Cid: Integer; var Stat: TComStat): Integer;
  263. function GetCommEventMask(Cid, EvtMask: Integer): Word;
  264. function GetCommState(Cid: Integer; var DCB: TDCB): Integer;
  265. function GetCurrentPDB: Word;
  266. function GetCurrentPosition(DC: HDC): LongInt;
  267. function GetCurrentTask: THandle;
  268. function GetCurrentTime: LongInt;
  269. procedure GetCursorPos(var Point: TPoint);
  270. function GetDC(Wnd: HWnd): HDC;
  271. function GetDCOrg(DC: HDC): LongInt;
  272. function GetDesktopHwnd: HWnd;
  273. function GetDesktopWindow: HWnd;
  274. function GetDeviceCaps(DC: HDC; Index: Integer): Integer;
  275. function GetDialogBaseUnits: LongInt;
  276. function GetDIBits(DC: HDC; Bitmap: HBitmap; StartScan, NumScans: Word; 
  277.   Bits: Pointer; var BitInfo: TBitmapInfo; Usage: Word): Integer;
  278. function GetDlgCtrlID(Wnd: HWnd): Integer;
  279. function GetDlgItem(Dlg: HWnd; IDDlgItem: Integer): HWnd;
  280. function GetDlgItemInt(Dlg: HWnd; IDDlgItem: Integer;
  281.   Translate: PBool; Signed: Bool): Word;
  282. function GetDlgItemText(Dlg: HWnd; IDDlgItem: Integer; Str: PChar;
  283.   MaxCount: Integer): Integer;
  284. function GetDOSEnvironment: PChar;
  285. function GetDoubleClickTime: Word;
  286. function GetDriveType(Drive: Integer): Word;
  287. function GetEnvironment(PortName: PChar; Environ: Pointer; 
  288.   MaxCount: Word): Integer;
  289. function GetFocus: HWnd;
  290. function GetFreeSpace(Flag: Word): LongInt;
  291. function GetInputState: Bool;
  292. function GetInstanceData(Instance: THandle; Data: Word; 
  293.   Count: Integer): Integer;
  294. function GetKBCodePage: Integer;
  295. procedure GetKeyboardState(var KeyState: TKeyboardState);
  296. function GetKeyboardType(TypeFlag: Integer): Integer;
  297. function GetKeyNameText(lParam: LongInt; Buffer: PChar; 
  298.   Size: Integer): Integer;
  299. function GetKeyState(VirtKey: Integer): Integer;
  300. function GetLastActivePopup(Owner: HWnd): HWnd;
  301. function GetMapMode(DC: HDC): Integer;
  302. function GetMenu(Wnd: HWnd): HMenu;
  303. function GetMenuCheckMarkDimensions: LongInt;
  304. function GetMenuItemCount(Menu: HMenu): Word;
  305. function GetMenuItemID(Menu: HMenu; Pos: Integer): Word;
  306. function GetMenuState(Menu: HMenu; Id, Flags: Word): Word;
  307. function GetMenuString(Menu: HMenu; IDItem: Word; Str: PChar; 
  308.   MaxCount: Integer; Flag: Word): Integer;
  309. function GetMessage(var Msg: TMsg; Wnd: HWnd; MsgFilterMin,
  310.   MsgFilterMax: Word): Bool;
  311. function GetMessagePos: LongInt;
  312. function GetMessageTime: LongInt;
  313. function GetMetaFile(Filename: PChar): THandle;
  314. function GetMetaFileBits(MF: THandle): THandle;
  315. function GetModuleFileName(Module: THandle; Filename: PChar; Size: Integer): Integer;
  316. function GetModuleHandle(ModuleName: PChar): THandle;
  317. function GetModuleUsage(Module: THandle): Integer;
  318. function GetNearestColor(DC: HDC; Color: TColorRef): TColorRef;
  319. function GetNearestPaletteIndex(Palette: HPalette; Color: TColorRef): Word;
  320. function GetNextDlgGroupItem(Dlg, Ctl: HWnd; Previous: Bool): HWnd;
  321. function GetNextDlgTabItem(Dlg, Ctl: HWnd; Previous: Bool): HWnd;
  322. function GetNextWindow(Wnd: HWnd; Flag: Word): HWnd;
  323. function GetNumTasks: Word;
  324. function GetObject(hObject: THandle; Count: Integer;
  325.   lpObject: Pointer): Integer;
  326. function GetPaletteEntries(Palette: HPalette; StartIndex, NumEntries: Word;
  327.   var PaletteEntries): Word;
  328. function GetParent(Wnd: HWnd): HWnd;
  329. function GetPixel(DC: HDC; X, Y: Integer): TColorRef;
  330. function GetPolyFillMode(DC: HDC): Integer;
  331. function GetPriorityClipboardFormat(var PriorityList;
  332.   Count: Integer): Integer;
  333. function GetPrivateProfileInt(ApplicationName, KeyName: PChar; 
  334.   Default: Integer; FileName: PChar): Integer;
  335. function GetPrivateProfileString(ApplicationName, KeyName: PChar; 
  336.   Default: PChar; ReturnedString: PChar; Size: Integer; 
  337.   FileName: PChar): Integer;
  338. function GetProcAddress(Module: THandle; ProcName: PChar): TFarProc;
  339. function GetProfileInt(AppName, KeyName: PChar; 
  340.   Default: Integer): Word;
  341. function GetProfileString(AppName, KeyName, Default, ReturnedString: PChar; 
  342.   Size: Integer): Integer;
  343. function GetProp(Wnd: HWnd; Str: PChar): THandle;
  344. function GetRgnBox(Rgn: HRgn; var Rect: TRect): Integer;
  345. function GetROP2(DC: HDC): Integer;
  346. function GetScrollPos(Wnd: HWnd; Bar: Integer): Integer;
  347. procedure GetScrollRange(Wnd: HWnd; Bar: Integer; var MinPos,
  348.   MaxPos: Integer);
  349. function GetStockObject(Index: Integer): THandle;
  350. function GetStretchBltMode(DC: HDC): Integer;
  351. function GetSubMenu(Menu: HMenu; Pos: Integer): HMenu;
  352. function GetSysColor(Index: Integer): TColorRef;
  353. function GetSysModalWindow: HWnd;
  354. function GetSystemDirectory(Buffer: PChar; Size: Word): Word;
  355. function GetSystemMenu(Wnd: HWnd; bRevert: Bool): HMenu;
  356. function GetSystemMetrics(Index: Integer): Integer;
  357. function GetSystemPaletteEntries(DC: HDC; StartIndex, NumEntries: Word; 
  358.   var PaletteEntries): Word;
  359. function GetSystemPaletteUse(DC: HDC): Word;
  360. function GetTabbedTextExtent(DC: HDC; Str: PChar; Count: Integer; 
  361.   TabPostions: Integer; var TabStopPostions): LongInt;
  362. function GetTempDrive(DriveLetter: Char): Char;
  363. function GetTempFileName(DriveLetter: Char; PrefixString: PChar; 
  364.   Unique: Word; TempFileName: PChar): Integer;
  365. function GetTextAlign(DC: HDC): Word;
  366. function GetTextCharacterExtra(DC: HDC): Integer;
  367. function GetTextColor(DC: HDC): TColorRef;
  368. function GetTextExtent(DC: HDC; Str: PChar; Count: Integer): LongInt;
  369. function GetTextFace(DC: HDC; Count: Integer; Facename: PChar): Integer;
  370. function GetTextMetrics(DC: HDC; var Metrics: TTextMetric): Bool;
  371. function GetThresholdEvent: PInteger;
  372. function GetThresholdStatus: Integer;
  373. function GetTickCount: LongInt;
  374. function GetTopWindow(Wnd: HWnd): HWnd;
  375. function GetUpdateRect(Wnd: HWnd; var Rect: TRect; Erase: Bool): Bool;
  376. function GetUpdateRgn(Wnd: HWnd; Rgn: HRgn; Erase: Bool): Integer;
  377. function GetVersion: Word;
  378. function GetViewportExt(DC: HDC): LongInt;
  379. function GetViewportOrg(DC: HDC): LongInt;
  380. function GetWindow(Wnd: HWnd; Cmd: Word): HWnd;
  381. function GetWindowDC(Wnd: HWnd): HDC;
  382. function GetWindowExt(DC: HDC): LongInt;
  383. function GetWindowLong(Wnd: HWnd; Index: Integer): LongInt;
  384. function GetWindowOrg(DC: HDC): LongInt;
  385. procedure GetWindowRect(Wnd: HWnd; var Rect: TRect);
  386. function GetWindowsDirectory(Buffer: PChar; Size: Word): Word;
  387. function GetWindowTask(Wnd: HWnd): THandle;
  388. function GetWindowText(Wnd: HWnd; Str: PChar; 
  389.   MaxCount: Integer): Integer;
  390. function GetWindowTextLength(Wnd: HWnd): Integer;
  391. function GetWindowWord(Wnd: HWnd; Index: Integer): Word;
  392. function GetWinFlags: LongInt;
  393. function GlobalAddAtom(Str: PChar): TAtom;
  394. function GlobalAlloc(Flags: Word; Bytes: LongInt): THandle;
  395. function GlobalCompact(MinFree: LongInt): LongInt;
  396. function GlobalDeleteAtom(AnAtom: TAtom): TAtom;
  397. function GlobalDiscard(Mem: THandle): THandle;
  398. function GlobalDosAlloc(Bytes: LongInt): LongInt;
  399. function GlobalDosFree(Selector: Word): Word;
  400. function GlobalFindAtom(Str: PChar): TAtom;
  401. procedure GlobalFix(Mem: THandle);
  402. function GlobalFlags(Mem: THandle): Word;
  403. function GlobalFree(Mem: THandle): THandle;
  404. function GlobalGetAtomName(AnAtom: TAtom; Buffer: PChar; Size: Integer): Word;
  405. function GlobalHandle(Mem: Word): LongInt;
  406. function GlobalLock(Mem: THandle): Pointer;
  407. function GlobalLRUNewest(Mem: THandle): THandle;
  408. function GlobalLRUOldest(Mem: THandle): THandle;
  409. procedure GlobalNotify(NotifyProc: TFarProc);
  410. function GlobalPageLock(Selector: THandle): Word;
  411. function GlobalPageUnlock(Selector: THandle): Word;
  412. function GlobalReAlloc(Mem: THandle; Bytes: LongInt; Flags: Word): THandle;
  413. function GlobalSize(Mem: THandle): LongInt;
  414. function GlobalUnfix(Mem: THandle): Bool;
  415. function GlobalUnlock(Mem: THandle): Bool;
  416. function GlobalUnWire(Mem: THandle): Bool;
  417. function GlobalWire(Mem: THandle): Pointer;
  418. function GrayString(DC: HDC; Brush: HBrush; OutputFunc: TFarProc; 
  419.   Data: LongInt; Count, X, Y, Width, Height: Integer): Bool;
  420. procedure HideCaret(Wnd: HWnd);
  421. function HiliteMenuItem(Wnd: HWnd; Menu: HMenu; IDHilite, 
  422.   Hilite: Word): Bool;
  423. procedure InflateRect(var Rect: TRect; X, Y: Integer);
  424. function InitAtomTable(Size: Integer): Bool;
  425. function InSendMessage: Bool;
  426. function InsertMenu(Menu: HMenu; Position, Flags, IDNewItem: Word; 
  427.   NewItem: PChar): Bool;
  428. function IntersectClipRect(DC: HDC; X1, Y1, X2, Y2: Integer): Integer;
  429. function IntersectRect(var DestRect, Src1Rect, Src2Rect: TRect): Integer;
  430. procedure InvalidateRect(Wnd: HWnd; Rect: PRect; Erase: Bool);
  431. procedure InvalidateRgn(Wnd: HWnd; Rgn: HRgn; Erase: Bool);
  432. procedure InvertRect(DC: HDC; var Rect: TRect);
  433. function InvertRgn(DC: HDC; Rgn: HRgn): Bool;
  434. function IsCharAlpha(Chr: Char): Bool;
  435. function IsCharAlphaNumeric(Chr: Char): Bool;
  436. function IsCharLower(Chr: Char): Bool;
  437. function IsCharUpper(Chr: Char): Bool;
  438. function IsChild(WndParent, Wnd: HWnd): Bool;
  439. function IsClipboardFormatAvailable(Format: Word): Bool;
  440. function IsDialogMessage(Dlg: HWnd; var Msg: TMsg): Bool;
  441. function IsDlgButtonChecked(Wnd: HWnd; IDButton: Integer): Word;
  442. function IsIconic(Wnd: HWnd): Bool;
  443. function IsRectEmpty(var Rect: TRect): Bool;
  444. function IsTwoByteCharPrefix(Chr: Char): Bool;
  445. function IsWindow(Wnd: HWnd): Bool;
  446. function IsWindowEnabled(Wnd: HWnd): Bool;
  447. function IsWindowVisible(Wnd: HWnd): Bool;
  448. function IsZoomed(Wnd: HWnd): Bool;
  449. function KillTimer(Wnd: HWnd; IDEvent: Integer): Bool;
  450. procedure LimitEmsPages(Kbytes: LongInt);
  451. procedure LineDDA(X1, Y1, X2, Y2: Integer; LineFunc: TFarProc; 
  452.   Data: Pointer);
  453. function LineTo(DC: HDC; X, Y: Integer): Bool;
  454. function LoadAccelerators(Instance: THandle; TableName: PChar): THandle;
  455. function LoadBitmap(Instance: THandle; BitmapName: PChar): HBitmap;
  456. function LoadCursor(Instance: THandle; CursorName: PChar): HCursor;
  457. function LoadIcon(Instance: THandle; IconName: PChar): HIcon;
  458. function LoadLibrary(LibFileName: PChar): THandle;
  459. function LoadMenu(Instance: THandle; MenuName: PChar): HMenu;
  460. function LoadMenuIndirect(MenuTemplate: Pointer): HMenu;
  461. function LoadModule(ModuleName: PChar; ParameterBlock: Pointer): THandle;
  462. function LoadResource(Instance: THandle; ResInfo: THandle): THandle;
  463. function LoadString(Instance: THandle; ID: Word; Buffer: PChar; 
  464.   BufferMax: Integer): Integer;
  465. function LocalAlloc(Flags, Bytes: Word): THandle;
  466. function LocalCompact(MinFree: Word): Word;
  467. function LocalDiscard(Mem: THandle): THandle; 
  468. function LocalFlags(Mem: THandle): Word;
  469. function LocalFree(Mem: THandle): THandle;
  470. function LocalHandle(Mem: Word): THandle;
  471. function LocalInit(Segment, Start, EndPos: Word): Bool;
  472. function LocalLock(Mem: THandle): Pointer;
  473. function LocalNotify(NotifyProc: TFarProc): TFarProc;
  474. function LocalReAlloc(Mem: THandle; Bytes, Flags: Word): THandle;
  475. function LocalShrink(Seg: THandle; Size: Word): Word;
  476. function LocalSize(Mem: THandle): Word;
  477. function LocalUnlock(Mem: THandle): Bool;
  478. function LockData(Dummy: Integer): THandle;
  479. function LockResource(ResData: THandle): Pointer;
  480. function LockSegment(Segment: Word): THandle;
  481. function LPtoDP(DC: HDC; var Points; Count: Integer): Bool;
  482. function lstrcat(Str1, Str2: PChar): PChar;
  483. function lstrcmp(Str1, Str2: PChar): Integer;
  484. function lstrcmpi(Str1, Str2: PChar): Integer;
  485. function lstrcpy(Str1, Str2: PChar): PChar;
  486. function lstrlen(Str: PChar): Integer;
  487. function MakeProcInstance(Proc: TFarProc; Instance: THandle): TFarProc;
  488. procedure MapDialogRect(Dlg: HWnd; var Rect: TRect);
  489. function MapVirtualKey(Code, MapType: Word): Word;
  490. procedure MessageBeep(BeepType: Word);
  491. function MessageBox(WndParent: HWnd; Txt, Caption: PChar; 
  492.   TextType: Word): Integer;
  493. function ModifyMenu(Menu: HMenu; Position, Flags, IDNewItem: Word; 
  494.   NewItem: PChar): Bool;
  495. function MoveTo(DC: HDC; X, Y: Integer): LongInt;
  496. procedure MoveWindow(Wnd: HWnd; X, Y, Width, Height: Integer; Repaint: Bool);
  497. function MulDiv(Number: Integer; Numerator: Integer; 
  498.   Denominator: Integer): Integer;
  499. procedure NetBIOSCall;
  500. function OemKeyScan(OemChar: Word): LongInt;
  501. function OemToAnsi(OemStr, AnsiStr: PChar): Bool;
  502. procedure OemToAnsiBuff(OemStr, AnsiStr: PChar; Length: Integer);
  503. function OffsetClipRgn(DC: HDC; X, Y: Integer): Integer;
  504. procedure OffsetRect(var Rect: TRect; X, Y: Integer);
  505. function OffsetRgn(Rgn: HRgn; X, Y: Integer): Integer;
  506. function OffsetViewportOrg(DC: HDC; X, Y: Integer): LongInt;
  507. function OffsetWindowOrg(DC: HDC; X, Y: Integer): LongInt;
  508. function OpenClipboard(Wnd: HWnd): Bool;
  509. function OpenComm(ComName: PChar; InQueue, OutQueue: Word): Integer;
  510. function OpenFile(FileName: PChar; var ReOpenBuff: TOfStruct;
  511.   Style: Word): Integer;
  512. function OpenIcon(Wnd: HWnd): Bool;
  513. function OpenSound: Integer;
  514. procedure OutputDebugString(OutputString: PChar);
  515. function PaintRgn(DC: HDC; Rgn: HRgn): Bool;
  516. function PatBlt(DC: HDC; X, Y, Width, Height: Integer; Rop: LongInt): Bool;
  517. function PeekMessage(var Msg: TMsg; Wnd: HWnd; MsgFilterMin,
  518.   MsgFilterMax: Word; RemoveMsg: Word): Bool;
  519. function Pie(DC: HDC; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer): Bool;
  520. function PlayMetaFile(DC: HDC; MF: THandle): Bool;
  521. procedure PlayMetaFileRecord(DC: HDC; var HandleTable: THandleTable;
  522.   var MetaRecord: TMetaRecord; Handles: Word);
  523. function Polygon(DC: HDC; var Points; Count: Integer): Bool;
  524. function Polyline(DC: HDC; var Points; Count: Integer): Bool;
  525. function PolyPolygon(DC: HDC; var Points; var PolyCounts;
  526.   Count: Integer): Bool;
  527. function PostAppMessage(Task: THandle; Msg, wParam: Word; 
  528.   lParam: LongInt): Bool;
  529. function PostMessage(Wnd: HWnd; Msg, wParam: Word; lParam: LongInt): Bool;
  530. procedure PostQuitMessage(ExitCode: Integer);
  531. function PtInRect(var Rect: TRect; Point: TPoint): Bool;
  532. function PtInRegion(Rgn: HRgn; X, Y: Integer): Bool;
  533. function PtVisible(DC: HDC; X, Y: Integer): Bool;
  534. function ReadComm(Cid: Integer; Buf: PChar; Size: Integer): Integer;
  535. function RealizePalette(DC: HDC): Word;
  536. function Rectangle(DC: HDC; X1, Y1, X2, Y2: Integer): Bool;
  537. function RectInRegion(Rgn: HRgn; var Rect: TRect): Bool;
  538. function RectVisible(DC: HDC; var Rect: TRect): Bool;
  539. function RegisterClass(var WndClass: TWndClass): Bool;
  540. function RegisterClipboardFormat(FormatName: PChar): Word;
  541. function RegisterWindowMessage(Str: PChar): Word;
  542. procedure ReleaseCapture;
  543. function ReleaseDC(Wnd: HWnd; DC: HDC): Integer;
  544. function RemoveFontResource(Filename: PChar): Bool;
  545. function RemoveMenu(Menu: HMenu; Position, Flags: Word): Bool;
  546. function RemoveProp(Wnd: HWnd; Str: PChar): THandle;
  547. procedure ReplyMessage(Reply: LongInt);
  548. function ResizePalette(Palette: HPalette; NumEntries: Word): Bool;
  549. function RestoreDC(DC: HDC; SavedDC: Integer): Bool;
  550. function RoundRect(DC: HDC; X1, Y1, X2, Y2, X3, Y3: Integer): Bool;
  551. function SaveDC(DC: HDC): Integer;
  552. function ScaleViewportExt(DC: HDC; Xnum, Xdenom, Ynum, 
  553.   Ydenom: Integer): LongInt;
  554. function ScaleWindowExt(DC: HDC; Xnum, Xdenom, Ynum, Ydenom: Integer): LongInt;
  555. procedure ScreenToClient(Wnd: HWnd; var Point: TPoint);
  556. function ScrollDC(DC: HDC; dx, dy: Integer; var Scroll, Clip: TRect;
  557.   UpdateRgn: HRgn; UpdateRect: PRect): Bool;
  558. procedure ScrollWindow(Wnd: HWnd; XAmount, YAmount: Integer; Rect: PRect;
  559.   ClipRect: PRect);
  560. function SelectClipRgn(DC: HDC; Rgn: HRgn): Integer;
  561. function SelectObject(DC: HDC; hObject: THandle): THandle;
  562. function SelectPalette(DC: HDC; Palette: HPalette; 
  563.   ForceBackground: Bool): HPalette;
  564. function SendDlgItemMessage(Dlg: HWnd; IDDlgItem: Integer; Msg, wParam: Word; 
  565.   lParam: LongInt): LongInt;
  566. function SendMessage(Wnd: HWnd; Msg, wParam: Word; lParam: LongInt): LongInt;
  567. function SetActiveWindow(Wnd: HWnd): HWnd;
  568. function SetBitmapBits(Bitmap: HBitmap; Count: LongInt; Bits: Pointer): LongInt;
  569. function SetBitmapDimension(Bitmap: HBitmap; X, Y: Integer): LongInt;
  570. function SetBkColor(DC: HDC; Color: TColorRef): TColorRef;
  571. function SetBkMode(DC: HDC; BkMode: Integer): Integer;
  572. function SetBrushOrg(DC: HDC; X, Y: Integer): LongInt;
  573. function SetCapture(Wnd: HWnd): HWnd;
  574. procedure SetCaretBlinkTime(MSeconds: Word);
  575. procedure SetCaretPos(X, Y: Integer);
  576. function SetClassLong(Wnd: HWnd; Index: Integer; NewLong: LongInt): LongInt;
  577. function SetClassWord(Wnd: HWnd; Index: Integer; NewWord: Word): Word;
  578. function SetClipboardData(Format: Word; Mem: THandle): THandle;
  579. function SetClipboardViewer(Wnd: HWnd): HWnd;
  580. function SetCommBreak(Cid: Integer): Integer;
  581. function SetCommEventMask(Cid: Integer; EvtMask: Word): PWord;
  582. function SetCommState(var DCB: TDCB): Integer;
  583. function SetCursor(Cursor: HCursor): HCursor;
  584. procedure SetCursorPos(X, Y: Integer);
  585. function SetDIBits(DC: HDC; Bitmap: THandle; StartScan, NumScans: Word;
  586.   Bits: Pointer; var BitsInfo: TBitmapInfo; Usage: Word): Integer;
  587. function SetDIBitsToDevice(DC: HDC; DestX, DestY, Width, Height, SrcX, SrcY,
  588.   nStartScan, NumScans: Word; Bits: Pointer; var BitsInfo: TBitmapInfo;
  589.   Usage: Word): Integer;
  590. procedure SetDlgItemInt(Dlg: HWnd; IDDlgItem: Integer; Value: Word; 
  591.   Signed: Bool);
  592. procedure SetDlgItemText(Dlg: HWnd; IDDlgItem: Integer; Str: PChar);
  593. procedure SetDoubleClickTime(Count: Word);
  594. function SetEnvironment(PortName: PChar; Environ: Pointer; 
  595.   Count: Word): Integer;
  596. function SetErrorMode(Mode: Word): Word;
  597. function SetFocus(Wnd: HWnd): HWnd;
  598. function SetHandleCount(Number: Word): Word;
  599. procedure SetKeyboardState(var KeyState: TKeyboardState);
  600. function SetMapMode(DC: HDC; MapMode: Integer): Integer;
  601. function SetMapperFlags(DC: HDC; Flag: LongInt): LongInt;
  602. function SetMenu(Wnd: HWnd; Menu: HMenu): Bool;
  603. function SetMenuItemBitmaps(Menu: HMenu; Position, Flags: Word; 
  604.   BitmapUnchecked, BitmapChecked: HBitmap): Bool;
  605. function SetMessageQueue(Msg: Integer): Bool;
  606. function SetMetaFileBits(Mem: THandle): THandle;
  607. function SetPaletteEntries(Palette: HPalette; StartIndex, NumEntries: Word; 
  608.   var PaletteEntries): Word;
  609. function SetParent(WndChild: HWnd; WndNewParent: HWnd): HWnd;
  610. function SetPixel(DC: HDC; X, Y: Integer; Color: TColorRef): LongInt;
  611. function SetPolyFillMode(DC: HDC; PolyFillMode: Integer): Integer;
  612. function SetProp(Wnd: HWnd; Str: PChar; Data: THandle): Bool;
  613. procedure SetRect(var Rect: TRect; X1, Y1, X2, Y2: Integer);
  614. procedure SetRectEmpty(var Rect: TRect);
  615. procedure SetRectRgn(Rgn: HRgn; X1, Y1, X2, Y2: Integer);
  616. function SetResourceHandler(Instance: THandle; ResType: Pointer; 
  617.   LoadFunc: TFarProc): TFarProc;
  618. function SetROP2(DC: HDC; DrawMode: Integer): Integer;
  619. function SetScrollPos(Wnd: HWnd; Bar, Pos: Integer; Redraw: Bool): Integer;
  620. procedure SetScrollRange(Wnd: HWnd; Bar, MinPos, MaxPos: Integer; 
  621.   Redraw: Bool);
  622. function SetSoundNoise(Source, Duration: Integer): Integer;
  623. function SetStretchBltMode(DC: HDC; StretchMode: Integer): Integer;
  624. function SetSwapAreaSize(Size: Word): LongInt;
  625. procedure SetSysColors(Changes: Integer; var SysColor; var ColorValues);
  626. function SetSysModalWindow(Wnd: HWnd): HWnd;
  627. function SetSystemPaletteUse(DC: HDC; Usage: Word): Word;
  628. function SetTextAlign(DC: HDC; Flags: Word): Word;
  629. function SetTextCharacterExtra(DC: HDC; CharExtra: Integer): Integer;
  630. function SetTextColor(DC: HDC; Color: TColorRef): TColorRef;
  631. function SetTextJustification(DC: HDC; BreakExtra, 
  632.   BreakCount: Integer): Integer;
  633. function SetTimer(Wnd: HWnd; IDEvent: Integer; Elapse: Word; 
  634.   TimerFunc: TFarProc): Word;
  635. function SetViewportExt(DC: HDC; X, Y: Integer): LongInt;
  636. function SetViewportOrg(DC: HDC; X, Y: Integer): LongInt;
  637. function SetVoiceAccent(Voice, Tempo, Volume, Mode, Pitch: Integer): Integer;
  638. function SetVoiceEnvelope(Voice, Shape, RepeatCount: Integer): Integer;
  639. function SetVoiceNote(Voice, Value, Length, Cdots: Integer): Integer;
  640. function SetVoiceQueueSize(Voice, Bytes: Integer): Integer;
  641. function SetVoiceSound(Voice: Integer; Frequency: LongInt; 
  642.   Duration: Integer): Integer;
  643. function SetVoiceThreshold(Voice, Notes: Integer): Integer;
  644. function SetWindowExt(DC: HDC; X, Y: Integer): LongInt;
  645. function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: LongInt): LongInt;
  646. function SetWindowOrg(DC: HDC; X, Y: Integer): LongInt;
  647. procedure SetWindowPos(Wnd: HWnd; WndInsertAfter: HWnd; X, Y, cx, cy: Integer; 
  648.   Flags: Word);
  649. function SetWindowsHook(FilterType: Integer; FilterFunc: TFarProc): TFarProc;
  650. procedure SetWindowText(Wnd: HWnd; Str: PChar);
  651. function SetWindowWord(Wnd: HWnd; Index: Integer; NewWord: Word): Word;
  652. procedure ShowCaret(Wnd: HWnd);
  653. function ShowCursor(Show: Bool): Integer;
  654. procedure ShowOwnedPopups(Wnd: HWnd; Show: Bool);
  655. procedure ShowScrollBar(Wnd: HWnd; Bar: Word; Show: Bool);
  656. function ShowWindow(Wnd: HWnd; CmdShow: Integer): Bool;
  657. function SizeofResource(Instance, ResInfo: THandle): Word;
  658. function StartSound: Integer;
  659. function StopSound: Integer;
  660. function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; 
  661.   XSrc, YSrc, SrcWidth, SrcHeight: Integer; Rop: LongInt): Bool;
  662. function StretchDIBits(DC: HDC; DestX, DestY, DestWidth, DestHegiht, SrcX, 
  663.   SrcY, SrcWidth, SrcHeight: Word; Bits: Pointer; var BitsInfo: TBitmapInfo;
  664.   Usage: Word; Rop: LongInt): Integer;
  665. function SwapMouseButton(Swap: Bool): Bool;
  666. procedure SwapRecording(Flag: Word);
  667. procedure SwitchStackBack;
  668. procedure SwitchStackTo(StackSegment, StackPointer, StackTop: Word);
  669. function SyncAllVoices: Integer;
  670. function TabbedTextOut(HC: HDC; X, Y: Integer; Str: PChar; Count: Integer; 
  671.   TabPositions: Integer; var TabStopPositions; TabOrigin: Integer): LongInt;
  672. function TextOut(DC: HDC; X, Y: Integer; Str: PChar; Count: Integer): Bool;
  673. procedure Throw(var CatchBuf: TCatchBuf; ThrowBack: Integer);
  674. function ToAscii(VirtKey, ScanCode: Word; KeyState: PChar; Char: Pointer; 
  675.   Flags: Word): integer;
  676. function TrackPopupMenu(Menu: HMenu; Flags: Word; x, y, Reserved: Integer; 
  677.   Wnd: HWnd; Reserved: Pointer): Bool;
  678. function TranslateAccelerator(Wnd: HWnd; AccTable: THandle;
  679.   var Msg: TMsg): Integer;
  680. function TranslateMDISysAccel(Wnd: HWnd; var Msg: TMsg): Bool;
  681. function TranslateMessage(var Msg: TMsg): Bool;
  682. function TransmitCommChar(Cid: Integer; Chr: Char): Integer;
  683. function UngetCommChar(Cid: Integer; Chr: Char): Integer;
  684. function UnhookWindowsHook(Hook: Integer; HookFunc: TFarProc): Bool;
  685. function UnionRect(var DestRect, Src1Rect, Src2Rect: TRect): Integer;
  686. function UnlockData(Dummy: Integer): THandle;
  687. function UnlockResource(ResData: THandle): Bool;
  688. function UnlockSegment(Segment: Word): THandle;
  689. function UnrealizeObject(hObject: HBrush): Bool;
  690. function UnregisterClass(ClassName: PChar; Instance: THandle): Bool;
  691. function UpdateColors(DC: HDC): Integer;
  692. procedure UpdateWindow(Wnd: HWnd);
  693. procedure ValidateCodeSegments;
  694. function ValidateFreeSpaces: Pointer;
  695. procedure ValidateRect(Wnd: HWnd; Rect: PRect);
  696. procedure ValidateRgn(Wnd: HWnd; Rgn: HRgn);
  697. function VkKeyScan(Chr: Word): Word;
  698. procedure WaitMessage;
  699. function WaitSoundState(State: Integer): Integer;
  700. function WindowFromPoint(Point: TPoint): HWnd;
  701. function WinExec(CmdLine: PChar; CmdShow: Word): Word;
  702. function WinHelp(Wnd: HWnd; HelpFile: PChar; Command: Word; 
  703.   Data: LongInt): Bool;
  704. function WriteComm(Cid: Integer; Buf: PChar; Size: Integer): Integer;
  705. function WritePrivateProfileString(ApplicationName, KeyName, Str, 
  706.   FileName: PChar): Bool;
  707. function WriteProfileString(ApplicationName, KeyName, Str: PChar): Bool;
  708. function wvsprintf(DestStr, Format: PChar; var ArgList): Integer;
  709. function Yield: Bool;
  710. function _lclose(FileHandle: Integer): Integer;
  711. function _lcreat(PathName: PChar; Atribute: Integer): Integer;
  712. function _llseek(FileHandle: Integer; Offset: LongInt; 
  713.   Origin: Integer): LongInt;
  714. function _lopen(PathName: PChar; ReadWrite: Integer): Integer;
  715. function _lread(FileHandle: Integer; Buffer: PChar; Bytes: Integer): Word;
  716. function _lwrite(FileHandle: Integer; Buffer: PChar; Bytes: Integer): Word;
  717.  
  718. { Various inline and wrapper routines }
  719.  
  720. function MakeLong(A, B: Word): LongInt;
  721. inline(
  722.   $5A/    { POP DX }
  723.   $58);   { POP AX }
  724.  
  725. function LoWord(A: LongInt): Word;
  726. inline(
  727.   $58/    { POP AX }
  728.   $5A);   { POP DX }
  729.  
  730. function HiWord(A: LongInt): Word;
  731. inline(
  732.   $5A/    { POP DX }
  733.   $58);   { POP AX }
  734.  
  735. function LoByte(A: Word): Byte;
  736. inline(
  737.   $5A/       { POP AX    }
  738.   $32/$E4);  { XOR AH,AH }
  739.  
  740. function HiByte(A: Word): Byte;
  741. inline(
  742.   $5A/       { POP AX    }
  743.   $8A/$C4/   { MOV AL,AH }
  744.   $32/$E4);  { XOR AH,AH }
  745.  
  746. function RGB(R: Byte; G: Byte; B: Byte): LongInt;
  747. inline(
  748.   $5A/       { POP DX    }
  749.   $5B/       { POP BX    }
  750.   $58/       { POP AX    }
  751.   $8A/$E3/   { MOV AH,BL }
  752.   $32/$F6);  { XOR DH,DH }
  753.  
  754. function PaletteRGB(R: Byte; G: Byte; B: Byte): LongInt;
  755. inline(
  756.   $5A/       { POP DX    }
  757.   $5B/       { POP BX    }
  758.   $58/       { POP AX    }
  759.   $8A/$E3/   { MOV AH,BL }
  760.   $B6/$02);  { MOV DH,2  }
  761.  
  762. function GetRValue(RGB: LongInt): Byte;
  763. inline(
  764.   $58/       { POP AX    }
  765.   $5A/       { POP DX    }
  766.   $32/$E4);  { XOR AH,AH }
  767.  
  768. function GetGValue(RGB: LongInt): Byte;
  769. inline(
  770.   $58/       { POP AX    }
  771.   $5A/       { POP DX    }
  772.   $8A/$C4/   { MOV AL,AH }
  773.   $32/$E4);  { XOR AH,AH }
  774.  
  775. function GetBValue(RGB: LongInt): Byte;
  776. inline(
  777.   $5A/       { POP DX    }
  778.   $58/       { POP AX    }
  779.   $32/$E4);  { XOR AH,AH }
  780.  
  781. function PaletteIndex(PaletteIndex: Integer): TColorRef;
  782. inline(
  783.   $58/            { POP AX      }
  784.   $BA/$00/$01); { MOV DX,$100 }
  785.  
  786. implementation
  787.  
  788. function _LocalLock(Mem: THandle): Word; far; forward;
  789.  
  790. { KERNEL routines }
  791.  
  792. procedure FatalExit;            external 'KERNEL' index 1;
  793. function GetVersion;            external 'KERNEL' index 3;
  794. function LocalInit;            external 'KERNEL' index 4;
  795. function LocalAlloc;            external 'KERNEL' index 5;
  796. function LocalReAlloc;            external 'KERNEL' index 6;
  797. function LocalFree;            external 'KERNEL' index 7;
  798. function _LocalLock;            external 'KERNEL' index 8;
  799. function LocalUnlock;            external 'KERNEL' index 9;
  800. function LocalSize;            external 'KERNEL' index 10;
  801. function LocalHandle;            external 'KERNEL' index 11;
  802. function LocalFlags;            external 'KERNEL' index 12;
  803. function LocalCompact;            external 'KERNEL' index 13;
  804. function LocalNotify;            external 'KERNEL' index 14;
  805. function GlobalAlloc;            external 'KERNEL' index 15;
  806. function GlobalReAlloc;            external 'KERNEL' index 16;
  807. function GlobalFree;            external 'KERNEL' index 17;
  808. function GlobalLock;            external 'KERNEL' index 18;
  809. function GlobalUnlock;            external 'KERNEL' index 19;
  810. function UnlockResource;        external 'KERNEL' index 19;
  811. function GlobalSize;            external 'KERNEL' index 20;
  812. function GlobalHandle;            external 'KERNEL' index 21;
  813. function GlobalFlags;            external 'KERNEL' index 22;
  814. function LockSegment;            external 'KERNEL' index 23;
  815. function UnlockSegment;            external 'KERNEL' index 24;
  816. function GlobalCompact;            external 'KERNEL' index 25;
  817. function Yield;                external 'KERNEL' index 29;
  818. function GetCurrentTask;        external 'KERNEL' index 36;
  819. function GetCurrentPDB;                 external 'KERNEL' index 37;
  820. function LoadModule;            external 'KERNEL' index 45;
  821. function FreeModule;            external 'KERNEL' index 46;
  822. function GetModuleHandle;        external 'KERNEL' index 47;
  823. function GetModuleUsage;        external 'KERNEL' index 48;
  824. function GetModuleFileName;        external 'KERNEL' index 49;
  825. function GetProcAddress;        external 'KERNEL' index 50;
  826. function MakeProcInstance;        external 'KERNEL' index 51;
  827. procedure FreeProcInstance;        external 'KERNEL' index 52;
  828. function GetInstanceData;        external 'KERNEL' index 54;
  829. function Catch;                external 'KERNEL' index 55;
  830. procedure Throw;            external 'KERNEL' index 56;
  831. function GetProfileInt;            external 'KERNEL' index 57;
  832. function GetProfileString;        external 'KERNEL' index 58;
  833. function WriteProfileString;        external 'KERNEL' index 59;
  834. function FindResource;            external 'KERNEL' index 60;
  835. function LoadResource;            external 'KERNEL' index 61;
  836. function LockResource;            external 'KERNEL' index 62;
  837. function FreeResource;            external 'KERNEL' index 63;
  838. function AccessResource;        external 'KERNEL' index 64;
  839. function SizeofResource;        external 'KERNEL' index 65;
  840. function AllocResource;            external 'KERNEL' index 66;
  841. function SetResourceHandler;        external 'KERNEL' index 67;
  842. function InitAtomTable;            external 'KERNEL' index 68;
  843. function FindAtom;            external 'KERNEL' index 69;
  844. function AddAtom;            external 'KERNEL' index 70;
  845. function DeleteAtom;            external 'KERNEL' index 71;
  846. function GetAtomName;            external 'KERNEL' index 72;
  847. function GetAtomHandle;            external 'KERNEL' index 73;
  848. function OpenFile;            external 'KERNEL' index 74;
  849. function _lclose;            external 'KERNEL' index 81;
  850. function _lread;            external 'KERNEL' index 82;
  851. function _lcreat;            external 'KERNEL' index 83;
  852. function _llseek;            external 'KERNEL' index 84;
  853. function _lopen;            external 'KERNEL' index 85;
  854. function _lwrite;            external 'KERNEL' index 86;
  855. function lstrcpy;            external 'KERNEL' index 88;
  856. function lstrcat;            external 'KERNEL' index 89;
  857. function lstrlen;            external 'KERNEL' index 90;
  858. function GetTempDrive;            external 'KERNEL' index 92;
  859. function GetCodeHandle;            external 'KERNEL' index 93;
  860. function DefineHandleTable;        external 'KERNEL' index 94;
  861. function LoadLibrary;            external 'KERNEL' index 95;
  862. procedure FreeLibrary;            external 'KERNEL' index 96;
  863. function GetTempFileName;        external 'KERNEL' index 97;
  864. procedure ValidateCodeSegments;         external 'KERNEL' index 100;
  865. procedure DOS3Call;            external 'KERNEL' index 102;
  866. procedure NetBIOSCall;            external 'KERNEL' index 103;
  867. procedure GetCodeInfo;                  external 'KERNEL' index 104;
  868. function SetSwapAreaSize;        external 'KERNEL' index 106;
  869. function SetErrorMode;            external 'KERNEL' index 107;
  870. procedure SwitchStackTo;                external 'KERNEL' index 108;
  871. procedure SwitchStackBack;              external 'KERNEL' index 109;
  872. function GlobalWire;            external 'KERNEL' index 111;
  873. function GlobalUnWire;            external 'KERNEL' index 112;
  874. procedure OutputDebugString;        external 'KERNEL' index 115;
  875. function LocalShrink;            external 'KERNEL' index 121;
  876. function GetPrivateProfileInt;        external 'KERNEL' index 127;
  877. function GetPrivateProfileString;    external 'KERNEL' index 128;
  878. function WritePrivateProfileString;    external 'KERNEL' index 129;
  879. function GetDOSEnvironment;             external 'KERNEL' index 131;
  880. function GetWinFlags;            external 'KERNEL' index 132;
  881. function GetWindowsDirectory;        external 'KERNEL' index 134;
  882. function GetSystemDirectory;        external 'KERNEL' index 135;
  883. function GetDriveType;            external 'KERNEL' index 136;
  884. procedure FatalAppExit;            external 'KERNEL' index 137;
  885. function GetNumTasks;            external 'KERNEL' index 152;
  886. procedure GlobalNotify;            external 'KERNEL' index 154;
  887. procedure LimitEmsPages;        external 'KERNEL' index 156;
  888. function GlobalLRUOldest;        external 'KERNEL' index 163;
  889. function GlobalLRUNewest;        external 'KERNEL' index 164;
  890. function WinExec;            external 'KERNEL' index 166;
  891. function GetFreeSpace;            external 'KERNEL' index 169;
  892. function AllocCStoDSAlias;              external 'KERNEL' index 170;
  893. function AllocDStoCSAlias;              external 'KERNEL' index 171;
  894. function AllocSelector;                 external 'KERNEL' index 175;
  895. function FreeSelector;                  external 'KERNEL' index 176;
  896. function ChangeSelector;        external 'KERNEL' index 177;
  897. function GlobalDosAlloc;        external 'KERNEL' index 184;
  898. function GlobalDosFree;            external 'KERNEL' index 185;
  899. function GlobalPageLock;                external 'KERNEL' index 191;
  900. function GlobalPageUnlock;              external 'KERNEL' index 192;
  901. procedure GlobalFix;                    external 'KERNEL' index 197;
  902. function GlobalUnfix;                   external 'KERNEL' index 198;
  903. function SetHandleCount;        external 'KERNEL' index 199;
  904. function ValidateFreeSpaces;        external 'KERNEL' index 200;
  905. procedure DebugBreak;                   external 'KERNEL' index 203;
  906. procedure SwapRecording;        external 'KERNEL' index 204;
  907.  
  908. { GDI routines }
  909.  
  910. function SetBkColor;            external 'GDI' index 1;
  911. function SetBkMode;            external 'GDI' index 2;
  912. function SetMapMode;            external 'GDI' index 3;
  913. function SetROP2;            external 'GDI' index 4;
  914. function SetPolyFillMode;        external 'GDI' index 6;
  915. function SetStretchBltMode;        external 'GDI' index 7;
  916. function SetTextCharacterExtra;        external 'GDI' index 8;
  917. function SetTextColor;            external 'GDI' index 9;
  918. function SetTextJustification;        external 'GDI' index 10;
  919. function SetWindowOrg;            external 'GDI' index 11;
  920. function SetWindowExt;            external 'GDI' index 12;
  921. function SetViewportOrg;        external 'GDI' index 13;
  922. function SetViewportExt;        external 'GDI' index 14;
  923. function OffsetWindowOrg;        external 'GDI' index 15;
  924. function ScaleWindowExt;        external 'GDI' index 16;
  925. function OffsetViewportOrg;        external 'GDI' index 17;
  926. function ScaleViewportExt;        external 'GDI' index 18;
  927. function LineTo;            external 'GDI' index 19;
  928. function MoveTo;            external 'GDI' index 20;
  929. function ExcludeClipRect;        external 'GDI' index 21;
  930. function IntersectClipRect;        external 'GDI' index 22;
  931. function Arc;                external 'GDI' index 23;
  932. function Ellipse;            external 'GDI' index 24;
  933. function FloodFill;            external 'GDI' index 25;
  934. function Pie;                external 'GDI' index 26;
  935. function Rectangle;            external 'GDI' index 27;
  936. function RoundRect;            external 'GDI' index 28;
  937. function PatBlt;            external 'GDI' index 29;
  938. function SaveDC;            external 'GDI' index 30;
  939. function SetPixel;            external 'GDI' index 31;
  940. function OffsetClipRgn;            external 'GDI' index 32;
  941. function TextOut;            external 'GDI' index 33;
  942. function BitBlt;            external 'GDI' index 34;
  943. function StretchBlt;            external 'GDI' index 35;
  944. function Polygon;            external 'GDI' index 36;
  945. function Polyline;            external 'GDI' index 37;
  946. function Escape;            external 'GDI' index 38;
  947. function RestoreDC;            external 'GDI' index 39;
  948. function FillRgn;            external 'GDI' index 40;
  949. function FrameRgn;            external 'GDI' index 41;
  950. function InvertRgn;            external 'GDI' index 42;
  951. function PaintRgn;            external 'GDI' index 43;
  952. function SelectClipRgn;            external 'GDI' index 44;
  953. function SelectObject;            external 'GDI' index 45;
  954. function CombineRgn;            external 'GDI' index 47;
  955. function CreateBitmap;            external 'GDI' index 48;
  956. function CreateBitmapIndirect;        external 'GDI' index 49;
  957. function CreateBrushIndirect;        external 'GDI' index 50;
  958. function CreateCompatibleBitmap;    external 'GDI' index 51;
  959. function CreateCompatibleDC;        external 'GDI' index 52;
  960. function CreateDC;            external 'GDI' index 53;
  961. function CreateEllipticRgn;        external 'GDI' index 54;
  962. function CreateEllipticRgnIndirect;    external 'GDI' index 55;
  963. function CreateFont;            external 'GDI' index 56;
  964. function CreateFontIndirect;        external 'GDI' index 57;
  965. function CreateHatchBrush;        external 'GDI' index 58;
  966. function CreatePatternBrush;        external 'GDI' index 60;
  967. function CreatePen;            external 'GDI' index 61;
  968. function CreatePenIndirect;        external 'GDI' index 62;
  969. function CreatePolygonRgn;        external 'GDI' index 63;
  970. function CreateRectRgn;            external 'GDI' index 64;
  971. function CreateRectRgnIndirect;        external 'GDI' index 65;
  972. function CreateSolidBrush;        external 'GDI' index 66;
  973. function DPtoLP;            external 'GDI' index 67;
  974. function DeleteDC;            external 'GDI' index 68;
  975. function DeleteObject;            external 'GDI' index 69;
  976. function EnumFonts;            external 'GDI' index 70;
  977. function EnumObjects;            external 'GDI' index 71;
  978. function EqualRgn;            external 'GDI' index 72;
  979. function GetBitmapBits;            external 'GDI' index 74;
  980. function GetBkColor;            external 'GDI' index 75;
  981. function GetBkMode;            external 'GDI' index 76;
  982. function GetClipBox;            external 'GDI' index 77;
  983. function GetCurrentPosition;        external 'GDI' index 78;
  984. function GetDCOrg;            external 'GDI' index 79;
  985. function GetDeviceCaps;            external 'GDI' index 80;
  986. function GetMapMode;            external 'GDI' index 81;
  987. function GetObject;            external 'GDI' index 82;
  988. function GetPixel;            external 'GDI' index 83;
  989. function GetPolyFillMode;        external 'GDI' index 84;
  990. function GetROP2;            external 'GDI' index 85;
  991. function GetStockObject;        external 'GDI' index 87;
  992. function GetStretchBltMode;        external 'GDI' index 88;
  993. function GetTextCharacterExtra;        external 'GDI' index 89;
  994. function GetTextColor;            external 'GDI' index 90;
  995. function GetTextExtent;            external 'GDI' index 91;
  996. function GetTextFace;            external 'GDI' index 92;
  997. function GetTextMetrics;        external 'GDI' index 93;
  998. function GetViewportExt;        external 'GDI' index 94;
  999. function GetViewportOrg;        external 'GDI' index 95;
  1000. function GetWindowExt;            external 'GDI' index 96;
  1001. function GetWindowOrg;            external 'GDI' index 97;
  1002. function LPtoDP;            external 'GDI' index 99;
  1003. procedure LineDDA;            external 'GDI' index 100;
  1004. function OffsetRgn;            external 'GDI' index 101;
  1005. function PtVisible;            external 'GDI' index 103;
  1006. function RectVisible;            external 'GDI' index 104;
  1007. function SetBitmapBits;            external 'GDI' index 106;
  1008. function AddFontResource;        external 'GDI' index 119;
  1009. function PlayMetaFile;            external 'GDI' index 123;
  1010. function GetMetaFile;            external 'GDI' index 124;
  1011. function CreateMetaFile;        external 'GDI' index 125;
  1012. function CloseMetaFile;            external 'GDI' index 126;
  1013. function DeleteMetaFile;        external 'GDI' index 127;
  1014. function MulDiv;                        external 'GDI' index 128;
  1015. function SetEnvironment;        external 'GDI' index 132;
  1016. function GetEnvironment;        external 'GDI' index 133;
  1017. function GetRgnBox;                     external 'GDI' index 134;
  1018. function RemoveFontResource;        external 'GDI' index 136;
  1019. function SetBrushOrg;            external 'GDI' index 148;
  1020. function GetBrushOrg;            external 'GDI' index 149;
  1021. function UnrealizeObject;        external 'GDI' index 150;
  1022. function CopyMetaFile;            external 'GDI' index 151;
  1023. function CreateIC;            external 'GDI' index 153;
  1024. function GetNearestColor;        external 'GDI' index 154;
  1025. function CreateDiscardableBitmap;    external 'GDI' index 156;
  1026. function GetMetaFileBits;        external 'GDI' index 159;
  1027. function SetMetaFileBits;        external 'GDI' index 160;
  1028. function PtInRegion;            external 'GDI' index 161;
  1029. function GetBitmapDimension;        external 'GDI' index 162;
  1030. function SetBitmapDimension;        external 'GDI' index 163;
  1031. procedure SetRectRgn;            external 'GDI' index 172;
  1032. function EnumMetaFile;            external 'GDI' index 175;
  1033. procedure PlayMetaFileRecord;        external 'GDI' index 176;
  1034. function RectInRegion;                  external 'GDI' index 181;
  1035. function GetTextAlign;            external 'GDI' index 345;
  1036. function SetTextAlign;            external 'GDI' index 346;
  1037. function Chord;                external 'GDI' index 348;
  1038. function SetMapperFlags;        external 'GDI' index 349;
  1039. function GetCharWidth;            external 'GDI' index 350;
  1040. function ExtTextOut;            external 'GDI' index 351;
  1041. function GetAspectRatioFilter;        external 'GDI' index 353;
  1042. function CreatePalette;            external 'GDI' index 360;
  1043. function GetPaletteEntries;        external 'GDI' index 363;
  1044. function SetPaletteEntries;        external 'GDI' index 364;
  1045. function UpdateColors;            external 'GDI' index 366;
  1046. procedure AnimatePalette;        external 'GDI' index 367;
  1047. function ResizePalette;            external 'GDI' index 368;
  1048. function GetNearestPaletteIndex;    external 'GDI' index 370;
  1049. function ExtFloodFill;            external 'GDI' index 372;
  1050. function SetSystemPaletteUse;        external 'GDI' index 373;
  1051. function GetSystemPaletteUse;        external 'GDI' index 374;
  1052. function GetSystemPaletteEntries;    external 'GDI' index 375;
  1053. function StretchDIBits;                 external 'GDI' index 439;
  1054. function SetDIBits;            external 'GDI' index 440;
  1055. function GetDIBits;            external 'GDI' index 441;
  1056. function CreateDIBitmap;        external 'GDI' index 442;
  1057. function SetDIBitsToDevice;        external 'GDI' index 443;
  1058. function CreateRoundRectRgn;        external 'GDI' index 444;
  1059. function CreateDIBPatternBrush;        external 'GDI' index 445;
  1060. function PolyPolygon;            external 'GDI' index 450;
  1061. function CreatePolyPolygonRgn;          external 'GDI' index 451;
  1062.  
  1063. { USER routines }
  1064.  
  1065. function MessageBox;            external 'USER' index 1;
  1066. procedure PostQuitMessage;        external 'USER' index 6;
  1067. function ExitWindows;                   external 'USER' index 7;
  1068. function SetTimer;            external 'USER' index 10;
  1069. function KillTimer;            external 'USER' index 12;
  1070. function GetTickCount;            external 'USER' index 13;
  1071. function GetCurrentTime;        external 'USER' index 15;
  1072. procedure ClipCursor;            external 'USER' index 16;
  1073. procedure GetCursorPos;            external 'USER' index 17;
  1074. function SetCapture;            external 'USER' index 18;
  1075. procedure ReleaseCapture;        external 'USER' index 19;
  1076. procedure SetDoubleClickTime;        external 'USER' index 20;
  1077. function GetDoubleClickTime;        external 'USER' index 21;
  1078. function SetFocus;            external 'USER' index 22;
  1079. function GetFocus;            external 'USER' index 23;
  1080. function RemoveProp;            external 'USER' index 24;
  1081. function GetProp;            external 'USER' index 25;
  1082. function SetProp;            external 'USER' index 26;
  1083. function EnumProps;            external 'USER' index 27;
  1084. procedure ClientToScreen;        external 'USER' index 28;
  1085. procedure ScreenToClient;        external 'USER' index 29;
  1086. function WindowFromPoint;        external 'USER' index 30;
  1087. function IsIconic;            external 'USER' index 31;
  1088. procedure GetWindowRect;        external 'USER' index 32;
  1089. procedure GetClientRect;        external 'USER' index 33;
  1090. function EnableWindow;            external 'USER' index 34;
  1091. function IsWindowEnabled;        external 'USER' index 35;
  1092. function GetWindowText;            external 'USER' index 36;
  1093. procedure SetWindowText;        external 'USER' index 37;
  1094. function GetWindowTextLength;        external 'USER' index 38;
  1095. function BeginPaint;            external 'USER' index 39;
  1096. procedure EndPaint;            external 'USER' index 40;
  1097. function CreateWindow;            external 'USER' index 41;
  1098. function ShowWindow;            external 'USER' index 42;
  1099. procedure CloseWindow;            external 'USER' index 43;
  1100. function OpenIcon;            external 'USER' index 44;
  1101. procedure BringWindowToTop;        external 'USER' index 45;
  1102. function GetParent;            external 'USER' index 46;
  1103. function IsWindow;            external 'USER' index 47;
  1104. function IsChild;            external 'USER' index 48;
  1105. function IsWindowVisible;        external 'USER' index 49;
  1106. function FindWindow;            external 'USER' index 50;
  1107. function IsTwoByteCharPrefix;        external 'USER' index 51;
  1108. function AnyPopup;            external 'USER' index 52;
  1109. function DestroyWindow;            external 'USER' index 53;
  1110. function EnumWindows;            external 'USER' index 54;
  1111. function EnumChildWindows;        external 'USER' index 55;
  1112. procedure MoveWindow;            external 'USER' index 56;
  1113. function RegisterClass;            external 'USER' index 57;
  1114. function GetClassName;            external 'USER' index 58;
  1115. function SetActiveWindow;        external 'USER' index 59;
  1116. function GetActiveWindow;        external 'USER' index 60;
  1117. procedure ScrollWindow;            external 'USER' index 61;
  1118. function SetScrollPos;            external 'USER' index 62;
  1119. function GetScrollPos;            external 'USER' index 63;
  1120. procedure SetScrollRange;        external 'USER' index 64;
  1121. procedure GetScrollRange;        external 'USER' index 65;
  1122. function GetDC;                external 'USER' index 66;
  1123. function GetWindowDC;            external 'USER' index 67;
  1124. function ReleaseDC;            external 'USER' index 68;
  1125. function SetCursor;            external 'USER' index 69;
  1126. procedure SetCursorPos;            external 'USER' index 70;
  1127. function ShowCursor;            external 'USER' index 71;
  1128. procedure SetRect;            external 'USER' index 72;
  1129. procedure SetRectEmpty;            external 'USER' index 73;
  1130. procedure CopyRect;            external 'USER' index 74;
  1131. function IsRectEmpty;            external 'USER' index 75;
  1132. function PtInRect;            external 'USER' index 76;
  1133. procedure OffsetRect;            external 'USER' index 77;
  1134. procedure InflateRect;            external 'USER' index 78;
  1135. function IntersectRect;                external 'USER' index 79;
  1136. function UnionRect;            external 'USER' index 80;
  1137. function FillRect;            external 'USER' index 81;
  1138. procedure InvertRect;            external 'USER' index 82;
  1139. procedure FrameRect;            external 'USER' index 83;
  1140. function DrawIcon;            external 'USER' index 84;
  1141. function DrawText;            external 'USER' index 85;
  1142. function DialogBox;            external 'USER' index 87;
  1143. procedure EndDialog;            external 'USER' index 88;
  1144. function CreateDialog;            external 'USER' index 89;
  1145. function IsDialogMessage;        external 'USER' index 90;
  1146. function GetDlgItem;            external 'USER' index 91;
  1147. procedure SetDlgItemText;        external 'USER' index 92;
  1148. function GetDlgItemText;        external 'USER' index 93;
  1149. procedure SetDlgItemInt;        external 'USER' index 94;
  1150. function GetDlgItemInt;            external 'USER' index 95;
  1151. procedure CheckRadioButton;        external 'USER' index 96;
  1152. procedure CheckDlgButton;        external 'USER' index 97;
  1153. function IsDlgButtonChecked;        external 'USER' index 98;
  1154. function DlgDirSelect;            external 'USER' index 99;
  1155. function DlgDirList;            external 'USER' index 100;
  1156. function SendDlgItemMessage;        external 'USER' index 101;
  1157. procedure AdjustWindowRect;        external 'USER' index 102;
  1158. procedure MapDialogRect;        external 'USER' index 103;
  1159. procedure MessageBeep;            external 'USER' index 104;
  1160. function FlashWindow;            external 'USER' index 105;
  1161. function GetKeyState;            external 'USER' index 106;
  1162. function DefWindowProc;            external 'USER' index 107;
  1163. function GetMessage;            external 'USER' index 108;
  1164. function PeekMessage;            external 'USER' index 109;
  1165. function PostMessage;            external 'USER' index 110;
  1166. function SendMessage;            external 'USER' index 111;
  1167. procedure WaitMessage;            external 'USER' index 112;
  1168. function TranslateMessage;        external 'USER' index 113;
  1169. function DispatchMessage;        external 'USER' index 114;
  1170. procedure ReplyMessage;            external 'USER' index 115;
  1171. function PostAppMessage;        external 'USER' index 116;
  1172. function RegisterWindowMessage;        external 'USER' index 118;
  1173. function GetMessagePos;            external 'USER' index 119;
  1174. function GetMessageTime;        external 'USER' index 120;
  1175. function SetWindowsHook;        external 'USER' index 121;
  1176. function CallWindowProc;        external 'USER' index 122;
  1177. function CallMsgFilter;            external 'USER' index 123;
  1178. procedure UpdateWindow;            external 'USER' index 124;
  1179. procedure InvalidateRect;        external 'USER' index 125;
  1180. procedure InvalidateRgn;        external 'USER' index 126;
  1181. procedure ValidateRect;            external 'USER' index 127;
  1182. procedure ValidateRgn;            external 'USER' index 128;
  1183. function GetClassWord;            external 'USER' index 129;
  1184. function SetClassWord;            external 'USER' index 130;
  1185. function GetClassLong;            external 'USER' index 131;
  1186. function SetClassLong;            external 'USER' index 132;
  1187. function GetWindowWord;            external 'USER' index 133;
  1188. function SetWindowWord;            external 'USER' index 134;
  1189. function GetWindowLong;            external 'USER' index 135;
  1190. function SetWindowLong;            external 'USER' index 136;
  1191. function OpenClipboard;            external 'USER' index 137;
  1192. function CloseClipboard;        external 'USER' index 138;
  1193. function EmptyClipboard;        external 'USER' index 139;
  1194. function GetClipboardOwner;        external 'USER' index 140;
  1195. function SetClipboardData;        external 'USER' index 141;
  1196. function GetClipboardData;        external 'USER' index 142;
  1197. function CountClipboardFormats;        external 'USER' index 143;
  1198. function EnumClipboardFormats;        external 'USER' index 144;
  1199. function RegisterClipboardFormat;    external 'USER' index 145;
  1200. function GetClipboardFormatName;    external 'USER' index 146;
  1201. function SetClipboardViewer;        external 'USER' index 147;
  1202. function GetClipboardViewer;        external 'USER' index 148;
  1203. function ChangeClipboardChain;        external 'USER' index 149;
  1204. function LoadMenu;            external 'USER' index 150;
  1205. function CreateMenu;            external 'USER' index 151;
  1206. function DestroyMenu;            external 'USER' index 152;
  1207. function ChangeMenu;            external 'USER' index 153;
  1208. function CheckMenuItem;            external 'USER' index 154;
  1209. function EnableMenuItem;        external 'USER' index 155;
  1210. function GetSystemMenu;            external 'USER' index 156;
  1211. function GetMenu;            external 'USER' index 157;
  1212. function SetMenu;            external 'USER' index 158;
  1213. function GetSubMenu;            external 'USER' index 159;
  1214. procedure DrawMenuBar;            external 'USER' index 160;
  1215. function GetMenuString;            external 'USER' index 161;
  1216. function HiliteMenuItem;        external 'USER' index 162;
  1217. procedure CreateCaret;            external 'USER' index 163;
  1218. procedure DestroyCaret;            external 'USER' index 164;
  1219. procedure SetCaretPos;            external 'USER' index 165;
  1220. procedure HideCaret;            external 'USER' index 166;
  1221. procedure ShowCaret;            external 'USER' index 167;
  1222. procedure SetCaretBlinkTime;        external 'USER' index 168;
  1223. function GetCaretBlinkTime;        external 'USER' index 169;
  1224. function ArrangeIconicWindows;        external 'USER' index 170;
  1225. function WinHelp;            external 'USER' index 171;
  1226. function LoadCursor;            external 'USER' index 173;
  1227. function LoadIcon;            external 'USER' index 174;
  1228. function LoadBitmap;            external 'USER' index 175;
  1229. function LoadString;            external 'USER' index 176;
  1230. function LoadAccelerators;        external 'USER' index 177;
  1231. function TranslateAccelerator;        external 'USER' index 178;
  1232. function GetSystemMetrics;        external 'USER' index 179;
  1233. function GetSysColor;            external 'USER' index 180;
  1234. procedure SetSysColors;            external 'USER' index 181;
  1235. procedure GetCaretPos;            external 'USER' index 183;
  1236. function GrayString;            external 'USER' index 185;
  1237. function SwapMouseButton;        external 'USER' index 186;
  1238. function SetSysModalWindow;        external 'USER' index 188;
  1239. function GetSysModalWindow;        external 'USER' index 189;
  1240. function GetUpdateRect;            external 'USER' index 190;
  1241. function ChildWindowFromPoint;        external 'USER' index 191;
  1242. function InSendMessage;            external 'USER' index 192;
  1243. function IsClipboardFormatAvailable;    external 'USER' index 193;
  1244. function DlgDirSelectComboBox;        external 'USER' index 194;
  1245. function DlgDirListComboBox;        external 'USER' index 195;
  1246. function TabbedTextOut;            external 'USER' index 196;
  1247. function GetTabbedTextExtent;        external 'USER' index 197;
  1248. function OpenComm;            external 'USER' index 200;
  1249. function SetCommState;            external 'USER' index 201;
  1250. function GetCommState;            external 'USER' index 202;
  1251. function GetCommError;            external 'USER' index 203;
  1252. function ReadComm;            external 'USER' index 204;
  1253. function WriteComm;            external 'USER' index 205;
  1254. function TransmitCommChar;        external 'USER' index 206;
  1255. function CloseComm;            external 'USER' index 207;
  1256. function SetCommEventMask;        external 'USER' index 208;
  1257. function GetCommEventMask;        external 'USER' index 209;
  1258. function SetCommBreak;            external 'USER' index 210;
  1259. function ClearCommBreak;        external 'USER' index 211;
  1260. function UngetCommChar;            external 'USER' index 212;
  1261. function BuildCommDCB;            external 'USER' index 213;
  1262. function EscapeCommFunction;        external 'USER' index 214;
  1263. function FlushComm;            external 'USER' index 215;
  1264. function DialogBoxIndirect;        external 'USER' index 218;
  1265. function CreateDialogIndirect;        external 'USER' index 219;
  1266. function LoadMenuIndirect;        external 'USER' index 220;
  1267. function ScrollDC;            external 'USER' index 221;
  1268. procedure GetKeyboardState;        external 'USER' index 222;
  1269. procedure SetKeyboardState;        external 'USER' index 223;
  1270. function GetWindowTask;            external 'USER' index 224;
  1271. function EnumTaskWindows;        external 'USER' index 225;
  1272. function GetNextDlgGroupItem;        external 'USER' index 227;
  1273. function GetNextDlgTabItem;        external 'USER' index 228;
  1274. function GetTopWindow;            external 'USER' index 229;
  1275. function GetNextWindow;            external 'USER' index 230;
  1276. procedure SetWindowPos;                 external 'USER' index 232;
  1277. function SetParent;            external 'USER' index 233;
  1278. function UnhookWindowsHook;        external 'USER' index 234;
  1279. function DefHookProc;            external 'USER' index 235;
  1280. function GetCapture;            external 'USER' index 236;
  1281. function GetUpdateRgn;            external 'USER' index 237;
  1282. function ExcludeUpdateRgn;        external 'USER' index 238;
  1283. function DialogBoxParam;        external 'USER' index 239;
  1284. function DialogBoxIndirectParam;    external 'USER' index 240;
  1285. function CreateDialogParam;        external 'USER' index 241;
  1286. function CreateDialogIndirectParam;    external 'USER' index 242;
  1287. function GetDialogBaseUnits;        external 'USER' index 243;
  1288. function EqualRect;            external 'USER' index 244;
  1289. function GetAsyncKeyState;        external 'USER' index 249;
  1290. function GetMenuState;            external 'USER' index 250;
  1291. function BeginDeferWindowPos;           external 'USER' index 259;
  1292. function DeferWindowPos;                external 'USER' index 260;
  1293. procedure EndDeferWindowPos;            external 'USER' index 261;
  1294. function GetWindow;            external 'USER' index 262;
  1295. function GetMenuItemCount;        external 'USER' index 263;
  1296. function GetMenuItemID;            external 'USER' index 264;
  1297. procedure ShowOwnedPopups;        external 'USER' index 265;
  1298. function SetMessageQueue;        external 'USER' index 266;
  1299. procedure ShowScrollBar;        external 'USER' index 267;
  1300. function GlobalAddAtom;            external 'USER' index 268;
  1301. function GlobalDeleteAtom;        external 'USER' index 269;
  1302. function GlobalFindAtom;        external 'USER' index 270;
  1303. function GlobalGetAtomName;        external 'USER' index 271;
  1304. function IsZoomed;            external 'USER' index 272;
  1305. function GetDlgCtrlID;            external 'USER' index 277;
  1306. function GetDesktopHwnd;        external 'USER' index 278;
  1307. function SelectPalette;            external 'USER' index 282;
  1308. function RealizePalette;        external 'USER' index 283;
  1309. function GetDesktopWindow;        external 'USER' index 286;
  1310. function GetLastActivePopup;        external 'USER' index 287;
  1311. function DefDlgProc;            external 'USER' index 308;
  1312. function EnableHardwareInput;        external 'USER' index 331;
  1313. function GetInputState;            external 'USER' index 335;
  1314. function GetPriorityClipboardFormat;    external 'USER' index 402;
  1315. function UnregisterClass;        external 'USER' index 403;
  1316. function GetClassInfo;            external 'USER' index 404;
  1317. function CreateCursor;            external 'USER' index 406;
  1318. function CreateIcon;            external 'USER' index 407;
  1319. function InsertMenu;            external 'USER' index 410;
  1320. function AppendMenu;            external 'USER' index 411;
  1321. function RemoveMenu;            external 'USER' index 412;
  1322. function DeleteMenu;            external 'USER' index 413;
  1323. function ModifyMenu;            external 'USER' index 414;
  1324. function CreatePopupMenu;        external 'USER' index 415;
  1325. function TrackPopupMenu;        external 'USER' index 416;
  1326. function GetMenuCheckMarkDimensions;    external 'USER' index 417;
  1327. function SetMenuItemBitmaps;        external 'USER' index 418;
  1328. function wvsprintf;            external 'USER' index 421;
  1329. function lstrcmp;            external 'USER' index 430;
  1330. function AnsiUpper;            external 'USER' index 431;
  1331. function AnsiLower;            external 'USER' index 432;
  1332. function IsCharAlpha;            external 'USER' index 433;
  1333. function IsCharAlphaNumeric;        external 'USER' index 434;
  1334. function IsCharUpper;            external 'USER' index 435;
  1335. function IsCharLower;            external 'USER' index 436;
  1336. function AnsiUpperBuff;            external 'USER' index 437;
  1337. function AnsiLowerBuff;            external 'USER' index 438;
  1338. function DefFrameProc;            external 'USER' index 445;
  1339. function DefMDIChildProc;        external 'USER' index 447;
  1340. function TranslateMDISysAccel;        external 'USER' index 451;
  1341. function CreateWindowEx;        external 'USER' index 452;
  1342. procedure AdjustWindowRectEx;        external 'USER' index 454;
  1343. function DestroyIcon;            external 'USER' index 457;
  1344. function DestroyCursor;            external 'USER' index 458;
  1345. procedure DrawFocusRect;        external 'USER' index 466;
  1346. function lstrcmpi;            external 'USER' index 471;
  1347. function AnsiNext;            external 'USER' index 472;
  1348. function AnsiPrev;            external 'USER' index 473;
  1349.  
  1350. { SOUND routines }
  1351.  
  1352. function OpenSound;            external 'SOUND' index 1;
  1353. procedure CloseSound;            external 'SOUND' index 2;
  1354. function SetVoiceQueueSize;        external 'SOUND' index 3;
  1355. function SetVoiceNote;            external 'SOUND' index 4;
  1356. function SetVoiceAccent;        external 'SOUND' index 5;
  1357. function SetVoiceEnvelope;        external 'SOUND' index 6;
  1358. function SetSoundNoise;            external 'SOUND' index 7;
  1359. function SetVoiceSound;            external 'SOUND' index 8;
  1360. function StartSound;            external 'SOUND' index 9;
  1361. function StopSound;            external 'SOUND' index 10;
  1362. function WaitSoundState;        external 'SOUND' index 11;
  1363. function SyncAllVoices;            external 'SOUND' index 12;
  1364. function CountVoiceNotes;        external 'SOUND' index 13;
  1365. function GetThresholdEvent;        external 'SOUND' index 14;
  1366. function GetThresholdStatus;        external 'SOUND' index 15;
  1367. function SetVoiceThreshold;        external 'SOUND' index 16;
  1368.  
  1369. { KEYBOARD routines }
  1370.  
  1371. function ToAscii;                       external 'KEYBOARD' index 4;
  1372. function AnsiToOem;            external 'KEYBOARD' index 5;
  1373. function OemToAnsi;            external 'KEYBOARD' index 6;
  1374. function OemKeyScan;            external 'KEYBOARD' index 128;
  1375. function VkKeyScan;            external 'KEYBOARD' index 129;
  1376. function GetKeyboardType;        external 'KEYBOARD' index 130;
  1377. function MapVirtualKey;            external 'KEYBOARD' index 131;
  1378. function GetKBCodePage;            external 'KEYBOARD' index 132;
  1379. function GetKeyNameText;        external 'KEYBOARD' index 133;
  1380. procedure AnsiToOemBuff;        external 'KEYBOARD' index 134;
  1381. procedure OemToAnsiBuff;        external 'KEYBOARD' index 135;
  1382.  
  1383. { Various wrapper routines }
  1384.  
  1385. function LockData(Dummy: Integer): THandle;
  1386. begin
  1387.   LockData := LockSegment($FFFF);
  1388. end;
  1389.  
  1390. function UnlockData(Dummy: Integer): THandle;
  1391. begin
  1392.   UnlockData := UnlockSegment($FFFF);
  1393. end;
  1394.  
  1395. function GlobalDiscard(Mem: THandle): THandle;
  1396. begin
  1397.   GlobalDiscard := GlobalReAlloc(Mem, 0, gmem_Moveable);
  1398. end;
  1399.  
  1400. function LocalDiscard(Mem: THandle): THandle; 
  1401. begin
  1402.   LocalDiscard := LocalReAlloc(Mem, 0, lmem_Moveable);
  1403. end;
  1404.  
  1405. function LocalLock(Mem: THandle): Pointer; assembler;
  1406. asm
  1407.     PUSH    Mem
  1408.     CALL    _LocalLock
  1409.     MOV    DX,DS
  1410. end;
  1411.  
  1412. end.
  1413.  
  1414.