func.inc 166 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479
  1. {
  2. This file is part of the Free Pascal run time library.
  3. This unit contains the record definition for the Win32 API
  4. Copyright (c) 1999-2014 by Florian Klaempfl,
  5. member of the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {
  13. Functions.h
  14. Declarations for all the Windows32 API Functions
  15. Copyright (C) 1996, 1997 Free Software Foundation, Inc.
  16. Author: Scott Christley <[email protected]>
  17. This file is part of the Windows32 API Library.
  18. This library is free software; you can redistribute it and/or
  19. modify it under the terms of the GNU Library General Public
  20. License as published by the Free Software Foundation; either
  21. version 2 of the License, or (at your option) any later version.
  22. This library is distributed in the hope that it will be useful,
  23. but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  25. Library General Public License for more details.
  26. If you are interested in a warranty or support for this source code,
  27. contact Scott Christley <[email protected]> for more information.
  28. You should have received a copy of the GNU Library General Public
  29. License along with this library; see the file COPYING.LIB.
  30. If not, write to the Free Software Foundation,
  31. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  32. }
  33. {$ifdef read_interface}
  34. function GetRandomRgn(aHDC: HDC; aHRGN: HRGN; iNum: WINT): WINT; stdcall; external 'gdi32';
  35. function AccessCheck(pSecurityDescriptor:PSECURITY_DESCRIPTOR; ClientToken:HANDLE; DesiredAccess:DWORD; GenericMapping:PGENERIC_MAPPING; PrivilegeSet:PPRIVILEGE_SET;PrivilegeSetLength:LPDWORD;
  36. GrantedAccess:LPDWORD; AccessStatus:LPBOOL):WINBOOL; external 'advapi32' name 'AccessCheck';
  37. function FreeResource(hResData:HGLOBAL):WINBOOL; external 'kernel32' name 'FreeResource';
  38. function LockResource(hResData:HGLOBAL):LPVOID; external 'kernel32' name 'LockResource';
  39. {$ifdef Unknown_functions}
  40. { WARNING: function not found !!}
  41. function WinMain(hInstance:HINST; hPrevInstance:HINST; lpCmdLine:LPSTR; nShowCmd:longint):longint; external 'kernel32' name 'WinMain';
  42. {$endif Unknown_functions}
  43. function FreeLibrary(hLibModule:HINST):WINBOOL; external 'kernel32' name 'FreeLibrary';
  44. procedure FreeLibraryAndExitThread(hLibModule:HMODULE; dwExitCode:DWORD); external 'kernel32' name 'FreeLibraryAndExitThread';
  45. function DisableThreadLibraryCalls(hLibModule:HMODULE):WINBOOL; external 'kernel32' name 'DisableThreadLibraryCalls';
  46. function GetProcAddress(hModule:HINST; lpProcName:LPCSTR):FARPROC; external 'kernel32' name 'GetProcAddress';
  47. function GetVersion:DWORD; external 'kernel32' name 'GetVersion';
  48. function GlobalAlloc(uFlags:UINT; dwBytes:PTRUINT):HGLOBAL; external 'kernel32' name 'GlobalAlloc';
  49. function GlobalDiscard(hglbMem:HGLOBAL):HGLOBAL;
  50. function GlobalReAlloc(hMem:HGLOBAL; dwBytes:PTRUINT; uFlags:UINT):HGLOBAL; external 'kernel32' name 'GlobalReAlloc';
  51. function GlobalSize(hMem:HGLOBAL):PTRUINT; external 'kernel32' name 'GlobalSize';
  52. function GlobalFlags(hMem:HGLOBAL):UINT; external 'kernel32' name 'GlobalFlags';
  53. function GlobalLock(hMem:HGLOBAL):LPVOID; external 'kernel32' name 'GlobalLock';
  54. function GlobalHandle(pMem:LPCVOID):HGLOBAL; external 'kernel32' name 'GlobalHandle';
  55. function GlobalUnlock(hMem:HGLOBAL):WINBOOL; external 'kernel32' name 'GlobalUnlock';
  56. function GlobalFree(hMem:HGLOBAL):HGLOBAL; external 'kernel32' name 'GlobalFree';
  57. function GlobalCompact(dwMinFree:DWORD):UINT; external 'kernel32' name 'GlobalCompact';
  58. procedure GlobalFix(hMem:HGLOBAL); external 'kernel32' name 'GlobalFix';
  59. procedure GlobalUnfix(hMem:HGLOBAL); external 'kernel32' name 'GlobalUnfix';
  60. function GlobalWire(hMem:HGLOBAL):LPVOID; external 'kernel32' name 'GlobalWire';
  61. function GlobalUnWire(hMem:HGLOBAL):WINBOOL; external 'kernel32' name 'GlobalUnWire';
  62. procedure GlobalMemoryStatus(lpBuffer:LPMEMORYSTATUS); external 'kernel32' name 'GlobalMemoryStatus';
  63. function LocalAlloc(uFlags:UINT; uBytes:PTRUINT):HLOCAL; external 'kernel32' name 'LocalAlloc';
  64. function LocalDiscard(hlocMem:HLOCAL):HLOCAL;
  65. function LocalReAlloc(hMem:HLOCAL; uBytes:PTRUINT; uFlags:UINT):HLOCAL; external 'kernel32' name 'LocalReAlloc';
  66. function LocalLock(hMem:HLOCAL):LPVOID; external 'kernel32' name 'LocalLock';
  67. function LocalHandle(pMem:LPCVOID):HLOCAL; external 'kernel32' name 'LocalHandle';
  68. function LocalUnlock(hMem:HLOCAL):WINBOOL; external 'kernel32' name 'LocalUnlock';
  69. function LocalSize(hMem:HLOCAL):UINT; external 'kernel32' name 'LocalSize';
  70. function LocalFlags(hMem:HLOCAL):UINT; external 'kernel32' name 'LocalFlags';
  71. function LocalFree(hMem:HLOCAL):HLOCAL; external 'kernel32' name 'LocalFree';
  72. function LocalShrink(hMem:HLOCAL; cbNewSize:UINT):UINT; external 'kernel32' name 'LocalShrink';
  73. function LocalCompact(uMinFree:UINT):UINT; external 'kernel32' name 'LocalCompact';
  74. function FlushInstructionCache(hProcess:HANDLE; lpBaseAddress:LPCVOID; dwSize:PTRUINT):WINBOOL; external 'kernel32' name 'FlushInstructionCache';
  75. function VirtualAlloc(lpAddress:LPVOID; dwSize:PTRUINT; flAllocationType:DWORD; flProtect:DWORD):LPVOID; external 'kernel32' name 'VirtualAlloc';
  76. function VirtualAllocEx(hProcess:THandle;lpAddress:LPVOID;dwsize:PTRUINT;flAllocationType :DWORD;flProtect:DWORD):LPVOID; external 'kernel32' name 'VirtualAllocEx';
  77. function VirtualAllocExNuma(hProcess:THandle;lpAddress:LPVOID;dwsize:PTRUINT;flAllocationType :DWORD;flProtect:DWORD;nndPreferred:DWORD):LPVOID; external 'kernel32' name 'VirtualAllocExNuma';
  78. function VirtualFree(lpAddress:LPVOID; dwSize:PTRUINT; dwFreeType:DWORD):WINBOOL; external 'kernel32' name 'VirtualFree';
  79. function VirtualFreeEx(hProcess:THandle;lpAddress:LPVOID; dwSize:PTRUINT; dwFreeType:DWORD):WINBOOL; external 'kernel32' name 'VirtualFreeEx';
  80. function VirtualProtect(lpAddress:LPVOID; dwSize:PTRUINT; flNewProtect:DWORD; lpflOldProtect:PDWORD):WINBOOL; external 'kernel32' name 'VirtualProtect';
  81. function VirtualQuery(lpAddress:LPCVOID; lpBuffer:PMEMORY_BASIC_INFORMATION; dwLength:PTRUINT):PTRUINT; external 'kernel32' name 'VirtualQuery';
  82. function VirtualProtectEx(hProcess:HANDLE; lpAddress:LPVOID; dwSize:PTRUINT; flNewProtect:DWORD; lpflOldProtect:PDWORD):WINBOOL; external 'kernel32' name 'VirtualProtectEx';
  83. function VirtualQueryEx(hProcess:HANDLE; lpAddress:LPCVOID; lpBuffer:PMEMORY_BASIC_INFORMATION; dwLength:PTRUINT):PTRUINT; external 'kernel32' name 'VirtualQueryEx';
  84. function HeapCreate(flOptions:DWORD; dwInitialSize:PTRUINT; dwMaximumSize:PTRUINT):HANDLE; external 'kernel32' name 'HeapCreate';
  85. function HeapDestroy(hHeap:HANDLE):WINBOOL; external 'kernel32' name 'HeapDestroy';
  86. function HeapAlloc(hHeap:HANDLE; dwFlags:DWORD; dwBytes:PTRUINT):LPVOID; external 'kernel32' name 'HeapAlloc';
  87. function HeapReAlloc(hHeap:HANDLE; dwFlags:DWORD; lpMem:LPVOID; dwBytes:PTRUINT):LPVOID; external 'kernel32' name 'HeapReAlloc';
  88. function HeapFree(hHeap:HANDLE; dwFlags:DWORD; lpMem:LPVOID):WINBOOL; external 'kernel32' name 'HeapFree';
  89. function HeapSize(hHeap:HANDLE; dwFlags:DWORD; lpMem:LPCVOID):PTRUINT; external 'kernel32' name 'HeapSize';
  90. function HeapValidate(hHeap:HANDLE; dwFlags:DWORD; lpMem:LPCVOID):WINBOOL; external 'kernel32' name 'HeapValidate';
  91. function HeapCompact(hHeap:HANDLE; dwFlags:DWORD):PTRUINT; external 'kernel32' name 'HeapCompact';
  92. function GetProcessHeap:HANDLE; external 'kernel32' name 'GetProcessHeap';
  93. function GetProcessHeaps(NumberOfHeaps:DWORD; ProcessHeaps:PHANDLE):DWORD; external 'kernel32' name 'GetProcessHeaps';
  94. function HeapLock(hHeap:HANDLE):WINBOOL; external 'kernel32' name 'HeapLock';
  95. function HeapUnlock(hHeap:HANDLE):WINBOOL; external 'kernel32' name 'HeapUnlock';
  96. function HeapWalk(hHeap:HANDLE; lpEntry:LPPROCESS_HEAP_ENTRY):WINBOOL; external 'kernel32' name 'HeapWalk';
  97. function GetProcessAffinityMask(hProcess:HANDLE; lpProcessAffinityMask:PDWORD_PTR; lpSystemAffinityMask:PDWORD_PTR):WINBOOL; external 'kernel32' name 'GetProcessAffinityMask';
  98. function GetProcessTimes(hProcess:HANDLE; lpCreationTime:LPFILETIME; lpExitTime:LPFILETIME; lpKernelTime:LPFILETIME; lpUserTime:LPFILETIME):WINBOOL; external 'kernel32' name 'GetProcessTimes';
  99. function GetProcessWorkingSetSize(hProcess:HANDLE; lpMinimumWorkingSetSize:PPTRUINT; lpMaximumWorkingSetSize:PPTRUINT):WINBOOL; external 'kernel32' name 'GetProcessWorkingSetSize';
  100. function SetProcessWorkingSetSize(hProcess:HANDLE; dwMinimumWorkingSetSize:PTRUINT; dwMaximumWorkingSetSize:PTRUINT):WINBOOL; external 'kernel32' name 'SetProcessWorkingSetSize';
  101. function OpenProcess(dwDesiredAccess:DWORD; bInheritHandle:WINBOOL; dwProcessId:DWORD):HANDLE; external 'kernel32' name 'OpenProcess';
  102. function GetCurrentProcess:HANDLE; external 'kernel32' name 'GetCurrentProcess';
  103. function GetCurrentProcessId:DWORD; external 'kernel32' name 'GetCurrentProcessId';
  104. procedure ExitProcess(uExitCode:UINT);external 'kernel32' name 'ExitProcess';
  105. function TerminateProcess(hProcess:HANDLE; uExitCode:UINT):WINBOOL; external 'kernel32' name 'TerminateProcess';
  106. function SetProcessAffinityMask(hProcess: THandle; dwProcessAffinityMask: DWORD_PTR): BOOL; external 'kernel32' name 'SetProcessAffinityMask';
  107. function GetExitCodeProcess(hProcess:HANDLE; lpExitCode:LPDWORD):WINBOOL; external 'kernel32' name 'GetExitCodeProcess';
  108. procedure FatalExit(ExitCode:longint); external 'kernel32' name 'FatalExit';
  109. procedure RaiseException(dwExceptionCode:DWORD; dwExceptionFlags:DWORD; nNumberOfArguments:DWORD; lpArguments:LPDWORD); external 'kernel32' name 'RaiseException';
  110. function UnhandledExceptionFilter(ExceptionInfo:lpemptyrecord):LONG; external 'kernel32' name 'UnhandledExceptionFilter';
  111. function CreateRemoteThread(hProcess:HANDLE; lpThreadAttributes:LPSECURITY_ATTRIBUTES; dwStackSize:PTRUINT; lpStartAddress:LPTHREAD_START_ROUTINE; lpParameter:LPVOID;
  112. dwCreationFlags:DWORD; lpThreadId:LPDWORD):HANDLE; external 'kernel32' name 'CreateRemoteThread';
  113. function GetCurrentThread:HANDLE; external 'kernel32' name 'GetCurrentThread';
  114. function GetCurrentThreadId:DWORD; external 'kernel32' name 'GetCurrentThreadId';
  115. function SetThreadAffinityMask(hThread:HANDLE; dwThreadAffinityMask:DWORD_PTR):DWORD_PTR; external 'kernel32' name 'SetThreadAffinityMask';
  116. function SetThreadPriority(hThread:HANDLE; nPriority:longint):WINBOOL; external 'kernel32' name 'SetThreadPriority';
  117. function GetThreadPriority(hThread:HANDLE):longint; external 'kernel32' name 'GetThreadPriority';
  118. function GetThreadTimes(hThread:HANDLE; lpCreationTime:LPFILETIME; lpExitTime:LPFILETIME; lpKernelTime:LPFILETIME; lpUserTime:LPFILETIME):WINBOOL; external 'kernel32' name 'GetThreadTimes';
  119. procedure ExitThread(dwExitCode:DWORD); external 'kernel32' name 'ExitThread';
  120. function TerminateThread(hThread:HANDLE; dwExitCode:DWORD):WINBOOL; external 'kernel32' name 'TerminateThread';
  121. function GetExitCodeThread(hThread:HANDLE; lpExitCode:LPDWORD):WINBOOL; external 'kernel32' name 'GetExitCodeThread';
  122. function GetThreadSelectorEntry(hThread:HANDLE; dwSelector:DWORD; lpSelectorEntry:LPLDT_ENTRY):WINBOOL; external 'kernel32' name 'GetThreadSelectorEntry';
  123. function GetLastError:DWORD; external 'kernel32' name 'GetLastError';
  124. procedure SetLastError(dwErrCode:DWORD); external 'kernel32' name 'SetLastError';
  125. function GetErrorMode : DWORD; stdcall; external 'kernel32' name 'GetErrorMode';
  126. function CreateIoCompletionPort(FileHandle:HANDLE; ExistingCompletionPort:HANDLE; CompletionKey:ULONG_PTR; NumberOfConcurrentThreads:DWORD):HANDLE; external 'kernel32' name 'CreateIoCompletionPort';
  127. function SetErrorMode(uMode:UINT):UINT; external 'kernel32' name 'SetErrorMode';
  128. function ReadProcessMemory(hProcess:HANDLE; lpBaseAddress:LPCVOID; lpBuffer:LPVOID; nSize:PTRUINT; lpNumberOfBytesRead:PPTRUINT):WINBOOL; external 'kernel32' name 'ReadProcessMemory';
  129. function WriteProcessMemory(hProcess:HANDLE; lpBaseAddress:LPVOID; lpBuffer:LPVOID; nSize:PTRUINT; lpNumberOfBytesWritten:PPTRUINT):WINBOOL; external 'kernel32' name 'WriteProcessMemory';
  130. function GetThreadContext(hThread:HANDLE; lpContext:LPCONTEXT):WINBOOL; external 'kernel32' name 'GetThreadContext';
  131. function SuspendThread(hThread:HANDLE):DWORD; external 'kernel32' name 'SuspendThread';
  132. function ResumeThread(hThread:HANDLE):DWORD; external 'kernel32' name 'ResumeThread';
  133. procedure DebugBreak; external 'kernel32' name 'DebugBreak';
  134. function WaitForDebugEvent(lpDebugEvent:LPDEBUG_EVENT; dwMilliseconds:DWORD):WINBOOL; external 'kernel32' name 'WaitForDebugEvent';
  135. function ContinueDebugEvent(dwProcessId:DWORD; dwThreadId:DWORD; dwContinueStatus:DWORD):WINBOOL; external 'kernel32' name 'ContinueDebugEvent';
  136. function DebugActiveProcess(dwProcessId:DWORD):WINBOOL; external 'kernel32' name 'DebugActiveProcess';
  137. procedure InitializeCriticalSection(lpCriticalSection:LPCRITICAL_SECTION); external 'kernel32' name 'InitializeCriticalSection';
  138. procedure EnterCriticalSection(lpCriticalSection:LPCRITICAL_SECTION); external 'kernel32' name 'EnterCriticalSection';
  139. procedure LeaveCriticalSection(lpCriticalSection:LPCRITICAL_SECTION); external 'kernel32' name 'LeaveCriticalSection';
  140. procedure DeleteCriticalSection(lpCriticalSection:LPCRITICAL_SECTION); external 'kernel32' name 'DeleteCriticalSection';
  141. function TryEnterCriticalSection(lpCriticalSection:LPCRITICAL_SECTION):WINBOOL; external 'kernel32' name 'TryEnterCriticalSection';
  142. function SetEvent(hEvent:HANDLE):WINBOOL; external 'kernel32' name 'SetEvent';
  143. function ResetEvent(hEvent:HANDLE):WINBOOL; external 'kernel32' name 'ResetEvent';
  144. function PulseEvent(hEvent:HANDLE):WINBOOL; external 'kernel32' name 'PulseEvent';
  145. function ReleaseSemaphore(hSemaphore:HANDLE; lReleaseCount:LONG; lpPreviousCount:LPLONG):WINBOOL; external 'kernel32' name 'ReleaseSemaphore';
  146. function ReleaseMutex(hMutex:HANDLE):WINBOOL; external 'kernel32' name 'ReleaseMutex';
  147. function WaitForSingleObject(hHandle:HANDLE; dwMilliseconds:DWORD):DWORD; external 'kernel32' name 'WaitForSingleObject';
  148. function WaitForMultipleObjects(nCount:DWORD; lpHandles : PWOHandleArray; bWaitAll:WINBOOL; dwMilliseconds:DWORD):DWORD; external 'kernel32' name 'WaitForMultipleObjects';
  149. procedure Sleep(dwMilliseconds:DWORD); external 'kernel32' name 'Sleep';
  150. function LoadResource(hModule:HINST; hResInfo:HRSRC):HGLOBAL; external 'kernel32' name 'LoadResource';
  151. function SizeofResource(hModule:HINST; hResInfo:HRSRC):DWORD; external 'kernel32' name 'SizeofResource';
  152. function GlobalDeleteAtom(nAtom:ATOM):ATOM; external 'kernel32' name 'GlobalDeleteAtom';
  153. function InitAtomTable(nSize:DWORD):WINBOOL; external 'kernel32' name 'InitAtomTable';
  154. function DeleteAtom(nAtom:ATOM):ATOM; external 'kernel32' name 'DeleteAtom';
  155. function SetHandleCount(uNumber:UINT):UINT; external 'kernel32' name 'SetHandleCount';
  156. function GetLogicalDrives:DWORD; external 'kernel32' name 'GetLogicalDrives';
  157. function LockFile(hFile:HANDLE; dwFileOffsetLow:DWORD; dwFileOffsetHigh:DWORD; nNumberOfBytesToLockLow:DWORD; nNumberOfBytesToLockHigh:DWORD):WINBOOL; external 'kernel32' name 'LockFile';
  158. function UnlockFile(hFile:HANDLE; dwFileOffsetLow:DWORD; dwFileOffsetHigh:DWORD; nNumberOfBytesToUnlockLow:DWORD; nNumberOfBytesToUnlockHigh:DWORD):WINBOOL; external 'kernel32' name 'UnlockFile';
  159. function LockFileEx(hFile:HANDLE; dwFlags:DWORD; dwReserved:DWORD; nNumberOfBytesToLockLow:DWORD; nNumberOfBytesToLockHigh:DWORD;lpOverlapped:LPOVERLAPPED):WINBOOL; external 'kernel32' name 'LockFileEx';
  160. function UnlockFileEx(hFile:HANDLE; dwReserved:DWORD; nNumberOfBytesToUnlockLow:DWORD; nNumberOfBytesToUnlockHigh:DWORD; lpOverlapped:LPOVERLAPPED):WINBOOL; external 'kernel32' name 'UnlockFileEx';
  161. function GetFileInformationByHandle(hFile:HANDLE; lpFileInformation:LPBY_HANDLE_FILE_INFORMATION):WINBOOL; external 'kernel32' name 'GetFileInformationByHandle';
  162. function GetFileType(hFile:HANDLE):DWORD; external 'kernel32' name 'GetFileType';
  163. function GetFileSize(hFile:HANDLE; lpFileSizeHigh:LPDWORD):DWORD; external 'kernel32' name 'GetFileSize';
  164. function GetStdHandle(nStdHandle:DWORD):HANDLE; external 'kernel32' name 'GetStdHandle';
  165. function SetStdHandle(nStdHandle:DWORD; hHandle:HANDLE):WINBOOL; external 'kernel32' name 'SetStdHandle';
  166. function FlushFileBuffers(hFile:HANDLE):WINBOOL; external 'kernel32' name 'FlushFileBuffers';
  167. function DeviceIoControl(hDevice:HANDLE; dwIoControlCode:DWORD; lpInBuffer:LPVOID; nInBufferSize:DWORD; lpOutBuffer:LPVOID;nOutBufferSize:DWORD; lpBytesReturned:LPDWORD; lpOverlapped:LPOVERLAPPED):WINBOOL; external 'kernel32' name 'DeviceIoControl';
  168. function SetEndOfFile(hFile:HANDLE):WINBOOL; external 'kernel32' name 'SetEndOfFile';
  169. function SetFilePointer(hFile:HANDLE; lDistanceToMove:LONG; lpDistanceToMoveHigh:PLONG; dwMoveMethod:DWORD):DWORD; external 'kernel32' name 'SetFilePointer';
  170. function FindClose(hFindFile:HANDLE):WINBOOL; external 'kernel32' name 'FindClose';
  171. function GetFileTime(hFile:HANDLE; lpCreationTime:LPFILETIME; lpLastAccessTime:LPFILETIME; lpLastWriteTime:LPFILETIME):WINBOOL; external 'kernel32' name 'GetFileTime';
  172. function SetFileTime(hFile:HANDLE; lpCreationTime:LPFILETIME; lpLastAccessTime:LPFILETIME; lpLastWriteTime:LPFILETIME):WINBOOL; external 'kernel32' name 'SetFileTime';
  173. function CloseHandle(hObject:HANDLE):WINBOOL; external 'kernel32' name 'CloseHandle';
  174. function DuplicateHandle(hSourceProcessHandle:HANDLE; hSourceHandle:HANDLE; hTargetProcessHandle:HANDLE; lpTargetHandle:LPHANDLE; dwDesiredAccess:DWORD;bInheritHandle:WINBOOL; dwOptions:DWORD):WINBOOL; external 'kernel32' name 'DuplicateHandle';
  175. function GetHandleInformation(hObject:HANDLE; lpdwFlags:LPDWORD):WINBOOL; external 'kernel32' name 'GetHandleInformation';
  176. function SetHandleInformation(hObject:HANDLE; dwMask:DWORD; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'SetHandleInformation';
  177. function LoadModule(lpModuleName:LPCSTR; lpParameterBlock:LPVOID):DWORD; external 'kernel32' name 'LoadModule';
  178. // Winexec is a win16 legacy function, deprecated for 17 years (deprecated since Windows 95).
  179. // Annotated the MS deprecated status with a FPC deprecated directive so it won't be used for new development.
  180. function WinExec(lpCmdLine:LPCSTR; uCmdShow:UINT):UINT; external 'kernel32' name 'WinExec'; deprecated;
  181. function ClearCommBreak(hFile:HANDLE):WINBOOL; external 'kernel32' name 'ClearCommBreak';
  182. function ClearCommError(hFile:HANDLE; lpErrors:LPDWORD; lpStat:LPCOMSTAT):WINBOOL; external 'kernel32' name 'ClearCommError';
  183. function SetupComm(hFile:HANDLE; dwInQueue:DWORD; dwOutQueue:DWORD):WINBOOL; external 'kernel32' name 'SetupComm';
  184. function EscapeCommFunction(hFile:HANDLE; dwFunc:DWORD):WINBOOL; external 'kernel32' name 'EscapeCommFunction';
  185. function GetCommConfig(hCommDev:HANDLE; lpCC:LPCOMMCONFIG; lpdwSize:LPDWORD):WINBOOL; external 'kernel32' name 'GetCommConfig';
  186. function GetCommProperties(hFile:HANDLE; lpCommProp:LPCOMMPROP):WINBOOL; external 'kernel32' name 'GetCommProperties';
  187. function GetCommModemStatus(hFile:HANDLE; lpModemStat:PDWORD):WINBOOL; external 'kernel32' name 'GetCommModemStatus';
  188. function GetCommState(hFile:HANDLE; lpDCB:PDCB):WINBOOL; external 'kernel32' name 'GetCommState';
  189. function GetCommTimeouts(hFile:HANDLE; lpCommTimeouts:PCOMMTIMEOUTS):WINBOOL; external 'kernel32' name 'GetCommTimeouts';
  190. function PurgeComm(hFile:HANDLE; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'PurgeComm';
  191. function SetCommBreak(hFile:HANDLE):WINBOOL; external 'kernel32' name 'SetCommBreak';
  192. function SetCommConfig(hCommDev:HANDLE; lpCC:LPCOMMCONFIG; dwSize:DWORD):WINBOOL; external 'kernel32' name 'SetCommConfig';
  193. function SetCommMask(hFile:HANDLE; dwEvtMask:DWORD):WINBOOL; external 'kernel32' name 'SetCommMask';
  194. function SetCommState(hFile:HANDLE; lpDCB:LPDCB):WINBOOL; external 'kernel32' name 'SetCommState';
  195. function SetCommTimeouts(hFile:HANDLE; lpCommTimeouts:LPCOMMTIMEOUTS):WINBOOL; external 'kernel32' name 'SetCommTimeouts';
  196. function TransmitCommChar(hFile:HANDLE; cChar:char):WINBOOL; external 'kernel32' name 'TransmitCommChar';
  197. function WaitCommEvent(hFile:HANDLE; lpEvtMask:LPDWORD; lpOverlapped:LPOVERLAPPED):WINBOOL; external 'kernel32' name 'WaitCommEvent';
  198. function SetTapePosition(hDevice:HANDLE; dwPositionMethod:DWORD; dwPartition:DWORD; dwOffsetLow:DWORD; dwOffsetHigh:DWORD;bImmediate:WINBOOL):DWORD; external 'kernel32' name 'SetTapePosition';
  199. function GetTapePosition(hDevice:HANDLE; dwPositionType:DWORD; lpdwPartition:LPDWORD; lpdwOffsetLow:LPDWORD; lpdwOffsetHigh:LPDWORD):DWORD; external 'kernel32' name 'GetTapePosition';
  200. function PrepareTape(hDevice:HANDLE; dwOperation:DWORD; bImmediate:WINBOOL):DWORD; external 'kernel32' name 'PrepareTape';
  201. function EraseTape(hDevice:HANDLE; dwEraseType:DWORD; bImmediate:WINBOOL):DWORD; external 'kernel32' name 'EraseTape';
  202. function CreateTapePartition(hDevice:HANDLE; dwPartitionMethod:DWORD; dwCount:DWORD; dwSize:DWORD):DWORD; external 'kernel32' name 'CreateTapePartition';
  203. function WriteTapemark(hDevice:HANDLE; dwTapemarkType:DWORD; dwTapemarkCount:DWORD; bImmediate:WINBOOL):DWORD; external 'kernel32' name 'WriteTapemark';
  204. function GetTapeStatus(hDevice:HANDLE):DWORD; external 'kernel32' name 'GetTapeStatus';
  205. function GetTapeParameters(hDevice:HANDLE; dwOperation:DWORD; lpdwSize:LPDWORD; lpTapeInformation:LPVOID):DWORD; external 'kernel32' name 'GetTapeParameters';
  206. function SetTapeParameters(hDevice:HANDLE; dwOperation:DWORD; lpTapeInformation:LPVOID):DWORD; external 'kernel32' name 'SetTapeParameters';
  207. function Beep(dwFreq:DWORD; dwDuration:DWORD):WINBOOL; external 'kernel32' name 'Beep';
  208. {$ifdef Unknown_functions}
  209. { WARNING: functions not found !!}
  210. procedure OpenSound; external External_library name 'OpenSound';
  211. procedure CloseSound; external External_library name 'CloseSound';
  212. procedure StartSound; external External_library name 'StartSound';
  213. procedure StopSound; external External_library name 'StopSound';
  214. function WaitSoundState(nState:DWORD):DWORD; external External_library name 'WaitSoundState';
  215. function SyncAllVoices:DWORD; external External_library name 'SyncAllVoices';
  216. function CountVoiceNotes(nVoice:DWORD):DWORD; external External_library name 'CountVoiceNotes';
  217. function GetThresholdEvent:LPDWORD; external External_library name 'GetThresholdEvent';
  218. function GetThresholdStatus:DWORD; external External_library name 'GetThresholdStatus';
  219. function SetSoundNoise(nSource:DWORD; nDuration:DWORD):DWORD; external External_library name 'SetSoundNoise';
  220. function SetVoiceAccent(nVoice:DWORD; nTempo:DWORD; nVolume:DWORD; nMode:DWORD; nPitch:DWORD):DWORD; external External_library name 'SetVoiceAccent';
  221. function SetVoiceEnvelope(nVoice:DWORD; nShape:DWORD; nRepeat:DWORD):DWORD; external External_library name 'SetVoiceEnvelope';
  222. function SetVoiceNote(nVoice:DWORD; nValue:DWORD; nLength:DWORD; nCdots:DWORD):DWORD; external External_library name 'SetVoiceNote';
  223. function SetVoiceQueueSize(nVoice:DWORD; nBytes:DWORD):DWORD; external External_library name 'SetVoiceQueueSize';
  224. function SetVoiceSound(nVoice:DWORD; Frequency:DWORD; nDuration:DWORD):DWORD; external External_library name 'SetVoiceSound';
  225. function SetVoiceThreshold(nVoice:DWORD; nNotes:DWORD):DWORD; external External_library name 'SetVoiceThreshold';
  226. {$endif Unknown_functions}
  227. function MulDiv(nNumber:longint; nNumerator:longint; nDenominator:longint):longint; external 'kernel32' name 'MulDiv';
  228. procedure GetSystemTime(lpSystemTime:LPSYSTEMTIME); external 'kernel32' name 'GetSystemTime';
  229. procedure GetSystemTimeAsFileTime(lpSystemTimeAsFileTime:LPFILETIME); external 'kernel32' name 'GetSystemTimeAsFileTime';
  230. function SetSystemTime(lpSystemTime:LPSYSTEMTIME):WINBOOL; external 'kernel32' name 'SetSystemTime';
  231. procedure GetLocalTime(lpSystemTime:LPSYSTEMTIME); external 'kernel32' name 'GetLocalTime';
  232. function SetLocalTime(lpSystemTime:LPSYSTEMTIME):WINBOOL; external 'kernel32' name 'SetLocalTime';
  233. procedure GetSystemInfo(lpSystemInfo:LPSYSTEM_INFO); external 'kernel32' name 'GetSystemInfo';
  234. procedure GetNativeSystemInfo(lpSystemInfo:LPSYSTEM_INFO); external 'kernel32' name 'GetNativeSystemInfo';
  235. function SystemTimeToTzSpecificLocalTime(lpTimeZoneInformation:LPTIME_ZONE_INFORMATION; lpUniversalTime:LPSYSTEMTIME; lpLocalTime:LPSYSTEMTIME):WINBOOL; external 'kernel32' name 'SystemTimeToTzSpecificLocalTime';
  236. function GetTimeZoneInformation(lpTimeZoneInformation:LPTIME_ZONE_INFORMATION):DWORD; external 'kernel32' name 'GetTimeZoneInformation';
  237. function SetTimeZoneInformation(lpTimeZoneInformation:LPTIME_ZONE_INFORMATION):WINBOOL; external 'kernel32' name 'SetTimeZoneInformation';
  238. function SystemTimeToFileTime(lpSystemTime:LPSYSTEMTIME; lpFileTime:LPFILETIME):WINBOOL; external 'kernel32' name 'SystemTimeToFileTime';
  239. function FileTimeToLocalFileTime(lpFileTime:LPFILETIME; lpLocalFileTime:LPFILETIME):WINBOOL; external 'kernel32' name 'FileTimeToLocalFileTime';
  240. function LocalFileTimeToFileTime(lpLocalFileTime:LPFILETIME; lpFileTime:LPFILETIME):WINBOOL; external 'kernel32' name 'LocalFileTimeToFileTime';
  241. function FileTimeToSystemTime(lpFileTime:LPFILETIME; lpSystemTime:LPSYSTEMTIME):WINBOOL; external 'kernel32' name 'FileTimeToSystemTime';
  242. function CompareFileTime(lpFileTime1:LPFILETIME; lpFileTime2:LPFILETIME):LONG; external 'kernel32' name 'CompareFileTime';
  243. function FileTimeToDosDateTime(lpFileTime:LPFILETIME; lpFatDate:LPWORD; lpFatTime:LPWORD):WINBOOL; external 'kernel32' name 'FileTimeToDosDateTime';
  244. function DosDateTimeToFileTime(wFatDate:WORD; wFatTime:WORD; lpFileTime:LPFILETIME):WINBOOL; external 'kernel32' name 'DosDateTimeToFileTime';
  245. function GetTickCount:DWORD; external 'kernel32' name 'GetTickCount';
  246. // GetTickCount64 requires Windows Vista/Windows Server 2008 or higher
  247. function GetTickCount64:ULONGLONG; external 'kernel32' name 'GetTickCount64';
  248. function SetSystemTimeAdjustment(dwTimeAdjustment:DWORD; bTimeAdjustmentDisabled:WINBOOL):WINBOOL; external 'kernel32' name 'SetSystemTimeAdjustment';
  249. function GetSystemTimeAdjustment(lpTimeAdjustment:PDWORD; lpTimeIncrement:PDWORD; lpTimeAdjustmentDisabled:PWINBOOL):WINBOOL; external 'kernel32' name 'GetSystemTimeAdjustment';
  250. function CreatePipe(hReadPipe:PHANDLE; hWritePipe:PHANDLE; lpPipeAttributes:LPSECURITY_ATTRIBUTES; nSize:DWORD):WINBOOL; external 'kernel32' name 'CreatePipe';
  251. function ConnectNamedPipe(hNamedPipe:HANDLE; lpOverlapped:LPOVERLAPPED):WINBOOL; external 'kernel32' name 'ConnectNamedPipe';
  252. function DisconnectNamedPipe(hNamedPipe:HANDLE):WINBOOL; external 'kernel32' name 'DisconnectNamedPipe';
  253. function SetNamedPipeHandleState(hNamedPipe:HANDLE; lpMode:LPDWORD; lpMaxCollectionCount:LPDWORD; lpCollectDataTimeout:LPDWORD):WINBOOL; external 'kernel32' name 'SetNamedPipeHandleState';
  254. function GetNamedPipeInfo(hNamedPipe:HANDLE; lpFlags:LPDWORD; lpOutBufferSize:LPDWORD; lpInBufferSize:LPDWORD; lpMaxInstances:LPDWORD):WINBOOL; external 'kernel32' name 'GetNamedPipeInfo';
  255. function PeekNamedPipe(hNamedPipe:HANDLE; lpBuffer:LPVOID; nBufferSize:DWORD; lpBytesRead:LPDWORD; lpTotalBytesAvail:LPDWORD;lpBytesLeftThisMessage:LPDWORD):WINBOOL; external 'kernel32' name 'PeekNamedPipe';
  256. function TransactNamedPipe(hNamedPipe:HANDLE; lpInBuffer:LPVOID; nInBufferSize:DWORD; lpOutBuffer:LPVOID; nOutBufferSize:DWORD;lpBytesRead:LPDWORD; lpOverlapped:LPOVERLAPPED):WINBOOL; external 'kernel32' name 'TransactNamedPipe';
  257. function GetMailslotInfo(hMailslot:HANDLE; lpMaxMessageSize:LPDWORD; lpNextSize:LPDWORD; lpMessageCount:LPDWORD; lpReadTimeout:LPDWORD):WINBOOL; external 'kernel32' name 'GetMailslotInfo';
  258. function SetMailslotInfo(hMailslot:HANDLE; lReadTimeout:DWORD):WINBOOL; external 'kernel32' name 'SetMailslotInfo';
  259. function MapViewOfFile(hFileMappingObject:HANDLE; dwDesiredAccess:DWORD; dwFileOffsetHigh:DWORD; dwFileOffsetLow:DWORD; dwNumberOfBytesToMap:SIZE_T):LPVOID; external 'kernel32' name 'MapViewOfFile';
  260. function FlushViewOfFile(lpBaseAddress:LPCVOID; dwNumberOfBytesToFlush:DWORD):WINBOOL; external 'kernel32' name 'FlushViewOfFile';
  261. function UnmapViewOfFile(lpBaseAddress:LPVOID):WINBOOL; external 'kernel32' name 'UnmapViewOfFile';
  262. function OpenFile(lpFileName:LPCSTR; lpReOpenBuff:LPOFSTRUCT; uStyle:UINT):HFILE; external 'kernel32' name 'OpenFile';
  263. function _lopen(lpPathName:LPCSTR; iReadWrite:longint):HFILE; external 'kernel32' name '_lopen';
  264. function _lcreat(lpPathName:LPCSTR; iAttribute:longint):HFILE; external 'kernel32' name '_lcreat';
  265. function _lread(hFile:HFILE; lpBuffer:LPVOID; uBytes:UINT):UINT; external 'kernel32' name '_lread';
  266. function _lwrite(hFile:HFILE; lpBuffer:LPCSTR; uBytes:UINT):UINT; external 'kernel32' name '_lwrite';
  267. function _hread(hFile:HFILE; lpBuffer:LPVOID; lBytes:longint):longint; external 'kernel32' name '_hread';
  268. function _hwrite(hFile:HFILE; lpBuffer:LPCSTR; lBytes:longint):longint; external 'kernel32' name '_hwrite';
  269. function _lclose(hFile:HFILE):HFILE; external 'kernel32' name '_lclose';
  270. function _llseek(hFile:HFILE; lOffset:LONG; iOrigin:longint):LONG; external 'kernel32' name '_llseek';
  271. function IsTextUnicode(lpBuffer:LPVOID; cb:longint; lpi:LPINT):WINBOOL; external 'advapi32' name 'IsTextUnicode';
  272. function TlsAlloc:DWORD; external 'kernel32' name 'TlsAlloc';
  273. function TlsGetValue(dwTlsIndex:DWORD):LPVOID; external 'kernel32' name 'TlsGetValue';
  274. function TlsSetValue(dwTlsIndex:DWORD; lpTlsValue:LPVOID):WINBOOL; external 'kernel32' name 'TlsSetValue';
  275. function TlsFree(dwTlsIndex:DWORD):WINBOOL; external 'kernel32' name 'TlsFree';
  276. function SleepEx(dwMilliseconds:DWORD; bAlertable:WINBOOL):DWORD; external 'kernel32' name 'SleepEx';
  277. function WaitForSingleObjectEx(hHandle:HANDLE; dwMilliseconds:DWORD; bAlertable:WINBOOL):DWORD; external 'kernel32' name 'WaitForSingleObjectEx';
  278. function WaitForMultipleObjectsEx(nCount:DWORD; lpHandles:LPHANDLE; bWaitAll:WINBOOL; dwMilliseconds:DWORD; bAlertable:WINBOOL):DWORD; external 'kernel32' name 'WaitForMultipleObjectsEx';
  279. function ReadFileEx(hFile:HANDLE; lpBuffer:LPVOID; nNumberOfBytesToRead:DWORD; lpOverlapped:LPOVERLAPPED; lpCompletionRoutine:LPOVERLAPPED_COMPLETION_ROUTINE):WINBOOL; external 'kernel32' name 'ReadFileEx';
  280. function WriteFileEx(hFile:HANDLE; lpBuffer:LPCVOID; nNumberOfBytesToWrite:DWORD; lpOverlapped:LPOVERLAPPED; lpCompletionRoutine:LPOVERLAPPED_COMPLETION_ROUTINE):WINBOOL; external 'kernel32' name 'WriteFileEx';
  281. function BackupRead(hFile:HANDLE; lpBuffer:LPBYTE; nNumberOfBytesToRead:DWORD; lpNumberOfBytesRead:LPDWORD; bAbort:WINBOOL;bProcessSecurity:WINBOOL; var lpContext:LPVOID):WINBOOL; external 'kernel32' name 'BackupRead';
  282. function BackupSeek(hFile:HANDLE; dwLowBytesToSeek:DWORD; dwHighBytesToSeek:DWORD; lpdwLowByteSeeked:LPDWORD; lpdwHighByteSeeked:LPDWORD;var lpContext:LPVOID):WINBOOL; external 'kernel32' name 'BackupSeek';
  283. function BackupWrite(hFile:HANDLE; lpBuffer:LPBYTE; nNumberOfBytesToWrite:DWORD; lpNumberOfBytesWritten:LPDWORD; bAbort:WINBOOL;bProcessSecurity:WINBOOL; var lpContext:LPVOID):WINBOOL; external 'kernel32' name 'BackupWrite';
  284. function SetProcessShutdownParameters(dwLevel:DWORD; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'SetProcessShutdownParameters';
  285. function GetProcessShutdownParameters(lpdwLevel:LPDWORD; lpdwFlags:LPDWORD):WINBOOL; external 'kernel32' name 'GetProcessShutdownParameters';
  286. procedure SetFileApisToOEM; external 'kernel32' name 'SetFileApisToOEM';
  287. procedure SetFileApisToANSI; external 'kernel32' name 'SetFileApisToANSI';
  288. function AreFileApisANSI:WINBOOL; external 'kernel32' name 'AreFileApisANSI';
  289. function CloseEventLog(hEventLog:HANDLE):WINBOOL; external 'advapi32' name 'CloseEventLog';
  290. function DeregisterEventSource(hEventLog:HANDLE):WINBOOL; external 'advapi32' name 'DeregisterEventSource';
  291. function NotifyChangeEventLog(hEventLog:HANDLE; hEvent:HANDLE):WINBOOL; external 'advapi32' name 'NotifyChangeEventLog';
  292. function GetNumberOfEventLogRecords(hEventLog:HANDLE; NumberOfRecords:PDWORD):WINBOOL; external 'advapi32' name 'GetNumberOfEventLogRecords';
  293. function GetOldestEventLogRecord(hEventLog:HANDLE; OldestRecord:PDWORD):WINBOOL; external 'advapi32' name 'GetOldestEventLogRecord';
  294. function DuplicateToken(ExistingTokenHandle:HANDLE; ImpersonationLevel:SECURITY_IMPERSONATION_LEVEL; DuplicateTokenHandle:PHANDLE):WINBOOL; external 'advapi32' name 'DuplicateToken';
  295. function GetKernelObjectSecurity(Handle:HANDLE; RequestedInformation:SECURITY_INFORMATION; pSecurityDescriptor:PSECURITY_DESCRIPTOR; nLength:DWORD; lpnLengthNeeded:LPDWORD):WINBOOL; external 'advapi32' name 'GetKernelObjectSecurity';
  296. function ImpersonateNamedPipeClient(hNamedPipe:HANDLE):WINBOOL; external 'advapi32' name 'ImpersonateNamedPipeClient';
  297. function ImpersonateLoggedOnUser(hToken:HANDLE):WINBOOL; external 'advapi32' name 'ImpersonateLoggedOnUser';
  298. function ImpersonateSelf(ImpersonationLevel:SECURITY_IMPERSONATION_LEVEL):WINBOOL; external 'advapi32' name 'ImpersonateSelf';
  299. function RevertToSelf:WINBOOL; external 'advapi32' name 'RevertToSelf';
  300. function SetThreadToken(Thread:PHANDLE; Token:HANDLE):WINBOOL; external 'advapi32' name 'SetThreadToken';
  301. { function AccessCheck(pSecurityDescriptor:PSECURITY_DESCRIPTOR; ClientToken:HANDLE; DesiredAccess:DWORD; GenericMapping:PGENERIC_MAPPING; PrivilegeSet:PPRIVILEGE_SET;PrivilegeSetLength:LPDWORD;
  302. GrantedAccess:LPDWORD; AccessStatus:LPBOOL):WINBOOL; external 'advapi32' name 'AccessCheck';
  303. }
  304. function OpenProcessToken(ProcessHandle:HANDLE; DesiredAccess:DWORD; TokenHandle:PHANDLE):WINBOOL; external 'advapi32' name 'OpenProcessToken';
  305. function OpenThreadToken(ThreadHandle:HANDLE; DesiredAccess:DWORD; OpenAsSelf:WINBOOL; TokenHandle:PHANDLE):WINBOOL; external 'advapi32' name 'OpenThreadToken';
  306. function GetTokenInformation(TokenHandle:HANDLE; TokenInformationClass:TOKEN_INFORMATION_CLASS; TokenInformation:LPVOID; TokenInformationLength:DWORD; ReturnLength:PDWORD):WINBOOL; external 'advapi32' name 'GetTokenInformation';
  307. function SetTokenInformation(TokenHandle:HANDLE; TokenInformationClass:TOKEN_INFORMATION_CLASS; TokenInformation:LPVOID; TokenInformationLength:DWORD):WINBOOL; external 'advapi32' name 'SetTokenInformation';
  308. function AdjustTokenPrivileges(TokenHandle:HANDLE; DisableAllPrivileges:WINBOOL; NewState:PTOKEN_PRIVILEGES; BufferLength:DWORD; PreviousState:PTOKEN_PRIVILEGES;ReturnLength:PDWORD):WINBOOL; external 'advapi32' name 'AdjustTokenPrivileges';
  309. function AdjustTokenGroups(TokenHandle:HANDLE; ResetToDefault:WINBOOL; NewState:PTOKEN_GROUPS; BufferLength:DWORD; PreviousState:PTOKEN_GROUPS;ReturnLength:PDWORD):WINBOOL; external 'advapi32' name 'AdjustTokenGroups';
  310. function PrivilegeCheck(ClientToken:HANDLE; RequiredPrivileges:PPRIVILEGE_SET; pfResult:LPBOOL):WINBOOL; external 'advapi32' name 'PrivilegeCheck';
  311. function IsValidSid(pSid:PSID):WINBOOL; external 'advapi32' name 'IsValidSid';
  312. function EqualSid(pSid1:PSID; pSid2:PSID):WINBOOL; external 'advapi32' name 'EqualSid';
  313. function EqualPrefixSid(pSid1:PSID; pSid2:PSID):WINBOOL; external 'advapi32' name 'EqualPrefixSid';
  314. function GetSidLengthRequired(nSubAuthorityCount:UCHAR):DWORD; external 'advapi32' name 'GetSidLengthRequired';
  315. function AllocateAndInitializeSid(pIdentifierAuthority:PSID_IDENTIFIER_AUTHORITY; nSubAuthorityCount:BYTE; nSubAuthority0:DWORD; nSubAuthority1:DWORD; nSubAuthority2:DWORD;nSubAuthority3:DWORD; nSubAuthority4:DWORD;
  316. nSubAuthority5:DWORD; nSubAuthority6:DWORD; nSubAuthority7:DWORD;var pSid:PSID):WINBOOL; external 'advapi32' name 'AllocateAndInitializeSid';
  317. function FreeSid(pSid:PSID):PVOID; external 'advapi32' name 'FreeSid';
  318. function InitializeSid(Sid:PSID; pIdentifierAuthority:PSID_IDENTIFIER_AUTHORITY; nSubAuthorityCount:BYTE):WINBOOL; external 'advapi32' name 'InitializeSid';
  319. function GetSidIdentifierAuthority(pSid:PSID):PSID_IDENTIFIER_AUTHORITY; external 'advapi32' name 'GetSidIdentifierAuthority';
  320. function GetSidSubAuthority(pSid:PSID; nSubAuthority:DWORD):PDWORD; external 'advapi32' name 'GetSidSubAuthority';
  321. function GetSidSubAuthorityCount(pSid:PSID):PUCHAR; external 'advapi32' name 'GetSidSubAuthorityCount';
  322. function GetLengthSid(pSid:PSID):DWORD; external 'advapi32' name 'GetLengthSid';
  323. function CopySid(nDestinationSidLength:DWORD; pDestinationSid:PSID; pSourceSid:PSID):WINBOOL; external 'advapi32' name 'CopySid';
  324. function AreAllAccessesGranted(GrantedAccess:DWORD; DesiredAccess:DWORD):WINBOOL; external 'advapi32' name 'AreAllAccessesGranted';
  325. function AreAnyAccessesGranted(GrantedAccess:DWORD; DesiredAccess:DWORD):WINBOOL; external 'advapi32' name 'AreAnyAccessesGranted';
  326. procedure MapGenericMask(AccessMask:PDWORD; GenericMapping:PGENERIC_MAPPING); external 'advapi32' name 'MapGenericMask';
  327. function IsValidAcl(pAcl:PACL):WINBOOL; external 'advapi32' name 'IsValidAcl';
  328. function InitializeAcl(pAcl:PACL; nAclLength:DWORD; dwAclRevision:DWORD):WINBOOL; external 'advapi32' name 'InitializeAcl';
  329. function GetAclInformation(pAcl:PACL; pAclInformation:LPVOID; nAclInformationLength:DWORD; dwAclInformationClass:ACL_INFORMATION_CLASS):WINBOOL; external 'advapi32' name 'GetAclInformation';
  330. function SetAclInformation(pAcl:PACL; pAclInformation:LPVOID; nAclInformationLength:DWORD; dwAclInformationClass:ACL_INFORMATION_CLASS):WINBOOL; external 'advapi32' name 'SetAclInformation';
  331. function AddAce(pAcl:PACL; dwAceRevision:DWORD; dwStartingAceIndex:DWORD; pAceList:LPVOID; nAceListLength:DWORD):WINBOOL; external 'advapi32' name 'AddAce';
  332. function DeleteAce(pAcl:PACL; dwAceIndex:DWORD):WINBOOL; external 'advapi32' name 'DeleteAce';
  333. function GetAce(pAcl:PACL; dwAceIndex:DWORD; var pAce:LPVOID):WINBOOL; external 'advapi32' name 'GetAce';
  334. function AddAccessAllowedAce(pAcl:PACL; dwAceRevision:DWORD; AccessMask:DWORD; pSid:PSID):WINBOOL; external 'advapi32' name 'AddAccessAllowedAce';
  335. function AddAccessDeniedAce(pAcl:PACL; dwAceRevision:DWORD; AccessMask:DWORD; pSid:PSID):WINBOOL; external 'advapi32' name 'AddAccessDeniedAce';
  336. function AddAuditAccessAce(pAcl:PACL; dwAceRevision:DWORD; dwAccessMask:DWORD; pSid:PSID; bAuditSuccess:WINBOOL;bAuditFailure:WINBOOL):WINBOOL; external 'advapi32' name 'AddAuditAccessAce';
  337. function FindFirstFreeAce(pAcl:PACL; var pAce:LPVOID):WINBOOL; external 'advapi32' name 'FindFirstFreeAce';
  338. function InitializeSecurityDescriptor(pSecurityDescriptor:PSECURITY_DESCRIPTOR; dwRevision:DWORD):WINBOOL; external 'advapi32' name 'InitializeSecurityDescriptor';
  339. function IsValidSecurityDescriptor(pSecurityDescriptor:PSECURITY_DESCRIPTOR):WINBOOL; external 'advapi32' name 'IsValidSecurityDescriptor';
  340. function GetSecurityDescriptorLength(pSecurityDescriptor:PSECURITY_DESCRIPTOR):DWORD; external 'advapi32' name 'GetSecurityDescriptorLength';
  341. function GetSecurityDescriptorControl(pSecurityDescriptor:PSECURITY_DESCRIPTOR; pControl:PSECURITY_DESCRIPTOR_CONTROL; lpdwRevision:LPDWORD):WINBOOL; external 'advapi32' name 'GetSecurityDescriptorControl';
  342. function SetSecurityDescriptorDacl(pSecurityDescriptor:PSECURITY_DESCRIPTOR; bDaclPresent:WINBOOL; pDacl:PACL; bDaclDefaulted:WINBOOL):WINBOOL; external 'advapi32' name 'SetSecurityDescriptorDacl';
  343. function GetSecurityDescriptorDacl(pSecurityDescriptor:PSECURITY_DESCRIPTOR; lpbDaclPresent:LPBOOL; var pDacl:PACL; lpbDaclDefaulted:LPBOOL):WINBOOL; external 'advapi32' name 'GetSecurityDescriptorDacl';
  344. function SetSecurityDescriptorSacl(pSecurityDescriptor:PSECURITY_DESCRIPTOR; bSaclPresent:WINBOOL; pSacl:PACL; bSaclDefaulted:WINBOOL):WINBOOL; external 'advapi32' name 'SetSecurityDescriptorSacl';
  345. function GetSecurityDescriptorSacl(pSecurityDescriptor:PSECURITY_DESCRIPTOR; lpbSaclPresent:LPBOOL; var pSacl:PACL; lpbSaclDefaulted:LPBOOL):WINBOOL; external 'advapi32' name 'GetSecurityDescriptorSacl';
  346. function SetSecurityDescriptorOwner(pSecurityDescriptor:PSECURITY_DESCRIPTOR; pOwner:PSID; bOwnerDefaulted:WINBOOL):WINBOOL; external 'advapi32' name 'SetSecurityDescriptorOwner';
  347. function GetSecurityDescriptorOwner(pSecurityDescriptor:PSECURITY_DESCRIPTOR; var pOwner:PSID; lpbOwnerDefaulted:LPBOOL):WINBOOL; external 'advapi32' name 'GetSecurityDescriptorOwner';
  348. function SetSecurityDescriptorGroup(pSecurityDescriptor:PSECURITY_DESCRIPTOR; pGroup:PSID; bGroupDefaulted:WINBOOL):WINBOOL; external 'advapi32' name 'SetSecurityDescriptorGroup';
  349. function GetSecurityDescriptorGroup(pSecurityDescriptor:PSECURITY_DESCRIPTOR; var pGroup:PSID; lpbGroupDefaulted:LPBOOL):WINBOOL; external 'advapi32' name 'GetSecurityDescriptorGroup';
  350. function CreatePrivateObjectSecurity(ParentDescriptor:PSECURITY_DESCRIPTOR; CreatorDescriptor:PSECURITY_DESCRIPTOR; var NewDescriptor:PSECURITY_DESCRIPTOR;
  351. IsDirectoryObject:WINBOOL; Token:HANDLE;GenericMapping:PGENERIC_MAPPING):WINBOOL; external 'advapi32' name 'CreatePrivateObjectSecurity';
  352. function SetPrivateObjectSecurity(SecurityInformation:SECURITY_INFORMATION; ModificationDescriptor:PSECURITY_DESCRIPTOR; var ObjectsSecurityDescriptor:PSECURITY_DESCRIPTOR; GenericMapping:PGENERIC_MAPPING; Token:HANDLE):WINBOOL;
  353. external 'advapi32' name 'SetPrivateObjectSecurity';
  354. function GetPrivateObjectSecurity(ObjectDescriptor:PSECURITY_DESCRIPTOR; SecurityInformation:SECURITY_INFORMATION; ResultantDescriptor:PSECURITY_DESCRIPTOR;
  355. DescriptorLength:DWORD; ReturnLength:PDWORD):WINBOOL;external 'advapi32' name 'GetPrivateObjectSecurity';
  356. function DestroyPrivateObjectSecurity(ObjectDescriptor:PSECURITY_DESCRIPTOR):WINBOOL; external 'advapi32' name 'DestroyPrivateObjectSecurity';
  357. function MakeSelfRelativeSD(pAbsoluteSecurityDescriptor:PSECURITY_DESCRIPTOR; pSelfRelativeSecurityDescriptor:PSECURITY_DESCRIPTOR; lpdwBufferLength:LPDWORD):WINBOOL; external 'advapi32' name 'MakeSelfRelativeSD';
  358. function MakeAbsoluteSD(pSelfRelativeSecurityDescriptor:PSECURITY_DESCRIPTOR; pAbsoluteSecurityDescriptor:PSECURITY_DESCRIPTOR; lpdwAbsoluteSecurityDescriptorSize:LPDWORD; pDacl:PACL; lpdwDaclSize:LPDWORD;pSacl:PACL;
  359. lpdwSaclSize:LPDWORD; pOwner:PSID; lpdwOwnerSize:LPDWORD; pPrimaryGroup:PSID;lpdwPrimaryGroupSize:LPDWORD):WINBOOL; external 'advapi32' name 'MakeAbsoluteSD';
  360. function SetKernelObjectSecurity(Handle:HANDLE; SecurityInformation:SECURITY_INFORMATION; SecurityDescriptor:PSECURITY_DESCRIPTOR):WINBOOL; external 'advapi32' name 'SetKernelObjectSecurity';
  361. function FindNextChangeNotification(hChangeHandle:HANDLE):WINBOOL; external 'kernel32' name 'FindNextChangeNotification';
  362. function FindCloseChangeNotification(hChangeHandle:HANDLE):WINBOOL; external 'kernel32' name 'FindCloseChangeNotification';
  363. function VirtualLock(lpAddress:LPVOID; dwSize:PTRUINT):WINBOOL; external 'kernel32' name 'VirtualLock';
  364. function VirtualUnlock(lpAddress:LPVOID; dwSize:PTRUINT):WINBOOL; external 'kernel32' name 'VirtualUnlock';
  365. function MapViewOfFileEx(hFileMappingObject:HANDLE; dwDesiredAccess:DWORD; dwFileOffsetHigh:DWORD; dwFileOffsetLow:DWORD; dwNumberOfBytesToMap:SIZE_T;lpBaseAddress:LPVOID):LPVOID; external 'kernel32' name 'MapViewOfFileEx';
  366. function SetPriorityClass(hProcess:HANDLE; dwPriorityClass:DWORD):WINBOOL; external 'kernel32' name 'SetPriorityClass';
  367. function GetPriorityClass(hProcess:HANDLE):DWORD; external 'kernel32' name 'GetPriorityClass';
  368. function IsBadReadPtr(lp:pointer; ucb:UINT):WINBOOL; external 'kernel32' name 'IsBadReadPtr';
  369. function IsBadWritePtr(lp:LPVOID; ucb:UINT):WINBOOL; external 'kernel32' name 'IsBadWritePtr';
  370. function IsBadHugeReadPtr(lp:pointer; ucb:UINT):WINBOOL; external 'kernel32' name 'IsBadHugeReadPtr';
  371. function IsBadHugeWritePtr(lp:LPVOID; ucb:UINT):WINBOOL; external 'kernel32' name 'IsBadHugeWritePtr';
  372. function IsBadCodePtr(lpfn:FARPROC):WINBOOL; external 'kernel32' name 'IsBadCodePtr';
  373. function AllocateLocallyUniqueId(Luid:PLUID):WINBOOL; external 'advapi32' name 'AllocateLocallyUniqueId';
  374. function QueryPerformanceCounter(lpPerformanceCount:PLARGE_INTEGER):WINBOOL; external 'kernel32' name 'QueryPerformanceCounter';
  375. function QueryPerformanceFrequency(lpFrequency:PLARGE_INTEGER):WINBOOL; external 'kernel32' name 'QueryPerformanceFrequency';
  376. procedure MoveMemory(Destination:PVOID; Source:pointer; Length:DWORD);
  377. procedure CopyMemory(Destination:PVOID; Source:pointer; Length:DWORD);
  378. procedure FillMemory(Destination:PVOID; Length:DWORD; Fill:BYTE);
  379. procedure ZeroMemory(Destination:PVOID; Length:DWORD);
  380. {$ifdef WIN95}
  381. function ActivateKeyboardLayout(hkl:HKL; Flags:UINT):HKL; external 'user32' name 'ActivateKeyboardLayout';
  382. {$else}
  383. function ActivateKeyboardLayout(hkl:HKL; Flags:UINT):WINBOOL; external 'user32' name 'ActivateKeyboardLayout';
  384. {$endif}
  385. function UnloadKeyboardLayout(hkl:HKL):WINBOOL; external 'user32' name 'UnloadKeyboardLayout';
  386. function GetKeyboardLayoutList(nBuff:longint; var lpList:HKL):longint; external 'user32' name 'GetKeyboardLayoutList';
  387. function GetKeyboardLayout(dwLayout:DWORD):HKL; external 'user32' name 'GetKeyboardLayout';
  388. function OpenInputDesktop(dwFlags:DWORD; fInherit:WINBOOL; dwDesiredAccess:DWORD):HDESK; external 'user32' name 'OpenInputDesktop';
  389. function EnumDesktopWindows(hDesktop:HDESK; lpfn:ENUMWINDOWSPROC; lParam:LPARAM):WINBOOL; external 'user32' name 'EnumDesktopWindows';
  390. function SwitchDesktop(hDesktop:HDESK):WINBOOL; external 'user32' name 'SwitchDesktop';
  391. function SetThreadDesktop(hDesktop:HDESK):WINBOOL; external 'user32' name 'SetThreadDesktop';
  392. function CloseDesktop(hDesktop:HDESK):WINBOOL; external 'user32' name 'CloseDesktop';
  393. function GetThreadDesktop(dwThreadId:DWORD):HDESK; external 'user32' name 'GetThreadDesktop';
  394. function CloseWindowStation(hWinSta:HWINSTA):WINBOOL; external 'user32' name 'CloseWindowStation';
  395. function SetProcessWindowStation(hWinSta:HWINSTA):WINBOOL; external 'user32' name 'SetProcessWindowStation';
  396. function GetProcessWindowStation:HWINSTA; external 'user32' name 'GetProcessWindowStation';
  397. function SetUserObjectSecurity(hObj:HANDLE; pSIRequested:PSECURITY_INFORMATION; pSID:PSECURITY_DESCRIPTOR):WINBOOL; external 'user32' name 'SetUserObjectSecurity';
  398. function CancelIoEx( hfile: THandle; overlapped:LPOverlapped):WINBOOL; external 'kernel32.dll' name 'CancelIoEx';
  399. function CancelIo ( hfile: THandle):WINBOOL; external 'kernel32.dll' name 'CancelIo';
  400. function GetUserObjectSecurity(hObj:HANDLE; pSIRequested:PSECURITY_INFORMATION; pSID:PSECURITY_DESCRIPTOR; nLength:DWORD; lpnLengthNeeded:LPDWORD):WINBOOL; external 'user32' name 'GetUserObjectSecurity';
  401. function TranslateMessage(lpMsg:LPMSG):WINBOOL; external 'user32' name 'TranslateMessage';
  402. function SetMessageQueue(cMessagesMax:longint):WINBOOL; external 'user32' name 'SetMessageQueue';
  403. function RegisterHotKey(hWnd:HWND; anID:longint; fsModifiers:UINT; vk:UINT):WINBOOL; external 'user32' name 'RegisterHotKey';
  404. function UnregisterHotKey(hWnd:HWND; anID:longint):WINBOOL; external 'user32' name 'UnregisterHotKey';
  405. function ExitWindowsEx(uFlags:UINT; dwReserved:DWORD):WINBOOL; external 'user32' name 'ExitWindowsEx';
  406. function SwapMouseButton(fSwap:WINBOOL):WINBOOL; external 'user32' name 'SwapMouseButton';
  407. function GetMessagePos:DWORD; external 'user32' name 'GetMessagePos';
  408. function GetMessageTime:LONG; external 'user32' name 'GetMessageTime';
  409. function GetMessageExtraInfo:LONG; external 'user32' name 'GetMessageExtraInfo';
  410. function SetMessageExtraInfo(lParam:LPARAM):LPARAM; external 'user32' name 'SetMessageExtraInfo';
  411. function BroadcastSystemMessage(_para1:DWORD; _para2:LPDWORD; _para3:UINT; _para4:WPARAM; _para5:LPARAM):longint; external 'user32' name 'BroadcastSystemMessage';
  412. function AttachThreadInput(idAttach:DWORD; idAttachTo:DWORD; fAttach:WINBOOL):WINBOOL; external 'user32' name 'AttachThreadInput';
  413. function ReplyMessage(lResult:LRESULT):WINBOOL; external 'user32' name 'ReplyMessage';
  414. function WaitMessage:WINBOOL; external 'user32' name 'WaitMessage';
  415. function WaitForInputIdle(hProcess:HANDLE; dwMilliseconds:DWORD):DWORD; external 'user32' name 'WaitForInputIdle';
  416. procedure PostQuitMessage(nExitCode:longint); external 'user32' name 'PostQuitMessage';
  417. function InSendMessage:WINBOOL; external 'user32' name 'InSendMessage';
  418. function GetDoubleClickTime:UINT; external 'user32' name 'GetDoubleClickTime';
  419. function SetDoubleClickTime(_para1:UINT):WINBOOL; external 'user32' name 'SetDoubleClickTime';
  420. function IsWindow(hWnd:HWND):WINBOOL; external 'user32' name 'IsWindow';
  421. function IsMenu(hMenu:HMENU):WINBOOL; external 'user32' name 'IsMenu';
  422. function IsChild(hWndParent:HWND; hWnd:HWND):WINBOOL; external 'user32' name 'IsChild';
  423. function DestroyWindow(hWnd:HWND):WINBOOL; external 'user32' name 'DestroyWindow';
  424. function ShowWindow(hWnd:HWND; nCmdShow:longint):WINBOOL; external 'user32' name 'ShowWindow';
  425. function ShowWindowAsync(hWnd:HWND; nCmdShow:longint):WINBOOL; external 'user32' name 'ShowWindowAsync';
  426. function FlashWindow(hWnd:HWND; bInvert:WINBOOL):WINBOOL; external 'user32' name 'FlashWindow';
  427. function ShowOwnedPopups(hWnd:HWND; fShow:WINBOOL):WINBOOL; external 'user32' name 'ShowOwnedPopups';
  428. function OpenIcon(hWnd:HWND):WINBOOL; external 'user32' name 'OpenIcon';
  429. function CloseWindow(hWnd:HWND):WINBOOL; external 'user32' name 'CloseWindow';
  430. function MoveWindow(hWnd:HWND; X:longint; Y:longint; nWidth:longint; nHeight:longint;bRepaint:WINBOOL):WINBOOL; external 'user32' name 'MoveWindow';
  431. function SetWindowPos(hWnd:HWND; hWndInsertAfter:HWND; X:longint; Y:longint; cx:longint;cy:longint; uFlags:UINT):WINBOOL; external 'user32' name 'SetWindowPos';
  432. function GetWindowPlacement(hWnd:HWND; var lpwndpl:WINDOWPLACEMENT):WINBOOL; external 'user32' name 'GetWindowPlacement';
  433. function SetWindowPlacement(hWnd:HWND; var lpwndpl:WINDOWPLACEMENT):WINBOOL; external 'user32' name 'SetWindowPlacement';
  434. function GetWindowPlacement(hWnd:HWND; lpwndpl:PWINDOWPLACEMENT):WINBOOL; external 'user32' name 'GetWindowPlacement';
  435. function SetWindowPlacement(hWnd:HWND; lpwndpl:PWINDOWPLACEMENT):WINBOOL; external 'user32' name 'SetWindowPlacement';
  436. function BeginDeferWindowPos(nNumWindows:longint):HDWP; external 'user32' name 'BeginDeferWindowPos';
  437. function DeferWindowPos(hWinPosInfo:HDWP; hWnd:HWND; hWndInsertAfter:HWND; x:longint; y:longint;cx:longint; cy:longint; uFlags:UINT):HDWP; external 'user32' name 'DeferWindowPos';
  438. function EndDeferWindowPos(hWinPosInfo:HDWP):WINBOOL; external 'user32' name 'EndDeferWindowPos';
  439. function IsWindowVisible(hWnd:HWND):WINBOOL; external 'user32' name 'IsWindowVisible';
  440. function IsIconic(hWnd:HWND):WINBOOL; external 'user32' name 'IsIconic';
  441. function AnyPopup:WINBOOL; external 'user32' name 'AnyPopup';
  442. function BringWindowToTop(hWnd:HWND):WINBOOL; external 'user32' name 'BringWindowToTop';
  443. function IsZoomed(hWnd:HWND):WINBOOL; external 'user32' name 'IsZoomed';
  444. function EndDialog(hDlg:HWND; nResult:longint):WINBOOL; external 'user32' name 'EndDialog';
  445. function GetDlgItem(hDlg:HWND; nIDDlgItem:longint):HWND; external 'user32' name 'GetDlgItem';
  446. function SetDlgItemInt(hDlg:HWND; nIDDlgItem:longint; uValue:UINT; bSigned:WINBOOL):WINBOOL; external 'user32' name 'SetDlgItemInt';
  447. function GetDlgItemInt(hDlg:HWND; nIDDlgItem:longint; var lpTranslated:WINBOOL; bSigned:WINBOOL):UINT; external 'user32' name 'GetDlgItemInt';
  448. function CheckDlgButton(hDlg:HWND; nIDButton:longint; uCheck:UINT):WINBOOL; external 'user32' name 'CheckDlgButton';
  449. function CheckRadioButton(hDlg:HWND; nIDFirstButton:longint; nIDLastButton:longint; nIDCheckButton:longint):WINBOOL; external 'user32' name 'CheckRadioButton';
  450. function IsDlgButtonChecked(hDlg:HWND; nIDButton:longint):UINT; external 'user32' name 'IsDlgButtonChecked';
  451. function GetNextDlgGroupItem(hDlg:HWND; hCtl:HWND; bPrevious:WINBOOL):HWND; external 'user32' name 'GetNextDlgGroupItem';
  452. function GetNextDlgTabItem(hDlg:HWND; hCtl:HWND; bPrevious:WINBOOL):HWND; external 'user32' name 'GetNextDlgTabItem';
  453. function GetDlgCtrlID(hWnd:HWND):longint; external 'user32' name 'GetDlgCtrlID';
  454. function GetDialogBaseUnits:longint; external 'user32' name 'GetDialogBaseUnits';
  455. function OpenClipboard(hWndNewOwner:HWND):WINBOOL; external 'user32' name 'OpenClipboard';
  456. function CloseClipboard:WINBOOL; external 'user32' name 'CloseClipboard';
  457. function GetClipboardOwner:HWND; external 'user32' name 'GetClipboardOwner';
  458. function SetClipboardViewer(hWndNewViewer:HWND):HWND; external 'user32' name 'SetClipboardViewer';
  459. function GetClipboardViewer:HWND; external 'user32' name 'GetClipboardViewer';
  460. function ChangeClipboardChain(hWndRemove:HWND; hWndNewNext:HWND):WINBOOL; external 'user32' name 'ChangeClipboardChain';
  461. function SetClipboardData(uFormat:UINT; hMem:HANDLE):HANDLE; external 'user32' name 'SetClipboardData';
  462. function GetClipboardData(uFormat:UINT):HANDLE; external 'user32' name 'GetClipboardData';
  463. function CountClipboardFormats:longint; external 'user32' name 'CountClipboardFormats';
  464. function EnumClipboardFormats(format:UINT):UINT; external 'user32' name 'EnumClipboardFormats';
  465. function EmptyClipboard:WINBOOL; external 'user32' name 'EmptyClipboard';
  466. function IsClipboardFormatAvailable(format:UINT):WINBOOL; external 'user32' name 'IsClipboardFormatAvailable';
  467. function GetPriorityClipboardFormat(var paFormatPriorityList:UINT; cFormats:longint):longint; external 'user32' name 'GetPriorityClipboardFormat';
  468. function GetOpenClipboardWindow:HWND; external 'user32' name 'GetOpenClipboardWindow';
  469. function CharNextExA(CodePage:WORD; lpCurrentChar:LPCSTR; dwFlags:DWORD):LPSTR; external 'user32' name 'CharNextExA';
  470. function CharPrevExA(CodePage:WORD; lpStart:LPCSTR; lpCurrentChar:LPCSTR; dwFlags:DWORD):LPSTR; external 'user32' name 'CharPrevExA';
  471. function SetFocus(hWnd:HWND):HWND; external 'user32' name 'SetFocus';
  472. function GetActiveWindow:HWND; external 'user32' name 'GetActiveWindow';
  473. function GetFocus:HWND; external 'user32' name 'GetFocus';
  474. function GetKBCodePage:UINT; external 'user32' name 'GetKBCodePage';
  475. function GetKeyState(nVirtKey:longint):SHORT; external 'user32' name 'GetKeyState';
  476. function GetAsyncKeyState(vKey:longint):SHORT; external 'user32' name 'GetAsyncKeyState';
  477. function GetKeyboardState(lpKeyState:PBYTE):WINBOOL; external 'user32' name 'GetKeyboardState';
  478. function SetKeyboardState(lpKeyState:LPBYTE):WINBOOL; external 'user32' name 'SetKeyboardState';
  479. function GetKeyboardType(nTypeFlag:longint):longint; external 'user32' name 'GetKeyboardType';
  480. function ToAscii(uVirtKey:UINT; uScanCode:UINT; lpKeyState:PBYTE; lpChar:LPWORD; uFlags:UINT):longint; external 'user32' name 'ToAscii';
  481. function ToAsciiEx(uVirtKey:UINT; uScanCode:UINT; lpKeyState:PBYTE; lpChar:LPWORD; uFlags:UINT;dwhkl:HKL):longint; external 'user32' name 'ToAsciiEx';
  482. function ToUnicode(wVirtKey:UINT; wScanCode:UINT; lpKeyState:PBYTE; pwszBuff:LPWSTR; cchBuff:longint;wFlags:UINT):longint; external 'user32' name 'ToUnicode';
  483. function OemKeyScan(wOemChar:WORD):DWORD; external 'user32' name 'OemKeyScan';
  484. procedure keybd_event(bVk:BYTE; bScan:BYTE; dwFlags:DWORD; dwExtraInfo:DWORD); external 'user32' name 'keybd_event';
  485. procedure mouse_event(dwFlags:DWORD; dx:DWORD; dy:DWORD; cButtons:DWORD; dwExtraInfo:DWORD); external 'user32' name 'mouse_event';
  486. function GetInputState:WINBOOL; external 'user32' name 'GetInputState';
  487. function GetQueueStatus(flags:UINT):DWORD; external 'user32' name 'GetQueueStatus';
  488. function GetCapture:HWND; external 'user32' name 'GetCapture';
  489. function SetCapture(hWnd:HWND):HWND; external 'user32' name 'SetCapture';
  490. function ReleaseCapture:WINBOOL; external 'user32' name 'ReleaseCapture';
  491. function MsgWaitForMultipleObjects(nCount:DWORD; pHandles:LPHANDLE; fWaitAll:WINBOOL; dwMilliseconds:DWORD; dwWakeMask:DWORD):DWORD; external 'user32' name 'MsgWaitForMultipleObjects';
  492. function SetTimer(hWnd:HWND; nIDEvent:UINT_PTR; uElapse:UINT; lpTimerFunc:TIMERPROC):UINT_PTR; external 'user32' name 'SetTimer';
  493. function KillTimer(hWnd:HWND; uIDEvent:UINT_PTR):WINBOOL; external 'user32' name 'KillTimer';
  494. function IsWindowUnicode(hWnd:HWND):WINBOOL; external 'user32' name 'IsWindowUnicode';
  495. function EnableWindow(hWnd:HWND; bEnable:WINBOOL):WINBOOL; external 'user32' name 'EnableWindow';
  496. function IsWindowEnabled(hWnd:HWND):WINBOOL; external 'user32' name 'IsWindowEnabled';
  497. function DestroyAcceleratorTable(hAccel:HACCEL):WINBOOL; external 'user32' name 'DestroyAcceleratorTable';
  498. function GetSystemMetrics(nIndex:longint):longint; external 'user32' name 'GetSystemMetrics';
  499. function GetMenu(hWnd:HWND):HMENU; external 'user32' name 'GetMenu';
  500. function SetMenu(hWnd:HWND; hMenu:HMENU):WINBOOL; external 'user32' name 'SetMenu';
  501. function HiliteMenuItem(hWnd:HWND; hMenu:HMENU; uIDHiliteItem:UINT; uHilite:UINT):WINBOOL; external 'user32' name 'HiliteMenuItem';
  502. function GetMenuState(hMenu:HMENU; uId:UINT; uFlags:UINT):UINT; external 'user32' name 'GetMenuState';
  503. function DrawMenuBar(hWnd:HWND):WINBOOL; external 'user32' name 'DrawMenuBar';
  504. function GetSystemMenu(hWnd:HWND; bRevert:WINBOOL):HMENU; external 'user32' name 'GetSystemMenu';
  505. function CreateMenu:HMENU; external 'user32' name 'CreateMenu';
  506. function CreatePopupMenu:HMENU; external 'user32' name 'CreatePopupMenu';
  507. function DestroyMenu(hMenu:HMENU):WINBOOL; external 'user32' name 'DestroyMenu';
  508. function CheckMenuItem(hMenu:HMENU; uIDCheckItem:UINT; uCheck:UINT):DWORD; external 'user32' name 'CheckMenuItem';
  509. function EnableMenuItem(hMenu:HMENU; uIDEnableItem:UINT; uEnable:UINT):WINBOOL; external 'user32' name 'EnableMenuItem';
  510. function GetSubMenu(hMenu:HMENU; nPos:longint):HMENU; external 'user32' name 'GetSubMenu';
  511. function GetMenuItemID(hMenu:HMENU; nPos:longint):UINT; external 'user32' name 'GetMenuItemID';
  512. function GetMenuItemCount(hMenu:HMENU):longint; external 'user32' name 'GetMenuItemCount';
  513. function RemoveMenu(hMenu:HMENU; uPosition:UINT; uFlags:UINT):WINBOOL; external 'user32' name 'RemoveMenu';
  514. function DeleteMenu(hMenu:HMENU; uPosition:UINT; uFlags:UINT):WINBOOL; external 'user32' name 'DeleteMenu';
  515. function SetMenuItemBitmaps(hMenu:HMENU; uPosition:UINT; uFlags:UINT; hBitmapUnchecked:HBITMAP; hBitmapChecked:HBITMAP):WINBOOL; external 'user32' name 'SetMenuItemBitmaps';
  516. function GetMenuCheckMarkDimensions:LONG; external 'user32' name 'GetMenuCheckMarkDimensions';
  517. function TrackPopupMenu(hMenu:HMENU; uFlags:UINT; x:longint; y:longint; nReserved:longint;hWnd:HWND; const prcRect:RECT):WINBOOL; external 'user32' name 'TrackPopupMenu';
  518. function GetMenuDefaultItem(hMenu:HMENU; fByPos:UINT; gmdiFlags:UINT):UINT; external 'user32' name 'GetMenuDefaultItem';
  519. function SetMenuDefaultItem(hMenu:HMENU; uItem:UINT; fByPos:UINT):WINBOOL; external 'user32' name 'SetMenuDefaultItem';
  520. function GetMenuItemRect(hWnd:HWND; hMenu:HMENU; uItem:UINT; lprcItem:LPRECT):WINBOOL; external 'user32' name 'GetMenuItemRect';
  521. function MenuItemFromPoint(hWnd:HWND; hMenu:HMENU; ptScreen:POINT):longint; external 'user32' name 'MenuItemFromPoint';
  522. function DragObject(_para1:HWND; _para2:HWND; _para3:UINT; _para4:DWORD; _para5:HCURSOR):DWORD; external 'user32' name 'DragObject';
  523. function DragDetect(hwnd:HWND; pt:POINT):WINBOOL; external 'user32' name 'DragDetect';
  524. function DrawIcon(hDC:HDC; X:longint; Y:longint; hIcon:HICON):WINBOOL; external 'user32' name 'DrawIcon';
  525. function UpdateWindow(hWnd:HWND):WINBOOL; external 'user32' name 'UpdateWindow';
  526. function SetActiveWindow(hWnd:HWND):HWND; external 'user32' name 'SetActiveWindow';
  527. function GetForegroundWindow:HWND; external 'user32' name 'GetForegroundWindow';
  528. function PaintDesktop(hdc:HDC):WINBOOL; external 'user32' name 'PaintDesktop';
  529. function SetForegroundWindow(hWnd:HWND):WINBOOL; external 'user32' name 'SetForegroundWindow';
  530. function WindowFromDC(hDC:HDC):HWND; external 'user32' name 'WindowFromDC';
  531. function GetDC(hWnd:HWND):HDC; external 'user32' name 'GetDC';
  532. function GetDCEx(hWnd:HWND; hrgnClip:HRGN; flags:DWORD):HDC; external 'user32' name 'GetDCEx';
  533. function GetWindowDC(hWnd:HWND):HDC; external 'user32' name 'GetWindowDC';
  534. function ReleaseDC(hWnd:HWND; hDC:HDC):longint; external 'user32' name 'ReleaseDC';
  535. function BeginPaint(hWnd:HWND; lpPaint:LPPAINTSTRUCT):HDC; external 'user32' name 'BeginPaint';
  536. function EndPaint(hWnd:HWND; lpPaint:LPPAINTSTRUCT):WINBOOL; external 'user32' name 'EndPaint';
  537. function GetUpdateRect(hWnd:HWND; lpRect:LPRECT; bErase:WINBOOL):WINBOOL; external 'user32' name 'GetUpdateRect';
  538. function GetUpdateRgn(hWnd:HWND; hRgn:HRGN; bErase:WINBOOL):longint; external 'user32' name 'GetUpdateRgn';
  539. function SetWindowRgn(hWnd:HWND; hRgn:HRGN; bRedraw:WINBOOL):longint; external 'user32' name 'SetWindowRgn';
  540. function GetWindowRgn(hWnd:HWND; hRgn:HRGN):longint; external 'user32' name 'GetWindowRgn';
  541. function ExcludeUpdateRgn(hDC:HDC; hWnd:HWND):longint; external 'user32' name 'ExcludeUpdateRgn';
  542. function InvalidateRect(hWnd:HWND; const lpRect:RECT; bErase:WINBOOL):WINBOOL; external 'user32' name 'InvalidateRect';
  543. function InvalidateRect(hWnd:HWND;lpRect:LPRECT; bErase:WINBOOL):WINBOOL; external 'user32' name 'InvalidateRect';
  544. function ValidateRect(hWnd:HWND; const lpRect:RECT):WINBOOL; external 'user32' name 'ValidateRect';
  545. function ValidateRect(hWnd:HWND;lpRect:LPRECT):WINBOOL; external 'user32' name 'ValidateRect';
  546. function InvalidateRgn(hWnd:HWND; hRgn:HRGN; bErase:WINBOOL):WINBOOL; external 'user32' name 'InvalidateRgn';
  547. function ValidateRgn(hWnd:HWND; hRgn:HRGN):WINBOOL; external 'user32' name 'ValidateRgn';
  548. function RedrawWindow(hWnd:HWND; const lprcUpdate:RECT; hrgnUpdate:HRGN; flags:UINT):WINBOOL; external 'user32' name 'RedrawWindow';
  549. function RedrawWindow(hWnd:HWND; lprcUpdate:LPRECT; hrgnUpdate:HRGN; flags:UINT):WINBOOL; external 'user32' name 'RedrawWindow';
  550. function LockWindowUpdate(hWndLock:HWND):WINBOOL; external 'user32' name 'LockWindowUpdate';
  551. function ScrollWindow(hWnd:HWND; XAmount:longint; YAmount:longint; const lpRect:RECT; const lpClipRect:RECT):WINBOOL; external 'user32' name 'ScrollWindow';
  552. function ScrollDC(hDC:HDC; dx:longint; dy:longint; const lprcScroll:RECT; const lprcClip:RECT;hrgnUpdate:HRGN; lprcUpdate:LPRECT):WINBOOL; external 'user32' name 'ScrollDC';
  553. function ScrollWindowEx(hWnd:HWND; dx:longint; dy:longint; const prcScroll:RECT; const prcClip:RECT;hrgnUpdate:HRGN; prcUpdate:LPRECT; flags:UINT):longint; external 'user32' name 'ScrollWindowEx';
  554. function SetScrollPos(hWnd:HWND; nBar:longint; nPos:longint; bRedraw:WINBOOL):longint; external 'user32' name 'SetScrollPos';
  555. function GetScrollPos(hWnd:HWND; nBar:longint):longint; external 'user32' name 'GetScrollPos';
  556. function SetScrollRange(hWnd:HWND; nBar:longint; nMinPos:longint; nMaxPos:longint; bRedraw:WINBOOL):WINBOOL; external 'user32' name 'SetScrollRange';
  557. function GetScrollRange(hWnd:HWND; nBar:longint; lpMinPos:LPINT; lpMaxPos:LPINT):WINBOOL; external 'user32' name 'GetScrollRange';
  558. function ShowScrollBar(hWnd:HWND; wBar:longint; bShow:WINBOOL):WINBOOL; external 'user32' name 'ShowScrollBar';
  559. function EnableScrollBar(hWnd:HWND; wSBflags:UINT; wArrows:UINT):WINBOOL; external 'user32' name 'EnableScrollBar';
  560. function GetClientRect(hWnd:HWND; lpRect:LPRECT):WINBOOL; external 'user32' name 'GetClientRect';
  561. function GetWindowRect(hWnd:HWND; lpRect:LPRECT):WINBOOL; external 'user32' name 'GetWindowRect';
  562. function AdjustWindowRect(lpRect:LPRECT; dwStyle:DWORD; bMenu:WINBOOL):WINBOOL; external 'user32' name 'AdjustWindowRect';
  563. function AdjustWindowRectEx(lpRect:LPRECT; dwStyle:DWORD; bMenu:WINBOOL; dwExStyle:DWORD):WINBOOL; external 'user32' name 'AdjustWindowRectEx';
  564. function SetWindowContextHelpId(_para1:HWND; _para2:DWORD):WINBOOL; external 'user32' name 'SetWindowContextHelpId';
  565. function GetWindowContextHelpId(_para1:HWND):DWORD; external 'user32' name 'GetWindowContextHelpId';
  566. function SetMenuContextHelpId(_para1:HMENU; _para2:DWORD):WINBOOL; external 'user32' name 'SetMenuContextHelpId';
  567. function GetMenuContextHelpId(_para1:HMENU):DWORD; external 'user32' name 'GetMenuContextHelpId';
  568. function MessageBeep(uType:UINT):WINBOOL; external 'user32' name 'MessageBeep';
  569. function ShowCursor(bShow:WINBOOL):longint; external 'user32' name 'ShowCursor';
  570. function SetCursorPos(X:longint; Y:longint):WINBOOL; external 'user32' name 'SetCursorPos';
  571. function SetCursor(hCursor:HCURSOR):HCURSOR; external 'user32' name 'SetCursor';
  572. function GetCursorPos(lpPoint:LPPOINT):WINBOOL; external 'user32' name 'GetCursorPos';
  573. function ClipCursor(lpRect:LPRECT):WINBOOL; external 'user32' name 'ClipCursor';
  574. function GetClipCursor(lpRect:LPRECT):WINBOOL; external 'user32' name 'GetClipCursor';
  575. function GetCursor:HCURSOR; external 'user32' name 'GetCursor';
  576. function CreateCaret(hWnd:HWND; hBitmap:HBITMAP; nWidth:longint; nHeight:longint):WINBOOL; external 'user32' name 'CreateCaret';
  577. function GetCaretBlinkTime:UINT; external 'user32' name 'GetCaretBlinkTime';
  578. function SetCaretBlinkTime(uMSeconds:UINT):WINBOOL; external 'user32' name 'SetCaretBlinkTime';
  579. function DestroyCaret:WINBOOL; external 'user32' name 'DestroyCaret';
  580. function HideCaret(hWnd:HWND):WINBOOL; external 'user32' name 'HideCaret';
  581. function ShowCaret(hWnd:HWND):WINBOOL; external 'user32' name 'ShowCaret';
  582. function SetCaretPos(X:longint; Y:longint):WINBOOL; external 'user32' name 'SetCaretPos';
  583. function GetCaretPos(lpPoint:LPPOINT):WINBOOL; external 'user32' name 'GetCaretPos';
  584. function ClientToScreen(hWnd:HWND; lpPoint:LPPOINT):WINBOOL; external 'user32' name 'ClientToScreen';
  585. function ScreenToClient(hWnd:HWND; lpPoint:LPPOINT):WINBOOL; external 'user32' name 'ScreenToClient';
  586. function MapWindowPoints(hWndFrom:HWND; hWndTo:HWND; lpPoints:LPPOINT; cPoints:UINT):longint; external 'user32' name 'MapWindowPoints';
  587. function WindowFromPoint(Point:POINT):HWND; external 'user32' name 'WindowFromPoint';
  588. function ChildWindowFromPoint(hWndParent:HWND; Point:POINT):HWND; external 'user32' name 'ChildWindowFromPoint';
  589. function GetSysColor(nIndex:longint):DWORD; external 'user32' name 'GetSysColor';
  590. function GetSysColorBrush(nIndex:longint):HBRUSH; external 'user32' name 'GetSysColorBrush';
  591. function SetSysColors(cElements:longint; var lpaElements:wINT; var lpaRgbValues:COLORREF):WINBOOL; external 'user32' name 'SetSysColors';
  592. function DrawFocusRect(hDC:HDC; const lprc:RECT):WINBOOL; external 'user32' name 'DrawFocusRect';
  593. function FillRect(hDC:HDC; const lprc:RECT; hbr:HBRUSH):longint; external 'user32' name 'FillRect';
  594. function FrameRect(hDC:HDC; const lprc:RECT; hbr:HBRUSH):longint; external 'user32' name 'FrameRect';
  595. function InvertRect(hDC:HDC; const lprc:RECT):WINBOOL; external 'user32' name 'InvertRect';
  596. function SetRect(lprc:LPRECT; xLeft:longint; yTop:longint; xRight:longint; yBottom:longint):WINBOOL; external 'user32' name 'SetRect';
  597. function SetRectEmpty(lprc:LPRECT):WINBOOL; external 'user32' name 'SetRectEmpty';
  598. function CopyRect(lprcDst:LPRECT; const lprcSrc:RECT):WINBOOL; external 'user32' name 'CopyRect';
  599. function InflateRect(lprc:LPRECT; dx:longint; dy:longint):WINBOOL; external 'user32' name 'InflateRect';
  600. function IntersectRect(lprcDst:LPRECT; const lprcSrc1:RECT; const lprcSrc2:RECT):WINBOOL; external 'user32' name 'IntersectRect';
  601. function UnionRect(lprcDst:LPRECT; const lprcSrc1:RECT; const lprcSrc2:RECT):WINBOOL; external 'user32' name 'UnionRect';
  602. function SubtractRect(lprcDst:LPRECT; const lprcSrc1:RECT; const lprcSrc2:RECT):WINBOOL; external 'user32' name 'SubtractRect';
  603. function OffsetRect(lprc:LPRECT; dx:longint; dy:longint):WINBOOL; external 'user32' name 'OffsetRect';
  604. function IsRectEmpty(const lprc:RECT):WINBOOL; external 'user32' name 'IsRectEmpty';
  605. function EqualRect(const lprc1:RECT; const lprc2:RECT):WINBOOL; external 'user32' name 'EqualRect';
  606. function PtInRect(const lprc:RECT; pt:POINT):WINBOOL; external 'user32' name 'PtInRect';
  607. function PtInRect(lprc:LPRECT; pt:POINT):WINBOOL; external 'user32' name 'PtInRect';
  608. function GetWindowWord(hWnd:HWND; nIndex:longint):WORD; external 'user32' name 'GetWindowWord';
  609. function SetWindowWord(hWnd:HWND; nIndex:longint; wNewWord:WORD):WORD; external 'user32' name 'SetWindowWord';
  610. function GetClassWord(hWnd:HWND; nIndex:longint):WORD; external 'user32' name 'GetClassWord';
  611. function SetClassWord(hWnd:HWND; nIndex:longint; wNewWord:WORD):WORD; external 'user32' name 'SetClassWord';
  612. function GetDesktopWindow:HWND; external 'user32' name 'GetDesktopWindow';
  613. function GetParent(hWnd:HWND):HWND; external 'user32' name 'GetParent';
  614. function SetParent(hWndChild:HWND; hWndNewParent:HWND):HWND; external 'user32' name 'SetParent';
  615. function EnumChildWindows(hWndParent:HWND; lpEnumFunc:ENUMWINDOWSPROC; lParam:LPARAM):WINBOOL; external 'user32' name 'EnumChildWindows';
  616. function EnumWindows(lpEnumFunc:ENUMWINDOWSPROC; lParam:LPARAM):WINBOOL; external 'user32' name 'EnumWindows';
  617. function EnumThreadWindows(dwThreadId:DWORD; lpfn:ENUMWINDOWSPROC; lParam:LPARAM):WINBOOL; external 'user32' name 'EnumThreadWindows';
  618. function EnumTaskWindows(hTask:HWND; lpfn:FARPROC; lParam: LPARAM): BOOL;external 'user32' name 'EnumThreadWindows';
  619. function GetTopWindow(hWnd:HWND):HWND; external 'user32' name 'GetTopWindow';
  620. function GetWindowThreadProcessId(hWnd:HWND; lpdwProcessId:LPDWORD):DWORD; external 'user32' name 'GetWindowThreadProcessId';
  621. function GetLastActivePopup(hWnd:HWND):HWND; external 'user32' name 'GetLastActivePopup';
  622. function GetWindow(hWnd:HWND; uCmd:UINT):HWND; external 'user32' name 'GetWindow';
  623. function UnhookWindowsHook(nCode:longint; pfnFilterProc:HOOKPROC):WINBOOL; external 'user32' name 'UnhookWindowsHook';
  624. function UnhookWindowsHookEx(hhk:HHOOK):WINBOOL; external 'user32' name 'UnhookWindowsHookEx';
  625. function CallNextHookEx(hhk:HHOOK; nCode:longint; wParam:WPARAM; lParam:LPARAM):LRESULT; external 'user32' name 'CallNextHookEx';
  626. function CheckMenuRadioItem(_para1:HMENU; _para2:UINT; _para3:UINT; _para4:UINT; _para5:UINT):WINBOOL; external 'user32' name 'CheckMenuRadioItem';
  627. function CreateCursor(hInst:HINST; xHotSpot:longint; yHotSpot:longint; nWidth:longint; nHeight:longint;pvANDPlane:pointer; pvXORPlane:pointer):HCURSOR; external 'user32' name 'CreateCursor';
  628. function DestroyCursor(hCursor:HCURSOR):WINBOOL; external 'user32' name 'DestroyCursor';
  629. function SetSystemCursor(hcur:HCURSOR; anID:DWORD):WINBOOL; external 'user32' name 'SetSystemCursor';
  630. function CreateIcon(hInstance:HINST; nWidth:longint; nHeight:longint; cPlanes:BYTE; cBitsPixel:BYTE;var lpbANDbits:BYTE; var lpbXORbits:BYTE):HICON; external 'user32' name 'CreateIcon';
  631. function DestroyIcon(hIcon:HICON):WINBOOL; external 'user32' name 'DestroyIcon';
  632. function LookupIconIdFromDirectory(presbits:PBYTE; fIcon:WINBOOL):longint; external 'user32' name 'LookupIconIdFromDirectory';
  633. function LookupIconIdFromDirectoryEx(presbits:PBYTE; fIcon:WINBOOL; cxDesired:longint; cyDesired:longint; Flags:UINT):longint; external 'user32' name 'LookupIconIdFromDirectoryEx';
  634. function CreateIconFromResource(presbits:PBYTE; dwResSize:DWORD; fIcon:WINBOOL; dwVer:DWORD):HICON; external 'user32' name 'CreateIconFromResource';
  635. function CreateIconFromResourceEx(presbits:PBYTE; dwResSize:DWORD; fIcon:WINBOOL; dwVer:DWORD; cxDesired:longint;cyDesired:longint; Flags:UINT):HICON; external 'user32' name 'CreateIconFromResourceEx';
  636. function CopyImage(_para1:HANDLE; _para2:UINT; _para3:longint; _para4:longint; _para5:UINT):HICON; external 'user32' name 'CopyImage';
  637. function CreateIconIndirect(piconinfo:PICONINFO):HICON; external 'user32' name 'CreateIconIndirect';
  638. function CopyIcon(hIcon:HICON):HICON; external 'user32' name 'CopyIcon';
  639. function GetIconInfo(hIcon:HICON; piconinfo:PICONINFO):WINBOOL; external 'user32' name 'GetIconInfo';
  640. function MapDialogRect(hDlg:HWND; lpRect:LPRECT):WINBOOL; external 'user32' name 'MapDialogRect';
  641. function SetScrollInfo(_para1:HWND; _para2:longint; _para3:LPCSCROLLINFO; _para4:WINBOOL):longint; external 'user32' name 'SetScrollInfo';
  642. function GetScrollInfo(_para1:HWND; _para2:longint; _para3:LPSCROLLINFO):WINBOOL; external 'user32' name 'GetScrollInfo';
  643. function TranslateMDISysAccel(hWndClient:HWND; lpMsg:LPMSG):WINBOOL; external 'user32' name 'TranslateMDISysAccel';
  644. function ArrangeIconicWindows(hWnd:HWND):UINT; external 'user32' name 'ArrangeIconicWindows';
  645. function TileWindows(hwndParent:HWND; wHow:UINT; const lpRect:RECT; cKids:UINT; var lpKids:HWND):WORD; external 'user32' name 'TileWindows';
  646. function CascadeWindows(hwndParent:HWND; wHow:UINT; const lpRect:RECT; cKids:UINT; var lpKids:HWND):WORD; external 'user32' name 'CascadeWindows';
  647. procedure SetLastErrorEx(dwErrCode:DWORD; dwType:DWORD); external 'user32' name 'SetLastErrorEx';
  648. procedure SetDebugErrorLevel(dwLevel:DWORD); external 'user32' name 'SetDebugErrorLevel';
  649. function DrawEdge(hdc:HDC; qrc:LPRECT; edge:UINT; grfFlags:UINT):WINBOOL; external 'user32' name 'DrawEdge';
  650. function DrawFrameControl(_para1:HDC; _para2:LPRECT; _para3:UINT; _para4:UINT):WINBOOL; external 'user32' name 'DrawFrameControl';
  651. function DrawCaption(_para1:HWND; _para2:HDC; var _para3:RECT; _para4:UINT):WINBOOL; external 'user32' name 'DrawCaption';
  652. function DrawAnimatedRects(hwnd:HWND; idAni:longint; const lprcFrom:RECT; const lprcTo:RECT):WINBOOL; external 'user32' name 'DrawAnimatedRects';
  653. function TrackPopupMenuEx(_para1:HMENU; _para2:UINT; _para3:longint; _para4:longint; _para5:HWND;_para6:LPTPMPARAMS):WINBOOL; external 'user32' name 'TrackPopupMenuEx';
  654. function ChildWindowFromPointEx(_para1:HWND; _para2:POINT; _para3:UINT):HWND; external 'user32' name 'ChildWindowFromPointEx';
  655. function DrawIconEx(hdc:HDC; xLeft:longint; yTop:longint; hIcon:HICON; cxWidth:longint;cyWidth:longint; istepIfAniCur:UINT; hbrFlickerFreeDraw:HBRUSH; diFlags:UINT):WINBOOL; external 'user32' name 'DrawIconEx';
  656. function GetWindowInfo(hWnd:HWND; pwi:PWindowInfo):WINBOOL; external 'user32' name 'GetWindowInfo';
  657. function GetRawInputData(hRawInput: HRAWINPUT; uiCommand: UINT; pData: LPVOID; pcbSize: PUINT; cbSizeHeader: UINT): UINT; external 'user32' name 'GetRawInputData';
  658. function GetRawInputBuffer(pData: PRAWINPUT; pcbSize: PUINT; cbSizeHeader: UINT): UINT; external 'user32' name 'GetRawInputBuffer';
  659. function RegisterRawInputDevices(pRawInputDevices: PCRAWINPUTDEVICE; uiNumDevices: UINT; cbSize: UINT):WINBOOL; external 'user32' name 'RegisterRawInputDevices';
  660. function GetRegisteredRawInputDevices(pRawInputDevices: PRAWINPUTDEVICE; puiNumDevices: PUINT; cbSize: UINT): UINT; external 'user32' name 'GetRegisteredRawInputDevices';
  661. function GetRawInputDeviceList(pRawInputDeviceList: PRAWINPUTDEVICELIST; puiNumDevices: PUINT; cbSize: UINT): UINT; external 'user32' name 'GetRawInputDeviceList';
  662. function DefRawInputProc(paRawInput: PPRAWINPUT; nInput: longint; cbSizeHeader: UINT): LRESULT; external 'user32' name 'DefRawInputProc';
  663. function AnimatePalette(_para1:HPALETTE; _para2:UINT; _para3:UINT; var _para4:PALETTEENTRY):WINBOOL; external 'gdi32' name 'AnimatePalette';
  664. function Arc(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:longint; _para7:longint; _para8:longint; _para9:longint):WINBOOL; external 'gdi32' name 'Arc';
  665. function BitBlt(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:HDC; _para7:longint; _para8:longint; _para9:DWORD):WINBOOL; external 'gdi32' name 'BitBlt';
  666. function CancelDC(_para1:HDC):WINBOOL; external 'gdi32' name 'CancelDC';
  667. function Chord(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:longint; _para7:longint; _para8:longint; _para9:longint):WINBOOL; external 'gdi32' name 'Chord';
  668. function CloseMetaFile(_para1:HDC):HMETAFILE; external 'gdi32' name 'CloseMetaFile';
  669. function CombineRgn(_para1:HRGN; _para2:HRGN; _para3:HRGN; _para4:longint):longint; external 'gdi32' name 'CombineRgn';
  670. function CreateBitmap(_para1:longint; _para2:longint; _para3:UINT; _para4:UINT; _para5:pointer):HBITMAP; external 'gdi32' name 'CreateBitmap';
  671. function CreateBitmapIndirect(var _para1:BITMAP):HBITMAP; external 'gdi32' name 'CreateBitmapIndirect';
  672. function CreateBrushIndirect(var _para1:LOGBRUSH):HBRUSH; external 'gdi32' name 'CreateBrushIndirect';
  673. function CreateCompatibleBitmap(_para1:HDC; _para2:longint; _para3:longint):HBITMAP; external 'gdi32' name 'CreateCompatibleBitmap';
  674. function CreateDiscardableBitmap(_para1:HDC; _para2:longint; _para3:longint):HBITMAP; external 'gdi32' name 'CreateDiscardableBitmap';
  675. function CreateCompatibleDC(_para1:HDC):HDC; external 'gdi32' name 'CreateCompatibleDC';
  676. function CreateDIBitmap(_para1:HDC; var _para2:BITMAPINFOHEADER; _para3:DWORD; _para4:pointer; var _para5:BITMAPINFO;_para6:UINT):HBITMAP; external 'gdi32' name 'CreateDIBitmap';
  677. function CreateDIBPatternBrush(_para1:HGLOBAL; _para2:UINT):HBRUSH; external 'gdi32' name 'CreateDIBPatternBrush';
  678. function CreateDIBPatternBrushPt(_para1:pointer; _para2:UINT):HBRUSH; external 'gdi32' name 'CreateDIBPatternBrushPt';
  679. function CreateEllipticRgn(_para1:longint; _para2:longint; _para3:longint; _para4:longint):HRGN; external 'gdi32' name 'CreateEllipticRgn';
  680. function CreateEllipticRgnIndirect(const _para1:RECT):HRGN; external 'gdi32' name 'CreateEllipticRgnIndirect';
  681. function CreateHatchBrush(_para1:longint; _para2:COLORREF):HBRUSH; external 'gdi32' name 'CreateHatchBrush';
  682. function CreatePalette(var _para1:LOGPALETTE):HPALETTE; external 'gdi32' name 'CreatePalette';
  683. function CreatePen(_para1:longint; _para2:longint; _para3:COLORREF):HPEN; external 'gdi32' name 'CreatePen';
  684. function CreatePenIndirect(var _para1:LOGPEN):HPEN; external 'gdi32' name 'CreatePenIndirect';
  685. function CreatePolyPolygonRgn(var _para1:POINT; var _para2:wINT; _para3:longint; _para4:longint):HRGN; external 'gdi32' name 'CreatePolyPolygonRgn';
  686. function CreatePatternBrush(_para1:HBITMAP):HBRUSH; external 'gdi32' name 'CreatePatternBrush';
  687. function CreateRectRgn(_para1:longint; _para2:longint; _para3:longint; _para4:longint):HRGN; external 'gdi32' name 'CreateRectRgn';
  688. function CreateRectRgnIndirect(const _para1:RECT):HRGN; external 'gdi32' name 'CreateRectRgnIndirect';
  689. function CreateRoundRectRgn(_para1:longint; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:longint):HRGN; external 'gdi32' name 'CreateRoundRectRgn';
  690. function CreateSolidBrush(_para1:COLORREF):HBRUSH; external 'gdi32' name 'CreateSolidBrush';
  691. function DeleteDC(_para1:HDC):WINBOOL; external 'gdi32' name 'DeleteDC';
  692. function DeleteMetaFile(_para1:HMETAFILE):WINBOOL; external 'gdi32' name 'DeleteMetaFile';
  693. function DeleteObject(_para1:HGDIOBJ):WINBOOL; external 'gdi32' name 'DeleteObject';
  694. function DrawEscape(_para1:HDC; _para2:longint; _para3:longint; _para4:LPCSTR):longint; external 'gdi32' name 'DrawEscape';
  695. function Ellipse(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint):WINBOOL; external 'gdi32' name 'Ellipse';
  696. function EnumObjects(_para1:HDC; _para2:longint; _para3:ENUMOBJECTSPROC; _para4:LPARAM):longint; external 'gdi32' name 'EnumObjects';
  697. function EqualRgn(_para1:HRGN; _para2:HRGN):WINBOOL; external 'gdi32' name 'EqualRgn';
  698. function Escape(_para1:HDC; _para2:longint; _para3:longint; _para4:LPCSTR; _para5:LPVOID):longint; external 'gdi32' name 'Escape';
  699. function ExtEscape(_para1:HDC; _para2:longint; _para3:longint; _para4:LPCSTR; _para5:longint;_para6:LPSTR):longint; external 'gdi32' name 'ExtEscape';
  700. function ExcludeClipRect(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint):longint; external 'gdi32' name 'ExcludeClipRect';
  701. function ExtCreateRegion(var _para1:XFORM; _para2:DWORD; var _para3:RGNDATA):HRGN; external 'gdi32' name 'ExtCreateRegion';
  702. function ExtFloodFill(_para1:HDC; _para2:longint; _para3:longint; _para4:COLORREF; _para5:UINT):WINBOOL; external 'gdi32' name 'ExtFloodFill';
  703. function FillRgn(_para1:HDC; _para2:HRGN; _para3:HBRUSH):WINBOOL; external 'gdi32' name 'FillRgn';
  704. function FloodFill(_para1:HDC; _para2:longint; _para3:longint; _para4:COLORREF):WINBOOL; external 'gdi32' name 'FloodFill';
  705. function FrameRgn(_para1:HDC; _para2:HRGN; _para3:HBRUSH; _para4:longint; _para5:longint):WINBOOL; external 'gdi32' name 'FrameRgn';
  706. function GetROP2(_para1:HDC):longint; external 'gdi32' name 'GetROP2';
  707. function GetAspectRatioFilterEx(_para1:HDC; _para2:LPSIZE):WINBOOL; external 'gdi32' name 'GetAspectRatioFilterEx';
  708. function GetBkColor(_para1:HDC):COLORREF; external 'gdi32' name 'GetBkColor';
  709. function GetBkMode(_para1:HDC):longint; external 'gdi32' name 'GetBkMode';
  710. function GetBitmapBits(_para1:HBITMAP; _para2:LONG; _para3:LPVOID):LONG; external 'gdi32' name 'GetBitmapBits';
  711. function GetBitmapDimensionEx(_para1:HBITMAP; _para2:LPSIZE):WINBOOL; external 'gdi32' name 'GetBitmapDimensionEx';
  712. function GetBoundsRect(_para1:HDC; _para2:LPRECT; _para3:UINT):UINT; external 'gdi32' name 'GetBoundsRect';
  713. function GetBrushOrgEx(_para1:HDC; _para2:LPPOINT):WINBOOL; external 'gdi32' name 'GetBrushOrgEx';
  714. function GetClipBox(_para1:HDC; _para2:LPRECT):longint; external 'gdi32' name 'GetClipBox';
  715. function GetClipRgn(_para1:HDC; _para2:HRGN):longint; external 'gdi32' name 'GetClipRgn';
  716. function GetMetaRgn(_para1:HDC; _para2:HRGN):longint; external 'gdi32' name 'GetMetaRgn';
  717. function GetCurrentObject(_para1:HDC; _para2:UINT):HGDIOBJ; external 'gdi32' name 'GetCurrentObject';
  718. function GetCurrentPositionEx(_para1:HDC; _para2:LPPOINT):WINBOOL; external 'gdi32' name 'GetCurrentPositionEx';
  719. function GetDeviceCaps(_para1:HDC; _para2:longint):longint; external 'gdi32' name 'GetDeviceCaps';
  720. function GetDIBits(_para1:HDC; _para2:HBITMAP; _para3:UINT; _para4:UINT; _para5:LPVOID;_para6:LPBITMAPINFO; _para7:UINT):longint; external 'gdi32' name 'GetDIBits';
  721. function GetFontData(_para1:HDC; _para2:DWORD; _para3:DWORD; _para4:LPVOID; _para5:DWORD):DWORD; external 'gdi32' name 'GetFontData';
  722. function GetGraphicsMode(_para1:HDC):longint; external 'gdi32' name 'GetGraphicsMode';
  723. function GetMapMode(_para1:HDC):longint; external 'gdi32' name 'GetMapMode';
  724. function GetMetaFileBitsEx(_para1:HMETAFILE; _para2:UINT; _para3:LPVOID):UINT; external 'gdi32' name 'GetMetaFileBitsEx';
  725. function GetNearestColor(_para1:HDC; _para2:COLORREF):COLORREF; external 'gdi32' name 'GetNearestColor';
  726. function GetNearestPaletteIndex(_para1:HPALETTE; _para2:COLORREF):UINT; external 'gdi32' name 'GetNearestPaletteIndex';
  727. function GetObjectType(h:HGDIOBJ):DWORD; external 'gdi32' name 'GetObjectType';
  728. function GetPaletteEntries(_para1:HPALETTE; _para2:UINT; _para3:UINT; _para4:LPPALETTEENTRY):UINT; external 'gdi32' name 'GetPaletteEntries';
  729. function GetPixel(_para1:HDC; _para2:longint; _para3:longint):COLORREF; external 'gdi32' name 'GetPixel';
  730. function GetPixelFormat(DC:HDC):longint; external 'gdi32' name 'GetPixelFormat';
  731. function GetPolyFillMode(_para1:HDC):longint; external 'gdi32' name 'GetPolyFillMode';
  732. function GetRasterizerCaps(_para1:LPRASTERIZER_STATUS; _para2:UINT):WINBOOL; external 'gdi32' name 'GetRasterizerCaps';
  733. function GetRegionData(_para1:HRGN; _para2:DWORD; _para3:LPRGNDATA):DWORD; external 'gdi32' name 'GetRegionData';
  734. function GetRgnBox(_para1:HRGN; _para2:LPRECT):longint; external 'gdi32' name 'GetRgnBox';
  735. function GetStockObject(_para1:longint):HGDIOBJ; external 'gdi32' name 'GetStockObject';
  736. function GetStretchBltMode(_para1:HDC):longint; external 'gdi32' name 'GetStretchBltMode';
  737. function GetSystemPaletteEntries(_para1:HDC; _para2:UINT; _para3:UINT; _para4:LPPALETTEENTRY):UINT; external 'gdi32' name 'GetSystemPaletteEntries';
  738. function GetSystemPaletteUse(_para1:HDC):UINT; external 'gdi32' name 'GetSystemPaletteUse';
  739. function GetTextCharacterExtra(_para1:HDC):longint; external 'gdi32' name 'GetTextCharacterExtra';
  740. function GetTextAlign(_para1:HDC):UINT; external 'gdi32' name 'GetTextAlign';
  741. function GetTextColor(_para1:HDC):COLORREF; external 'gdi32' name 'GetTextColor';
  742. function GetTextCharset(hdc:HDC):longint; external 'gdi32' name 'GetTextCharset';
  743. function GetTextCharsetInfo(hdc:HDC; lpSig:LPFONTSIGNATURE; dwFlags:DWORD):longint; external 'gdi32' name 'GetTextCharsetInfo';
  744. function TranslateCharsetInfo(var lpSrc:DWORD; lpCs:LPCHARSETINFO; dwFlags:DWORD):WINBOOL; external 'gdi32' name 'TranslateCharsetInfo';
  745. function GetFontLanguageInfo(_para1:HDC):DWORD; external 'gdi32' name 'GetFontLanguageInfo';
  746. function GetViewportExtEx(_para1:HDC; _para2:LPSIZE):WINBOOL; external 'gdi32' name 'GetViewportExtEx';
  747. function GetViewportOrgEx(_para1:HDC; _para2:LPPOINT):WINBOOL; external 'gdi32' name 'GetViewportOrgEx';
  748. function GetWindowExtEx(_para1:HDC; _para2:LPSIZE):WINBOOL; external 'gdi32' name 'GetWindowExtEx';
  749. function GetWindowOrgEx(_para1:HDC; _para2:LPPOINT):WINBOOL; external 'gdi32' name 'GetWindowOrgEx';
  750. function IntersectClipRect(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint):longint; external 'gdi32' name 'IntersectClipRect';
  751. function InvertRgn(_para1:HDC; _para2:HRGN):WINBOOL; external 'gdi32' name 'InvertRgn';
  752. function LineDDA(_para1:longint; _para2:longint; _para3:longint; _para4:longint; _para5:LINEDDAPROC;_para6:LPARAM):WINBOOL; external 'gdi32' name 'LineDDA';
  753. function LineTo(_para1:HDC; _para2:longint; _para3:longint):WINBOOL; external 'gdi32' name 'LineTo';
  754. function MaskBlt(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:HDC; _para7:longint; _para8:longint; _para9:HBITMAP; _para10:longint;_para11:longint; _para12:DWORD):WINBOOL; external 'gdi32' name 'MaskBlt';
  755. function PlgBlt(_para1:HDC; var _para2:POINT; _para3:HDC; _para4:longint; _para5:longint;_para6:longint; _para7:longint; _para8:HBITMAP; _para9:longint; _para10:longint):WINBOOL; external 'gdi32' name 'PlgBlt';
  756. function OffsetClipRgn(_para1:HDC; _para2:longint; _para3:longint):longint; external 'gdi32' name 'OffsetClipRgn';
  757. function OffsetRgn(_para1:HRGN; _para2:longint; _para3:longint):longint; external 'gdi32' name 'OffsetRgn';
  758. function PatBlt(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:DWORD):WINBOOL; external 'gdi32' name 'PatBlt';
  759. function Pie(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:longint; _para7:longint; _para8:longint; _para9:longint):WINBOOL; external 'gdi32' name 'Pie';
  760. function PlayMetaFile(_para1:HDC; _para2:HMETAFILE):WINBOOL; external 'gdi32' name 'PlayMetaFile';
  761. function PaintRgn(_para1:HDC; _para2:HRGN):WINBOOL; external 'gdi32' name 'PaintRgn';
  762. function PolyPolygon(_para1:HDC; var _para2:POINT; var _para3:wINT; _para4:longint):WINBOOL; external 'gdi32' name 'PolyPolygon';
  763. function PtInRegion(_para1:HRGN; _para2:longint; _para3:longint):WINBOOL; external 'gdi32' name 'PtInRegion';
  764. function PtVisible(_para1:HDC; _para2:longint; _para3:longint):WINBOOL; external 'gdi32' name 'PtVisible';
  765. function RectInRegion(_para1:HRGN; const _para2:RECT):WINBOOL; external 'gdi32' name 'RectInRegion';
  766. function RectVisible(_para1:HDC; const _para2:RECT):WINBOOL; external 'gdi32' name 'RectVisible';
  767. function Rectangle(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint):WINBOOL; external 'gdi32' name 'Rectangle';
  768. function RestoreDC(_para1:HDC; _para2:longint):WINBOOL; external 'gdi32' name 'RestoreDC';
  769. function RealizePalette(_para1:HDC):UINT; external 'gdi32' name 'RealizePalette';
  770. function RoundRect(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:longint; _para7:longint):WINBOOL; external 'gdi32' name 'RoundRect';
  771. function ResizePalette(_para1:HPALETTE; _para2:UINT):WINBOOL; external 'gdi32' name 'ResizePalette';
  772. function SaveDC(_para1:HDC):longint; external 'gdi32' name 'SaveDC';
  773. function SelectClipRgn(_para1:HDC; _para2:HRGN):longint; external 'gdi32' name 'SelectClipRgn';
  774. function ExtSelectClipRgn(_para1:HDC; _para2:HRGN; _para3:longint):longint; external 'gdi32' name 'ExtSelectClipRgn';
  775. function SetMetaRgn(_para1:HDC):longint; external 'gdi32' name 'SetMetaRgn';
  776. function SelectObject(_para1:HDC; _para2:HGDIOBJ):HGDIOBJ; external 'gdi32' name 'SelectObject';
  777. function SelectPalette(_para1:HDC; _para2:HPALETTE; _para3:WINBOOL):HPALETTE; external 'gdi32' name 'SelectPalette';
  778. function SetBkColor(_para1:HDC; _para2:COLORREF):COLORREF; external 'gdi32' name 'SetBkColor';
  779. function SetBkMode(_para1:HDC; _para2:longint):longint; external 'gdi32' name 'SetBkMode';
  780. function SetBitmapBits(_para1:HBITMAP; _para2:DWORD; _para3:pointer):LONG; external 'gdi32' name 'SetBitmapBits';
  781. function SetBoundsRect(_para1:HDC; const _para2:RECT; _para3:UINT):UINT; external 'gdi32' name 'SetBoundsRect';
  782. function SetDIBits(_para1:HDC; _para2:HBITMAP; _para3:UINT; _para4:UINT; _para5:pointer;_para6:PBITMAPINFO; _para7:UINT):longint; external 'gdi32' name 'SetDIBits';
  783. function SetDIBitsToDevice(_para1:HDC; _para2:longint; _para3:longint; _para4:DWORD; _para5:DWORD;_para6:longint; _para7:longint; _para8:UINT; _para9:UINT; _para10:pointer;var _para11:BITMAPINFO; _para12:UINT):longint;
  784. external 'gdi32' name 'SetDIBitsToDevice';
  785. function SetMapperFlags(_para1:HDC; _para2:DWORD):DWORD; external 'gdi32' name 'SetMapperFlags';
  786. function SetGraphicsMode(hdc:HDC; iMode:longint):longint; external 'gdi32' name 'SetGraphicsMode';
  787. function SetMapMode(_para1:HDC; _para2:longint):longint; external 'gdi32' name 'SetMapMode';
  788. function SetMetaFileBitsEx(_para1:UINT; var _para2:BYTE):HMETAFILE; external 'gdi32' name 'SetMetaFileBitsEx';
  789. function SetPaletteEntries(_para1:HPALETTE; _para2:UINT; _para3:UINT; var _para4:PALETTEENTRY):UINT; external 'gdi32' name 'SetPaletteEntries';
  790. function SetPixel(_para1:HDC; _para2:longint; _para3:longint; _para4:COLORREF):COLORREF; external 'gdi32' name 'SetPixel';
  791. function SetPixelV(_para1:HDC; _para2:longint; _para3:longint; _para4:COLORREF):WINBOOL; external 'gdi32' name 'SetPixelV';
  792. function SetPolyFillMode(_para1:HDC; _para2:longint):longint; external 'gdi32' name 'SetPolyFillMode';
  793. function StretchBlt(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:HDC; _para7:longint; _para8:longint; _para9:longint; _para10:longint;_para11:DWORD):WINBOOL; external 'gdi32' name 'StretchBlt';
  794. function SetRectRgn(_para1:HRGN; _para2:longint; _para3:longint; _para4:longint; _para5:longint):WINBOOL; external 'gdi32' name 'SetRectRgn';
  795. function StretchDIBits(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:longint; _para7:longint; _para8:longint; _para9:longint; _para10:pointer;var _para11:BITMAPINFO; _para12:UINT; _para13:DWORD):longint;
  796. external 'gdi32' name 'StretchDIBits';
  797. function SetROP2(_para1:HDC; _para2:longint):longint; external 'gdi32' name 'SetROP2';
  798. function SetStretchBltMode(_para1:HDC; _para2:longint):longint; external 'gdi32' name 'SetStretchBltMode';
  799. function SetSystemPaletteUse(_para1:HDC; _para2:UINT):UINT; external 'gdi32' name 'SetSystemPaletteUse';
  800. function SetTextCharacterExtra(_para1:HDC; _para2:longint):longint; external 'gdi32' name 'SetTextCharacterExtra';
  801. function SetTextColor(_para1:HDC; _para2:COLORREF):COLORREF; external 'gdi32' name 'SetTextColor';
  802. function SetTextAlign(_para1:HDC; _para2:UINT):UINT; external 'gdi32' name 'SetTextAlign';
  803. function SetTextJustification(_para1:HDC; _para2:longint; _para3:longint):WINBOOL; external 'gdi32' name 'SetTextJustification';
  804. function UpdateColors(_para1:HDC):WINBOOL; external 'gdi32' name 'UpdateColors';
  805. function PlayMetaFileRecord(_para1:HDC; _para2:LPHANDLETABLE; _para3:LPMETARECORD; _para4:UINT):WINBOOL; external 'gdi32' name 'PlayMetaFileRecord';
  806. function EnumMetaFile(_para1:HDC; _para2:HMETAFILE; _para3:ENUMMETAFILEPROC; _para4:LPARAM):WINBOOL; external 'gdi32' name 'EnumMetaFile';
  807. function CloseEnhMetaFile(_para1:HDC):HENHMETAFILE; external 'gdi32' name 'CloseEnhMetaFile';
  808. function DeleteEnhMetaFile(_para1:HENHMETAFILE):WINBOOL; external 'gdi32' name 'DeleteEnhMetaFile';
  809. function EnumEnhMetaFile(_para1:HDC; _para2:HENHMETAFILE; _para3:ENHMETAFILEPROC; _para4:LPVOID; const _para5:RECT):WINBOOL; external 'gdi32' name 'EnumEnhMetaFile';
  810. function GetEnhMetaFileHeader(_para1:HENHMETAFILE; _para2:UINT; _para3:LPENHMETAHEADER):UINT; external 'gdi32' name 'GetEnhMetaFileHeader';
  811. function GetEnhMetaFilePaletteEntries(_para1:HENHMETAFILE; _para2:UINT; _para3:LPPALETTEENTRY):UINT; external 'gdi32' name 'GetEnhMetaFilePaletteEntries';
  812. function GetEnhMetaFileBits(_para1:HENHMETAFILE; _para2:UINT; _para3:LPBYTE): UINT; external 'gdi32' name 'GetEnhMetaFileBits';
  813. function GetWinMetaFileBits(_para1:HENHMETAFILE; _para2:UINT; _para3:LPBYTE; _para4:wINT; _para5:HDC):UINT; external 'gdi32' name 'GetWinMetaFileBits';
  814. function PlayEnhMetaFile(_para1:HDC; _para2:HENHMETAFILE; const _para3:RECT):WINBOOL; external 'gdi32' name 'PlayEnhMetaFile';
  815. function PlayEnhMetaFileRecord(_para1:HDC; _para2:LPHANDLETABLE; var _para3:ENHMETARECORD; _para4:UINT):WINBOOL; external 'gdi32' name 'PlayEnhMetaFileRecord';
  816. function SetEnhMetaFileBits(_para1:UINT; var _para2:BYTE):HENHMETAFILE; external 'gdi32' name 'SetEnhMetaFileBits';
  817. function SetWinMetaFileBits(_para1:UINT; var _para2:BYTE; _para3:HDC; var _para4:METAFILEPICT):HENHMETAFILE; external 'gdi32' name 'SetWinMetaFileBits';
  818. function GdiComment(_para1:HDC; _para2:UINT; var _para3:BYTE):WINBOOL; external 'gdi32' name 'GdiComment';
  819. function AngleArc(_para1:HDC; _para2:longint; _para3:longint; _para4:DWORD; _para5:Single;_para6:Single):WINBOOL; external 'gdi32' name 'AngleArc';
  820. function PolyPolyline(_para1:HDC; var _para2:POINT; var _para3:DWORD; _para4:DWORD):WINBOOL; external 'gdi32' name 'PolyPolyline';
  821. function GetWorldTransform(_para1:HDC; _para2:LPXFORM):WINBOOL; external 'gdi32' name 'GetWorldTransform';
  822. function SetWorldTransform(_para1:HDC; var _para2:XFORM):WINBOOL; external 'gdi32' name 'SetWorldTransform';
  823. function ModifyWorldTransform(_para1:HDC; var _para2:XFORM; _para3:DWORD):WINBOOL; external 'gdi32' name 'ModifyWorldTransform';
  824. function CombineTransform(_para1:LPXFORM; var _para2:XFORM; var _para3:XFORM):WINBOOL; external 'gdi32' name 'CombineTransform';
  825. function CreateDIBSection(_para1:HDC; var _para2:BITMAPINFO; _para3:UINT; var _para4:pointer; _para5:HANDLE;_para6:DWORD):HBITMAP; external 'gdi32' name 'CreateDIBSection';
  826. function GetDIBColorTable(_para1:HDC; _para2:UINT; _para3:UINT; var _para4:RGBQUAD):UINT; external 'gdi32' name 'GetDIBColorTable';
  827. function SetDIBColorTable(_para1:HDC; _para2:UINT; _para3:UINT; var _para4:RGBQUAD):UINT; external 'gdi32' name 'SetDIBColorTable';
  828. function SetColorAdjustment(_para1:HDC; var _para2:COLORADJUSTMENT):WINBOOL; external 'gdi32' name 'SetColorAdjustment';
  829. function GetColorAdjustment(_para1:HDC; _para2:LPCOLORADJUSTMENT):WINBOOL; external 'gdi32' name 'GetColorAdjustment';
  830. function CreateHalftonePalette(_para1:HDC):HPALETTE; external 'gdi32' name 'CreateHalftonePalette';
  831. function EndDoc(_para1:HDC):longint; external 'gdi32' name 'EndDoc';
  832. function StartPage(_para1:HDC):longint; external 'gdi32' name 'StartPage';
  833. function EndPage(_para1:HDC):longint; external 'gdi32' name 'EndPage';
  834. function AbortDoc(_para1:HDC):longint; external 'gdi32' name 'AbortDoc';
  835. function SetAbortProc(_para1:HDC; _para2:TABORTPROC):longint; external 'gdi32' name 'SetAbortProc';
  836. {function AbortPath(_para1:HDC):WINBOOL; external 'gdi32' name 'AbortPath';}
  837. function ArcTo(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:longint; _para7:longint; _para8:longint; _para9:longint):WINBOOL; external 'gdi32' name 'ArcTo';
  838. function BeginPath(_para1:HDC):WINBOOL; external 'gdi32' name 'BeginPath';
  839. function CloseFigure(_para1:HDC):WINBOOL; external 'gdi32' name 'CloseFigure';
  840. function EndPath(_para1:HDC):WINBOOL; external 'gdi32' name 'EndPath';
  841. function FillPath(_para1:HDC):WINBOOL; external 'gdi32' name 'FillPath';
  842. function FlattenPath(_para1:HDC):WINBOOL; external 'gdi32' name 'FlattenPath';
  843. function GetPath(_para1:HDC; _para2:LPPOINT; _para3:LPBYTE; _para4:longint):longint; external 'gdi32' name 'GetPath';
  844. function PathToRegion(_para1:HDC):HRGN; external 'gdi32' name 'PathToRegion';
  845. function PolyDraw(_para1:HDC; _para2:LPPOINT;_para3:LPBYTE; _para4:longint):WINBOOL; external 'gdi32' name 'PolyDraw';
  846. function SelectClipPath(_para1:HDC; _para2:longint):WINBOOL; external 'gdi32' name 'SelectClipPath';
  847. function SetArcDirection(_para1:HDC; _para2:longint):longint; external 'gdi32' name 'SetArcDirection';
  848. function SetMiterLimit(_para1:HDC; _para2:Single; _para3:PSingle):WINBOOL; external 'gdi32' name 'SetMiterLimit';
  849. function StrokeAndFillPath(_para1:HDC):WINBOOL; external 'gdi32' name 'StrokeAndFillPath';
  850. function StrokePath(_para1:HDC):WINBOOL; external 'gdi32' name 'StrokePath';
  851. function WidenPath(_para1:HDC):WINBOOL; external 'gdi32' name 'WidenPath';
  852. function ExtCreatePen(_para1:DWORD; _para2:DWORD; var _para3:LOGBRUSH; _para4:DWORD; var _para5:DWORD):HPEN; external 'gdi32' name 'ExtCreatePen';
  853. function GetMiterLimit(_para1:HDC; _para2:PSingle):WINBOOL; external 'gdi32' name 'GetMiterLimit';
  854. function GetArcDirection(_para1:HDC):longint; external 'gdi32' name 'GetArcDirection';
  855. function MoveToEx(_para1:HDC; _para2:longint; _para3:longint; _para4:LPPOINT):WINBOOL; external 'gdi32' name 'MoveToEx';
  856. function CreatePolygonRgn(var _para1:POINT; _para2:longint; _para3:longint):HRGN; external 'gdi32' name 'CreatePolygonRgn';
  857. function DPtoLP(_para1:HDC; _para2:LPPOINT; _para3:longint):WINBOOL; external 'gdi32' name 'DPtoLP';
  858. function LPtoDP(_para1:HDC; _para2:LPPOINT; _para3:longint):WINBOOL; external 'gdi32' name 'LPtoDP';
  859. function Polygon(_para1:HDC; _para2:LPPOINT; _para3:longint):WINBOOL; external 'gdi32' name 'Polygon';
  860. function Polyline(_para1:HDC; _para2:LPPOINT; _para3:longint):WINBOOL; external 'gdi32' name 'Polyline';
  861. function PolyBezier(_para1:HDC; _para2:LPPOINT; _para3:DWORD):WINBOOL; external 'gdi32' name 'PolyBezier';
  862. function PolyBezierTo(_para1:HDC; _para2:LPPOINT; _para3:DWORD):WINBOOL; external 'gdi32' name 'PolyBezierTo';
  863. function PolylineTo(_para1:HDC; _para2:LPPOINT; _para3:DWORD):WINBOOL; external 'gdi32' name 'PolylineTo';
  864. function SetViewportExtEx(_para1:HDC; _para2:longint; _para3:longint; _para4:LPSIZE):WINBOOL; external 'gdi32' name 'SetViewportExtEx';
  865. function SetViewportOrgEx(_para1:HDC; _para2:longint; _para3:longint; _para4:LPPOINT):WINBOOL; external 'gdi32' name 'SetViewportOrgEx';
  866. function SetWindowExtEx(_para1:HDC; _para2:longint; _para3:longint; _para4:LPSIZE):WINBOOL; external 'gdi32' name 'SetWindowExtEx';
  867. function SetWindowOrgEx(_para1:HDC; _para2:longint; _para3:longint; _para4:LPPOINT):WINBOOL; external 'gdi32' name 'SetWindowOrgEx';
  868. function OffsetViewportOrgEx(_para1:HDC; _para2:longint; _para3:longint; _para4:LPPOINT):WINBOOL; external 'gdi32' name 'OffsetViewportOrgEx';
  869. function OffsetWindowOrgEx(_para1:HDC; _para2:longint; _para3:longint; _para4:LPPOINT):WINBOOL; external 'gdi32' name 'OffsetWindowOrgEx';
  870. function ScaleViewportExtEx(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:LPSIZE):WINBOOL; external 'gdi32' name 'ScaleViewportExtEx';
  871. function ScaleWindowExtEx(_para1:HDC; _para2:longint; _para3:longint; _para4:longint; _para5:longint;_para6:LPSIZE):WINBOOL; external 'gdi32' name 'ScaleWindowExtEx';
  872. function SetBitmapDimensionEx(_para1:HBITMAP; _para2:longint; _para3:longint; _para4:LPSIZE):WINBOOL; external 'gdi32' name 'SetBitmapDimensionEx';
  873. function SetBrushOrgEx(_para1:HDC; _para2:longint; _para3:longint; _para4:LPPOINT):WINBOOL; external 'gdi32' name 'SetBrushOrgEx';
  874. function GetDCOrgEx(_para1:HDC; _para2:LPPOINT):WINBOOL; external 'gdi32' name 'GetDCOrgEx';
  875. function FixBrushOrgEx(_para1:HDC; _para2:longint; _para3:longint; _para4:LPPOINT):WINBOOL; external 'gdi32' name 'FixBrushOrgEx';
  876. function UnrealizeObject(_para1:HGDIOBJ):WINBOOL; external 'gdi32' name 'UnrealizeObject';
  877. function GdiFlush:WINBOOL; external 'gdi32' name 'GdiFlush';
  878. function GdiSetBatchLimit(_para1:DWORD):DWORD; external 'gdi32' name 'GdiSetBatchLimit';
  879. function GdiGetBatchLimit:DWORD; external 'gdi32' name 'GdiGetBatchLimit';
  880. function SetICMMode(_para1:HDC; _para2:longint):longint; external 'gdi32' name 'SetICMMode';
  881. function CheckColorsInGamut(_para1:HDC; _para2:LPVOID; _para3:LPVOID; _para4:DWORD):WINBOOL; external 'gdi32' name 'CheckColorsInGamut';
  882. function GetColorSpace(_para1:HDC):HANDLE; external 'gdi32' name 'GetColorSpace';
  883. function SetColorSpace(_para1:HDC; _para2:HCOLORSPACE):WINBOOL; external 'gdi32' name 'SetColorSpace';
  884. function DeleteColorSpace(_para1:HCOLORSPACE):WINBOOL; external 'gdi32' name 'DeleteColorSpace';
  885. function GetDeviceGammaRamp(_para1:HDC; _para2:LPVOID):WINBOOL; external 'gdi32' name 'GetDeviceGammaRamp';
  886. function SetDeviceGammaRamp(_para1:HDC; _para2:LPVOID):WINBOOL; external 'gdi32' name 'SetDeviceGammaRamp';
  887. function ColorMatchToTarget(_para1:HDC; _para2:HDC; _para3:DWORD):WINBOOL; external 'gdi32' name 'ColorMatchToTarget';
  888. {
  889. function CreatePropertySheetPageA(lppsp:LPCPROPSHEETPAGE):HPROPSHEETPAGE; external 'comctl32' name 'CreatePropertySheetPageA';
  890. function DestroyPropertySheetPage(hPSPage:HPROPSHEETPAGE):WINBOOL; external 'comctl32' name 'DestroyPropertySheetPage';
  891. procedure InitCommonControls; external 'comctl32' name 'InitCommonControls';
  892. function ImageList_AddIcon(himl:HIMAGELIST; hicon:HICON):longint;
  893. function ImageList_Create(cx:longint; cy:longint; flags:UINT; cInitial:longint; cGrow:longint):HIMAGELIST; external 'comctl32' name 'ImageList_Create';
  894. function ImageList_Destroy(himl:HIMAGELIST):WINBOOL; external 'comctl32' name 'ImageList_Destroy';
  895. function ImageList_GetImageCount(himl:HIMAGELIST):longint; external 'comctl32' name 'ImageList_GetImageCount';
  896. function ImageList_Add(himl:HIMAGELIST; hbmImage:HBITMAP; hbmMask:HBITMAP):longint; external 'comctl32' name 'ImageList_Add';
  897. function ImageList_ReplaceIcon(himl:HIMAGELIST; i:longint; hicon:HICON):longint; external 'comctl32' name 'ImageList_ReplaceIcon';
  898. function ImageList_SetBkColor(himl:HIMAGELIST; clrBk:COLORREF):COLORREF; external 'comctl32' name 'ImageList_SetBkColor';
  899. function ImageList_GetBkColor(himl:HIMAGELIST):COLORREF; external 'comctl32' name 'ImageList_GetBkColor';
  900. function ImageList_SetOverlayImage(himl:HIMAGELIST; iImage:longint; iOverlay:longint):WINBOOL; external 'comctl32' name 'ImageList_SetOverlayImage';
  901. function ImageList_Draw(himl:HIMAGELIST; i:longint; hdcDst:HDC; x:longint; y:longint;fStyle:UINT):WINBOOL; external 'comctl32' name 'ImageList_Draw';
  902. function ImageList_Replace(himl:HIMAGELIST; i:longint; hbmImage:HBITMAP; hbmMask:HBITMAP):WINBOOL; external 'comctl32' name 'ImageList_Replace';
  903. function ImageList_AddMasked(himl:HIMAGELIST; hbmImage:HBITMAP; crMask:COLORREF):longint; external 'comctl32' name 'ImageList_AddMasked';
  904. function ImageList_DrawEx(himl:HIMAGELIST; i:longint; hdcDst:HDC; x:longint; y:longint;dx:longint; dy:longint; rgbBk:COLORREF; rgbFg:COLORREF; fStyle:UINT):WINBOOL; external 'comctl32' name 'ImageList_DrawEx';
  905. function ImageList_Remove(himl:HIMAGELIST; i:longint):WINBOOL; external 'comctl32' name 'ImageList_Remove';
  906. function ImageList_GetIcon(himl:HIMAGELIST; i:longint; flags:UINT):HICON; external 'comctl32' name 'ImageList_GetIcon';
  907. function ImageList_BeginDrag(himlTrack:HIMAGELIST; iTrack:longint; dxHotspot:longint; dyHotspot:longint):WINBOOL; external 'comctl32' name 'ImageList_BeginDrag';
  908. procedure ImageList_EndDrag; external 'comctl32' name 'ImageList_EndDrag';
  909. function ImageList_DragEnter(hwndLock:HWND; x:longint; y:longint):WINBOOL; external 'comctl32' name 'ImageList_DragEnter';
  910. function ImageList_DragLeave(hwndLock:HWND):WINBOOL; external 'comctl32' name 'ImageList_DragLeave';
  911. function ImageList_DragMove(x:longint; y:longint):WINBOOL; external 'comctl32' name 'ImageList_DragMove';
  912. function ImageList_SetDragCursorImage(himlDrag:HIMAGELIST; iDrag:longint; dxHotspot:longint; dyHotspot:longint):WINBOOL; external 'comctl32' name 'ImageList_SetDragCursorImage';
  913. function ImageList_DragShowNolock(fShow:WINBOOL):WINBOOL; external 'comctl32' name 'ImageList_DragShowNolock';
  914. function ImageList_GetDragImage(ppt:LPPOINT; pptHotspot:LPPOINT):HIMAGELIST; external 'comctl32' name 'ImageList_GetDragImage';
  915. function ImageList_GetIconSize(himl:HIMAGELIST; var cx:longint; var cy:longint):WINBOOL; external 'comctl32' name 'ImageList_GetIconSize';
  916. function ImageList_SetIconSize(himl:HIMAGELIST; cx:longint; cy:longint):WINBOOL; external 'comctl32' name 'ImageList_SetIconSize';
  917. function ImageList_GetImageInfo(himl:HIMAGELIST; i:longint; var pImageInfo:IMAGEINFO):WINBOOL; external 'comctl32' name 'ImageList_GetImageInfo';
  918. function ImageList_Merge(himl1:HIMAGELIST; i1:longint; himl2:HIMAGELIST; i2:longint; dx:longint;dy:longint):HIMAGELIST; external 'comctl32' name 'ImageList_Merge';
  919. function ImageList_SetImageCount(himl: HIMAGELIST; uNewCount: UINT): Integer; external 'comctl32.dll' name 'ImageList_SetImageCount';
  920. function CreateToolbarEx(hwnd:HWND; ws:DWORD; wID:UINT; nBitmaps:longint; hBMInst:HINST;wBMID:UINT_PTR; lpButtons:LPCTBBUTTON; iNumButtons:longint; dxButton:longint; dyButton:longint;dxBitmap:longint;
  921. dyBitmap:longint; uStructSize:UINT):HWND; external 'comctl32' name 'CreateToolbarEx';
  922. function CreateMappedBitmap(hInstance:HINST; idBitmap:longint; wFlags:UINT; lpColorMap:LPCOLORMAP; iNumMaps:longint):HBITMAP; external 'comctl32' name 'CreateMappedBitmap';
  923. procedure MenuHelp(uMsg:UINT; wParam:WPARAM; lParam:LPARAM; hMainMenu:HMENU; hInst:HINST;hwndStatus:HWND; var lpwIDs:UINT); external 'comctl32' name 'MenuHelp';
  924. function ShowHideMenuCtl(hWnd:HWND; uFlags:UINT; lpInfo:LPINT):WINBOOL; external 'comctl32' name 'ShowHideMenuCtl';
  925. procedure GetEffectiveClientRect(hWnd:HWND; lprc:LPRECT; lpInfo:LPINT); external 'comctl32' name 'GetEffectiveClientRect';
  926. function MakeDragList(hLB:HWND):WINBOOL; external 'comctl32' name 'MakeDragList';
  927. procedure DrawInsert(handParent:HWND; hLB:HWND; nItem:longint); external 'comctl32' name 'DrawInsert';
  928. function LBItemFromPt(hLB:HWND; pt:POINT; bAutoScroll:WINBOOL):longint; external 'comctl32' name 'LBItemFromPt';
  929. function CreateUpDownControl(dwStyle:DWORD; x:longint; y:longint; cx:longint; cy:longint;hParent:HWND; nID:longint; hInst:HINST; hBuddy:HWND; nUpper:longint;nLower:longint; nPos:longint):HWND; external 'comctl32' name 'CreateUpDownControl';
  930. }
  931. function RegCloseKey(hKey:HKEY):LONG; external 'advapi32' name 'RegCloseKey';
  932. function RegSetKeySecurity(hKey:HKEY; SecurityInformation:SECURITY_INFORMATION; pSecurityDescriptor:PSECURITY_DESCRIPTOR):LONG; external 'advapi32' name 'RegSetKeySecurity';
  933. function RegFlushKey(hKey:HKEY):LONG; external 'advapi32' name 'RegFlushKey';
  934. function RegGetKeySecurity(hKey:HKEY; SecurityInformation:SECURITY_INFORMATION; pSecurityDescriptor:PSECURITY_DESCRIPTOR; lpcbSecurityDescriptor:LPDWORD):LONG; external 'advapi32' name 'RegGetKeySecurity';
  935. function RegNotifyChangeKeyValue(hKey:HKEY; bWatchSubtree:WINBOOL; dwNotifyFilter:DWORD; hEvent:HANDLE; fAsynchronus:WINBOOL):LONG; external 'advapi32' name 'RegNotifyChangeKeyValue';
  936. function IsValidCodePage(CodePage:UINT):WINBOOL; external 'kernel32' name 'IsValidCodePage';
  937. function GetACP:UINT; external 'kernel32' name 'GetACP';
  938. function GetOEMCP:UINT; external 'kernel32' name 'GetOEMCP';
  939. function GetCPInfo(_para1:UINT; _para2:LPCPINFO):WINBOOL; external 'kernel32' name 'GetCPInfo';
  940. function IsDBCSLeadByte(TestChar:BYTE):WINBOOL; external 'kernel32' name 'IsDBCSLeadByte';
  941. function IsDBCSLeadByteEx(CodePage:UINT; TestChar:BYTE):WINBOOL; external 'kernel32' name 'IsDBCSLeadByteEx';
  942. function MultiByteToWideChar(CodePage:UINT; dwFlags:DWORD; lpMultiByteStr:LPCSTR; cchMultiByte:longint; lpWideCharStr:LPWSTR;cchWideChar:longint):longint; external 'kernel32' name 'MultiByteToWideChar';
  943. function WideCharToMultiByte(CodePage:UINT; dwFlags:DWORD; lpWideCharStr:LPCWSTR; cchWideChar:longint; lpMultiByteStr:LPSTR;cchMultiByte:longint; lpDefaultChar:LPCSTR; lpUsedDefaultChar:LPBOOL):longint; external 'kernel32' name 'WideCharToMultiByte';
  944. function IsValidLocale(Locale:LCID; dwFlags:DWORD):WINBOOL; external 'kernel32' name 'IsValidLocale';
  945. function ConvertDefaultLocale(Locale:LCID):LCID; external 'kernel32' name 'ConvertDefaultLocale';
  946. function GetThreadLocale:LCID; external 'kernel32' name 'GetThreadLocale';
  947. function SetThreadLocale(Locale:LCID):WINBOOL; external 'kernel32' name 'SetThreadLocale';
  948. function GetSystemDefaultLangID:LANGID; external 'kernel32' name 'GetSystemDefaultLangID';
  949. function GetUserDefaultLangID:LANGID; external 'kernel32' name 'GetUserDefaultLangID';
  950. function GetSystemDefaultLCID:LCID; external 'kernel32' name 'GetSystemDefaultLCID';
  951. function GetUserDefaultLCID:LCID; external 'kernel32' name 'GetUserDefaultLCID';
  952. function ReadConsoleOutputAttribute(hConsoleOutput:HANDLE; lpAttribute:LPWORD; nLength:DWORD; dwReadCoord:COORD; lpNumberOfAttrsRead:LPDWORD):WINBOOL; external 'kernel32' name 'ReadConsoleOutputAttribute';
  953. function WriteConsoleOutputAttribute(hConsoleOutput:HANDLE; var lpAttribute:WORD; nLength:DWORD; dwWriteCoord:COORD; lpNumberOfAttrsWritten:LPDWORD):WINBOOL; external 'kernel32' name 'WriteConsoleOutputAttribute';
  954. function FillConsoleOutputAttribute(hConsoleOutput:HANDLE; wAttribute:WORD; nLength:DWORD; dwWriteCoord:COORD; lpNumberOfAttrsWritten:LPDWORD):WINBOOL; external 'kernel32' name 'FillConsoleOutputAttribute';
  955. function GetConsoleMode(hConsoleHandle:HANDLE; lpMode:LPDWORD):WINBOOL; external 'kernel32' name 'GetConsoleMode';
  956. function GetNumberOfConsoleInputEvents(hConsoleInput:HANDLE; lpNumberOfEvents:PDWORD):WINBOOL; external 'kernel32' name 'GetNumberOfConsoleInputEvents';
  957. function GetConsoleScreenBufferInfo(hConsoleOutput:HANDLE; lpConsoleScreenBufferInfo:PCONSOLE_SCREEN_BUFFER_INFO):WINBOOL; external 'kernel32' name 'GetConsoleScreenBufferInfo';
  958. //function GetLargestConsoleWindowSize(hConsoleOutput:HANDLE):COORD; external 'kernel32' name 'GetLargestConsoleWindowSize';
  959. function GetLargestConsoleWindowSize(hConsoleOutput:HANDLE):COORD;
  960. function GetConsoleCursorInfo(hConsoleOutput:HANDLE; lpConsoleCursorInfo:PCONSOLE_CURSOR_INFO):WINBOOL; external 'kernel32' name 'GetConsoleCursorInfo';
  961. function GetNumberOfConsoleMouseButtons(lpNumberOfMouseButtons:LPDWORD):WINBOOL; external 'kernel32' name 'GetNumberOfConsoleMouseButtons';
  962. function SetConsoleMode(hConsoleHandle:HANDLE; dwMode:DWORD):WINBOOL; external 'kernel32' name 'SetConsoleMode';
  963. function SetConsoleActiveScreenBuffer(hConsoleOutput:HANDLE):WINBOOL; external 'kernel32' name 'SetConsoleActiveScreenBuffer';
  964. function FlushConsoleInputBuffer(hConsoleInput:HANDLE):WINBOOL; external 'kernel32' name 'FlushConsoleInputBuffer';
  965. function SetConsoleScreenBufferSize(hConsoleOutput:HANDLE; dwSize:COORD):WINBOOL; external 'kernel32' name 'SetConsoleScreenBufferSize';
  966. function SetConsoleCursorPosition(hConsoleOutput:HANDLE; dwCursorPosition:COORD):WINBOOL; external 'kernel32' name 'SetConsoleCursorPosition';
  967. function SetConsoleCursorInfo(hConsoleOutput:HANDLE; lpConsoleCursorInfo:PCONSOLE_CURSOR_INFO):WINBOOL; external 'kernel32' name 'SetConsoleCursorInfo';
  968. function SetConsoleWindowInfo(hConsoleOutput:HANDLE; bAbsolute:WINBOOL; var lpConsoleWindow:SMALL_RECT):WINBOOL; external 'kernel32' name 'SetConsoleWindowInfo';
  969. function SetConsoleTextAttribute(hConsoleOutput:HANDLE; wAttributes:WORD):WINBOOL; external 'kernel32' name 'SetConsoleTextAttribute';
  970. function SetConsoleCtrlHandler(HandlerRoutine:PHANDLER_ROUTINE; Add:WINBOOL):WINBOOL; external 'kernel32' name 'SetConsoleCtrlHandler';
  971. function GenerateConsoleCtrlEvent(dwCtrlEvent:DWORD; dwProcessGroupId:DWORD):WINBOOL; external 'kernel32' name 'GenerateConsoleCtrlEvent';
  972. function AllocConsole:WINBOOL; external 'kernel32' name 'AllocConsole';
  973. function FreeConsole:WINBOOL; external 'kernel32' name 'FreeConsole';
  974. function CreateConsoleScreenBuffer(dwDesiredAccess:DWORD; dwShareMode:DWORD; var lpSecurityAttributes:SECURITY_ATTRIBUTES; dwFlags:DWORD; lpScreenBufferData:LPVOID):HANDLE; external 'kernel32' name 'CreateConsoleScreenBuffer';
  975. function GetConsoleCP:UINT; external 'kernel32' name 'GetConsoleCP';
  976. function SetConsoleCP(wCodePageID:UINT):WINBOOL; external 'kernel32' name 'SetConsoleCP';
  977. function GetConsoleOutputCP:UINT; external 'kernel32' name 'GetConsoleOutputCP';
  978. function SetConsoleOutputCP(wCodePageID:UINT):WINBOOL; external 'kernel32' name 'SetConsoleOutputCP';
  979. function WNetConnectionDialog(hwnd:HWND; dwType:DWORD):DWORD; external 'mpr' name 'WNetConnectionDialog';
  980. function WNetDisconnectDialog(hwnd:HWND; dwType:DWORD):DWORD; external 'mpr' name 'WNetDisconnectDialog';
  981. function WNetCloseEnum(hEnum:HANDLE):DWORD; external 'mpr' name 'WNetCloseEnum';
  982. function CloseServiceHandle(hSCObject:SC_HANDLE):WINBOOL; external 'advapi32' name 'CloseServiceHandle';
  983. function ControlService(hService:SC_HANDLE; dwControl:DWORD; lpServiceStatus:LPSERVICE_STATUS):WINBOOL; external 'advapi32' name 'ControlService';
  984. function DeleteService(hService:SC_HANDLE):WINBOOL; external 'advapi32' name 'DeleteService';
  985. function LockServiceDatabase(hSCManager:SC_HANDLE):SC_LOCK; external 'advapi32' name 'LockServiceDatabase';
  986. function NotifyBootConfigStatus(BootAcceptable:WINBOOL):WINBOOL; external 'advapi32' name 'NotifyBootConfigStatus';
  987. function QueryServiceObjectSecurity(hService:SC_HANDLE; dwSecurityInformation:SECURITY_INFORMATION; lpSecurityDescriptor:PSECURITY_DESCRIPTOR; cbBufSize:DWORD; pcbBytesNeeded:LPDWORD):WINBOOL;external 'advapi32' name 'QueryServiceObjectSecurity';
  988. function QueryServiceStatus(hService:SC_HANDLE; lpServiceStatus:LPSERVICE_STATUS):WINBOOL; external 'advapi32' name 'QueryServiceStatus';
  989. function SetServiceObjectSecurity(hService:SC_HANDLE; dwSecurityInformation:SECURITY_INFORMATION; lpSecurityDescriptor:PSECURITY_DESCRIPTOR):WINBOOL;external 'advapi32' name 'SetServiceObjectSecurity';
  990. function SetServiceStatus(hServiceStatus:SERVICE_STATUS_HANDLE; lpServiceStatus:LPSERVICE_STATUS):WINBOOL; external 'advapi32' name 'SetServiceStatus';
  991. function UnlockServiceDatabase(ScLock:SC_LOCK):WINBOOL; external 'advapi32' name 'UnlockServiceDatabase';
  992. function ChoosePixelFormat(DC:HDC; ppfd:PPIXELFORMATDESCRIPTOR):longint; external 'gdi32' name 'ChoosePixelFormat';
  993. function DescribePixelFormat(DC:HDC; iPixelFormat:longint; nBytes:UINT; ppfd:LPPIXELFORMATDESCRIPTOR):longint; external 'gdi32' name 'DescribePixelFormat';
  994. {$ifdef Unknown_functions}{ WARNING: function is not in my gdi32.dll !! PM}function GetEnhMetaFilePixelFormat(_para1:HENHMETAFILE; _para2:DWORD; var _para3:PIXELFORMATDESCRIPTOR):UINT; external 'gdi32' name 'GetEnhMetaFilePixelFormat';
  995. {$endif Unknown_functions}{ function GetPixelFormat(_para1:HDC):longint; external 'gdi32' name 'GetPixelFormat'; }
  996. function SetPixelFormat(DC:HDC; iPixelFormat:longint; ppfd:PPIXELFORMATDESCRIPTOR):WINBOOL; external 'gdi32' name 'SetPixelFormat';
  997. function SwapBuffers(DC:HDC):WINBOOL; external 'gdi32' name 'SwapBuffers';
  998. function DragQueryPoint(_para1:HDROP; _para2:LPPOINT):WINBOOL; external 'shell32' name 'DragQueryPoint';
  999. procedure DragFinish(_para1:HDROP); external 'shell32' name 'DragFinish';
  1000. procedure DragAcceptFiles(_para1:HWND; _para2:WINBOOL); external 'shell32' name 'DragAcceptFiles';
  1001. function DuplicateIcon(_para1:HINST; _para2:HICON):HICON; external 'shell32' name 'DuplicateIcon';
  1002. function DdeAbandonTransaction(_para1:DWORD; _para2:HCONV; _para3:DWORD):BOOL;external 'user32' name 'DdeAbandonTransaction';
  1003. function DdeAccessData(_para1:HDDEDATA; _para2:PDWORD):PBYTE;external 'user32' name 'DdeAccessData';
  1004. function DdeAddData(_para1:HDDEDATA; _para2:PBYTE; _para3:DWORD; _para4:DWORD):HDDEDATA;external 'user32' name 'DdeAddData';
  1005. { This is only a prototype PM
  1006. function DdeCallback(_para1, _para2:UINT; _para3:HCONV; _para4, _para5:HSZ;_para6: HDDEDATA; _para7, _para8:PDWORD):HDDEDATA;external 'user32' name 'DdeCallback';}
  1007. function DdeClientTransaction(_para1:PBYTE; _para2:DWORD; _para3:HCONV; _para4:HSZ; _para5:UINT;
  1008. _para6:UINT; _para7:DWORD; _para8:PDWORD):HDDEDATA;external 'user32' name 'DdeClientTransaction';
  1009. function DdeCmpStringHandles(_para1:HSZ; _para2:HSZ):longint; external 'user32' name 'DdeCmpStringHandles';
  1010. function DdeConnect(_para1:DWORD; _para2:HSZ; _para3:HSZ; _para4:PCONVCONTEXT):HCONV; external 'user32' name 'DdeConnect';
  1011. function DdeConnectList(_para1:DWORD; _para2:HSZ; _para3:HSZ; _para4:HCONVLIST; _para5:PCONVCONTEXT):HCONVLIST;external 'user32' name 'DdeConnectList';
  1012. function DdeCreateDataHandle(_para1:DWORD; _para2:LPBYTE; _para3:DWORD; _para4:DWORD; _para5:HSZ;_para6:UINT; _para7:UINT):HDDEDATA; external 'user32' name 'DdeCreateDataHandle';
  1013. function DdeDisconnect(_para1:HCONV):WINBOOL; external 'user32' name 'DdeDisconnect';
  1014. function DdeDisconnectList(_para1:HCONVLIST):BOOL;external 'user32' name 'DdeDisconnectList';
  1015. function DdeEnableCallback(_para1:DWORD; _para2:HCONV; _para3:UINT):BOOL;external 'user32' name 'DdeEnableCallback';
  1016. function DdeFreeDataHandle(_para1:HDDEDATA):WINBOOL; external 'user32' name 'DdeFreeDataHandle';
  1017. function DdeFreeStringHandle(_para1:DWORD;_para2:HSZ):WINBOOL; external 'user32' name 'DdeFreeStringHandle';
  1018. function DdeGetData(_para1:HDDEDATA;_para2:LPBYTE; _para3:DWORD; _para4:DWORD):DWORD; external 'user32' name 'DdeGetData';
  1019. function DdeGetLastError(_para1:DWORD):UINT; external 'user32' name 'DdeGetLastError';
  1020. function DdeImpersonateClient(_para1:HCONV):BOOL;external 'user32' name 'DdeImpersonateClient';
  1021. function DdeKeepStringHandle(_para1:DWORD; _para2:HSZ):BOOL;external 'user32' name 'DdeKeepStringHandle';
  1022. function DdeNameService(_para1:DWORD; _para2:HSZ; _para3:HSZ; _para4:UINT):HDDEDATA; external 'user32' name 'DdeNameService';
  1023. function DdePostAdvise(_para1:DWORD; _para2:HSZ; _para3:HSZ):WINBOOL; external 'user32' name 'DdePostAdvise';
  1024. function DdeQueryConvInfo(_para1:HCONV; _para2:DWORD; _para3:PCONVINFO):UINT;external 'user32' name 'DdeQueryConvInfo';
  1025. function DdeQueryNextServer(_para1:HCONVLIST; _para2:HCONV):HCONV;external 'user32' name 'DdeQueryNextServer';
  1026. function DdeReconnect(_para1:HCONV):HCONV; external 'user32' name 'DdeReconnect';
  1027. function DdeSetUserHandle(_para1:HCONV; _para2:DWORD; _para3:DWORD):BOOL;external 'user32' name 'DdeSetUserHandle';
  1028. function DdeUnaccessData(_para1:HDDEDATA):BOOL;external 'user32' name 'DdeUnaccessData';
  1029. function DdeUninitialize(_para1:DWORD):WINBOOL; external 'user32' name 'DdeUninitialize';
  1030. {$ifdef Unknown_functions}
  1031. function NetUserEnum(_para1:LPWSTR; _para2:DWORD; _para3:DWORD; var _para4:LPBYTE; _para5:DWORD;_para6:LPDWORD; _para7:LPDWORD; _para8:LPDWORD):DWORD; external 'netapi32' name 'NetUserEnum';
  1032. function NetApiBufferFree(_para1:LPVOID):DWORD; external 'netapi32' name 'NetApiBufferFree';
  1033. function NetUserGetInfo(_para1:LPWSTR; _para2:LPWSTR; _para3:DWORD; _para4:LPBYTE):DWORD; external 'netapi32' name 'NetUserGetInfo';
  1034. function NetGetDCName(_para1:LPWSTR; _para2:LPWSTR; var _para3:LPBYTE):DWORD; external 'netapi32' name 'NetGetDCName';
  1035. function NetGroupEnum(_para1:LPWSTR; _para2:DWORD; var _para3:LPBYTE; _para4:DWORD; _para5:LPDWORD;_para6:LPDWORD; _para7:LPDWORD):DWORD; external 'netapi32' name 'NetGroupEnum';
  1036. function NetLocalGroupEnum(_para1:LPWSTR; _para2:DWORD; var _para3:LPBYTE; _para4:DWORD; _para5:LPDWORD;_para6:LPDWORD; _para7:LPDWORD):DWORD; external 'netapi32' name 'NetLocalGroupEnum';
  1037. {$endif Unknown_functions}
  1038. procedure SHAddToRecentDocs(_para1:UINT; _para2:LPCVOID); external 'shell32' name 'SHAddToRecentDocs';
  1039. function SHBrowseForFolder(_para1:LPBROWSEINFO):LPITEMIDLIST; external 'shell32' name 'SHBrowseForFolder';
  1040. procedure SHChangeNotify(_para1:LONG; _para2:UINT; _para3:LPCVOID; _para4:LPCVOID); external 'shell32' name 'SHChangeNotify';
  1041. function SHFileOperation(_para1:LPSHFILEOPSTRUCT):longint; external 'shell32' name 'SHFileOperation';
  1042. procedure SHFreeNameMappings(_para1:HANDLE); external 'shell32' name 'SHFreeNameMappings';
  1043. function SHGetFileInfo(_para1:LPCTSTR; _para2:DWORD; var _para3:SHFILEINFO; _para4:UINT; _para5:UINT):DWORD_PTR; external 'shell32' name 'SHGetFileInfo';
  1044. function SHGetPathFromIDList(_para1:LPCITEMIDLIST; _para2:LPTSTR):WINBOOL; external 'shell32' name 'SHGetPathFromIDList';
  1045. function SHGetSpecialFolderLocation(_para1:HWND; _para2:longint; var _para3:LPITEMIDLIST):HRESULT; external 'shell32' name 'SHGetSpecialFolderLocation';
  1046. function FlashWindowEx(pfwi : PFLASHWINFO) : BOOL; stdcall; external 'user32' name 'FlashWindowEx';
  1047. function EnumTimeFormatsEx(TimeFormatsExEnum : TIMEFMT_ENUMPROCEX; LocaleName : LPCWSTR;Flags : DWORD;AppData : LPARAM) : BOOL; external 'kernel32' name 'EnumTimeFormatsEx';
  1048. { was missing, bug report 1808 PM }
  1049. {
  1050. function CommDlgExtendedError : DWORD; external 'comdlg32' name 'CommDlgExtendedError';
  1051. }
  1052. { wgl Windows OpenGL helper functions }
  1053. function wglUseFontBitmaps(DC:HDC; first:DWORD; count:DWORD; listbase:DWORD):WINBOOL; external 'opengl32' name 'wglUseFontBitmapsA';
  1054. function wglCreateContext(hdc:HDC):HGLRC; external 'opengl32' name 'wglCreateContext';
  1055. function wglCreateLayerContext(hdc:HDC; iLayerPlane:longint):HGLRC; external 'opengl32' name 'wglCreateLayerContext';
  1056. function wglCopyContext(glrcSrc:HGLRC; glrcDst:HGLRC; mask:UINT):WINBOOL; external 'opengl32' name 'wglCopyContext';
  1057. function wglDeleteContext(glrc:HGLRC):WINBOOL; external 'opengl32' name 'wglDeleteContext';
  1058. function wglGetCurrentContext:HGLRC; external 'opengl32' name 'wglGetCurrentContext';
  1059. function wglGetCurrentDC:HDC; external 'opengl32' name 'wglGetCurrentDC';
  1060. function wglMakeCurrent(DC:HDC; glrc:HGLRC):WINBOOL; external 'opengl32' name 'wglMakeCurrent';
  1061. function wglShareLists(glrc1:HGLRC; glrc2:HGLRC):WINBOOL; external 'opengl32' name 'wglShareLists';
  1062. function wglUseFontBitmapsW(DC:HDC; first:DWORD; count:DWORD; listbase:DWORD):WINBOOL; external 'opengl32' name 'wglUseFontBitmapsW';
  1063. { Delphi doesn't declare these, but we do: }
  1064. function wglUseFontOutlines(DC:HDC; first:DWORD; count:DWORD; listbase:DWORD; deviation:Single;
  1065. extrusion:Single; format:longint; lpgmf:LPGLYPHMETRICSFLOAT):WINBOOL; external 'opengl32' name 'wglUseFontOutlinesA';
  1066. function wglUseFontBitmapsA(DC:HDC; first:DWORD; count:DWORD; listbase:DWORD):WINBOOL; external 'opengl32' name 'wglUseFontBitmapsA';
  1067. function wglUseFontOutlinesA(DC:HDC; first:DWORD; count:DWORD; listbase:DWORD; deviation:Single;
  1068. extrusion:Single; format:longint; lpgmf:LPGLYPHMETRICSFLOAT):WINBOOL; external 'opengl32' name 'wglUseFontOutlinesA';
  1069. function wglDescribeLayerPlane(DC:HDC; iPixelFormat:longint; iLayerPane:longint; nBytes:UINT; plpd:LPLAYERPLANEDESCRIPTOR):WINBOOL; external 'opengl32' name 'wglDescribeLayerPlane';
  1070. function wglGetLayerPaletteEntries(DC:HDC; iLayerPlane:longint; iStart:longint; cEntries:longint; var cr:COLORREF):longint; external 'opengl32' name 'wglGetLayerPaletteEntries';
  1071. function wglGetProcAddress(ProcName:LPCSTR):PROC; external 'opengl32' name 'wglGetProcAddress';
  1072. function wglRealizeLayerPalette(DC:HDC; iLayerPlane: longint; bRealize:WINBOOL):WINBOOL; external 'opengl32' name 'wglRealizeLayerPalette';
  1073. function wglSetLayerPaletteEntries(DC:HDC; iLayerPlane:longint; iStart:longint; cEntries:longint; var cr:COLORREF):longint; external 'opengl32' name 'wglSetLayerPaletteEntries';
  1074. function wglSwapLayerBuffers(DC:HDC; fuPlanes:UINT):WINBOOL; external 'opengl32' name 'wglSwapLayerBuffers';
  1075. function wglUseFontOutlinesW(DC:HDC; first:DWORD; count:DWORD; listbase:DWORD; deviation:Single;
  1076. extrusion:Single; format:longint; lpgmf:LPGLYPHMETRICSFLOAT):WINBOOL; external 'opengl32' name 'wglUseFontOutlinesW';
  1077. { translated macros }
  1078. function Animate_Create(hWndP:HWND; id:HMENU;dwStyle:DWORD;hInstance:HINST):HWND;
  1079. function Animate_Open(hwnd : HWND;szName : LPTSTR) : LRESULT;
  1080. function Animate_Play(hwnd : HWND;from,_to : longint;rep : UINT) : LRESULT;
  1081. function Animate_Stop(hwnd : HWND) : LRESULT;
  1082. function Animate_Close(hwnd : HWND) : LRESULT;
  1083. function Animate_Seek(hwnd : HWND;frame : longint) : LRESULT;
  1084. function PropSheet_AddPage(hPropSheetDlg : HWND;hpage : HPROPSHEETPAGE) : LRESULT;
  1085. function PropSheet_Apply(hPropSheetDlg : HWND) : LRESULT;
  1086. function PropSheet_CancelToClose(hPropSheetDlg : HWND) : LRESULT;
  1087. function PropSheet_Changed(hPropSheetDlg,hwndPage : HWND) : LRESULT;
  1088. function PropSheet_GetCurrentPageHwnd(hDlg : HWND) : LRESULT;
  1089. function PropSheet_GetTabControl(hPropSheetDlg : HWND) : LRESULT;
  1090. function PropSheet_IsDialogMessage(hDlg : HWND;pMsg : longint) : LRESULT;
  1091. function PropSheet_PressButton(hPropSheetDlg : HWND;iButton : longint) : LRESULT;
  1092. function PropSheet_QuerySiblings(hPropSheetDlg : HWND;param1,param2 : longint) : LRESULT;
  1093. function PropSheet_RebootSystem(hPropSheetDlg : HWND) : LRESULT;
  1094. function PropSheet_RemovePage(hPropSheetDlg : HWND;hpage : HPROPSHEETPAGE; index : longint) : LRESULT;
  1095. function PropSheet_RestartWindows(hPropSheetDlg : HWND) : LRESULT;
  1096. function PropSheet_SetCurSel(hPropSheetDlg : HWND;hpage : HPROPSHEETPAGE; index : longint) : LRESULT;
  1097. function PropSheet_SetCurSelByID(hPropSheetDlg : HWND; id : longint) : LRESULT;
  1098. function PropSheet_SetFinishText(hPropSheetDlg:HWND;lpszText : LPTSTR) : LRESULT;
  1099. function PropSheet_SetTitle(hPropSheetDlg:HWND;dwStyle:DWORD;lpszText : LPCTSTR) : LRESULT;
  1100. function PropSheet_SetWizButtons(hPropSheetDlg:HWND;dwFlags : DWORD) : LRESULT;
  1101. function PropSheet_UnChanged(hPropSheetDlg:HWND;hwndPage : HWND) : LRESULT;
  1102. function Header_DeleteItem(hwndHD:HWND;index : longint) : WINBOOL;
  1103. function Header_GetItem(hwndHD:HWND;index:longint;var hdi : HD_ITEM) : WINBOOL;
  1104. function Header_GetItemCount(hwndHD : HWND) : longint;
  1105. function Header_InsertItem(hwndHD:HWND;index : longint;var hdi : HD_ITEM) : longint;
  1106. function Header_Layout(hwndHD:HWND;var layout : HD_LAYOUT) : WINBOOL;
  1107. function Header_SetItem(hwndHD:HWND;index : longint;var hdi : HD_ITEM) : WINBOOL;
  1108. function ListView_Arrange(hwndLV:HWND;code : UINT) : LRESULT;
  1109. function ListView_CreateDragImage(hwnd:HWND;i : longint;lpptUpLeft : LPPOINT) : LRESULT;
  1110. function ListView_DeleteAllItems(hwnd : HWND) : LRESULT;
  1111. function ListView_DeleteColumn(hwnd:HWND;iCol : longint) : LRESULT;
  1112. function ListView_DeleteItem(hwnd:HWND;iItem : longint) : LRESULT;
  1113. function ListView_EditLabel(hwndLV:HWND;i : longint) : LRESULT;
  1114. function ListView_EnsureVisible(hwndLV:HWND;i,fPartialOK : longint) : LRESULT;
  1115. function ListView_FindItem(hwnd:HWND;iStart : longint;var lvfi : LV_FINDINFO) : longint;
  1116. function ListView_GetBkColor(hwnd : HWND) : LRESULT;
  1117. function ListView_GetCallbackMask(hwnd : HWND) : LRESULT;
  1118. function ListView_GetColumn(hwnd:HWND;iCol : longint;var col : LV_COLUMN) : LRESULT;
  1119. function ListView_GetColumnWidth(hwnd:HWND;iCol : longint) : LRESULT;
  1120. function ListView_GetCountPerPage(hwndLV : HWND) : LRESULT;
  1121. function ListView_GetEditControl(hwndLV : HWND) : LRESULT;
  1122. function ListView_GetImageList(hwnd:HWND;iImageList : wINT) : LRESULT;
  1123. function ListView_GetISearchString(hwndLV:HWND;lpsz : LPTSTR) : LRESULT;
  1124. function ListView_GetItem(hwnd:HWND;var item : LV_ITEM) : LRESULT;
  1125. function ListView_GetItemCount(hwnd : HWND) : LRESULT;
  1126. function ListView_GetItemPosition(hwndLV:HWND;i : longint;var pt : POINT) : longint;
  1127. function ListView_GetItemSpacing(hwndLV:HWND;fSmall : longint) : LRESULT;
  1128. function ListView_GetItemState(hwndLV:HWND;i,mask : longint) : LRESULT;
  1129. function ListView_GetNextItem(hwnd:HWND; iStart, flags : longint) : LRESULT;
  1130. function ListView_GetOrigin(hwndLV:HWND;var pt : POINT) : LRESULT;
  1131. function ListView_GetSelectedCount(hwndLV : HWND) : LRESULT;
  1132. function ListView_GetStringWidth(hwndLV:HWND;psz : LPCTSTR) : LRESULT;
  1133. function ListView_GetTextBkColor(hwnd : HWND) : LRESULT;
  1134. function ListView_GetTextColor(hwnd : HWND) : LRESULT;
  1135. function ListView_GetTopIndex(hwndLV : HWND) : LRESULT;
  1136. function ListView_GetViewRect(hwnd:HWND;var rc : RECT) : LRESULT;
  1137. function ListView_HitTest(hwndLV:HWND;var info : LV_HITTESTINFO) : LRESULT;
  1138. function ListView_InsertColumn(hwnd:HWND;iCol : longint;var col : LV_COLUMN) : LRESULT;
  1139. function ListView_InsertItem(hwnd:HWND;var item : LV_ITEM) : LRESULT;
  1140. function ListView_RedrawItems(hwndLV:HWND;iFirst,iLast : longint) : LRESULT;
  1141. function ListView_Scroll(hwndLV:HWND;dx,dy : longint) : LRESULT;
  1142. function ListView_SetBkColor(hwnd:HWND;clrBk : COLORREF) : LRESULT;
  1143. function ListView_SetCallbackMask(hwnd:HWND;mask : UINT) : LRESULT;
  1144. function ListView_SetColumn(hwnd:HWND;iCol : longint; var col : LV_COLUMN) : LRESULT;
  1145. function ListView_SetColumnWidth(hwnd:HWND;iCol,cx : longint) : LRESULT;
  1146. function ListView_SetImageList(hwnd:HWND;himl : longint;iImageList : HIMAGELIST) : LRESULT;
  1147. function ListView_SetItem(hwnd:HWND;var item : LV_ITEM) : LRESULT;
  1148. function ListView_SetItemCount(hwndLV:HWND;cItems : longint) : LRESULT;
  1149. function ListView_SetItemPosition(hwndLV:HWND;i,x,y : longint) : LRESULT;
  1150. function ListView_SetItemPosition32(hwndLV:HWND;i,x,y : longint) : LRESULT;
  1151. function ListView_SetItemState(hwndLV:HWND; i, data, mask:longint) : LRESULT;
  1152. function ListView_SetItemText(hwndLV:HWND; i, iSubItem_:longint;pszText_ : LPTSTR) : LRESULT;
  1153. function ListView_SetTextBkColor(hwnd:HWND;clrTextBk : COLORREF) : LRESULT;
  1154. function ListView_SetTextColor(hwnd:HWND;clrText : COLORREF) : LRESULT;
  1155. function ListView_SortItems(hwndLV:HWND;_pfnCompare:PFNLVCOMPARE;_lPrm : LPARAM) : LRESULT;
  1156. function ListView_Update(hwndLV:HWND;i : longint) : LRESULT;
  1157. function TreeView_InsertItem(hwnd:HWND;lpis : LPTV_INSERTSTRUCT) : LRESULT;
  1158. function TreeView_DeleteItem(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1159. function TreeView_DeleteAllItems(hwnd : HWND) : LRESULT;
  1160. function TreeView_Expand(hwnd:HWND;hitem:HTREEITEM;code : longint) : LRESULT;
  1161. function TreeView_GetCount(hwnd : HWND) : LRESULT;
  1162. function TreeView_GetIndent(hwnd : HWND) : LRESULT;
  1163. function TreeView_SetIndent(hwnd:HWND;indent : longint) : LRESULT;
  1164. function TreeView_GetImageList(hwnd:HWND;iImage : WPARAM) : LRESULT;
  1165. function TreeView_SetImageList(hwnd:HWND;himl:HIMAGELIST;iImage : WPARAM) : LRESULT;
  1166. function TreeView_GetNextItem(hwnd:HWND;hitem:HTREEITEM;code : longint) : LRESULT;
  1167. function TreeView_GetChild(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1168. function TreeView_GetNextSibling(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1169. function TreeView_GetPrevSibling(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1170. function TreeView_GetParent(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1171. function TreeView_GetFirstVisible(hwnd : HWND) : LRESULT;
  1172. function TreeView_GetNextVisible(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1173. function TreeView_GetPrevVisible(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1174. function TreeView_GetSelection(hwnd : HWND) : LRESULT;
  1175. function TreeView_GetDropHilight(hwnd : HWND) : LRESULT;
  1176. function TreeView_GetRoot(hwnd : HWND) : LRESULT;
  1177. function TreeView_Select(hwnd:HWND;hitem:HTREEITEM;code : longint) : LRESULT;
  1178. function TreeView_SelectItem(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1179. function TreeView_SelectDropTarget(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1180. function TreeView_SelectSetFirstVisible(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1181. function TreeView_GetItem(hwnd:HWND;var item : TV_ITEM) : LRESULT;
  1182. function TreeView_SetItem(hwnd:HWND;var item : TV_ITEM) : LRESULT;
  1183. function TreeView_EditLabel(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1184. function TreeView_GetEditControl(hwnd : HWND) : LRESULT;
  1185. function TreeView_GetVisibleCount(hwnd : HWND) : LRESULT;
  1186. function TreeView_HitTest(hwnd:HWND;lpht : LPTV_HITTESTINFO) : LRESULT;
  1187. function TreeView_CreateDragImage(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1188. function TreeView_SortChildren(hwnd:HWND;hitem:HTREEITEM;recurse : longint) : LRESULT;
  1189. function TreeView_EnsureVisible(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1190. function TreeView_SortChildrenCB(hwnd:HWND;psort:LPTV_SORTCB;recurse : longint) : LRESULT;
  1191. function TreeView_EndEditLabelNow(hwnd:HWND;fCancel : longint) : LRESULT;
  1192. function TreeView_GetISearchString(hwndTV:HWND;lpsz : LPTSTR) : LRESULT;
  1193. function TabCtrl_GetImageList(hwnd : HWND) : LRESULT;
  1194. function TabCtrl_SetImageList(hwnd:HWND;himl : HIMAGELIST) : LRESULT;
  1195. function TabCtrl_GetItemCount(hwnd : HWND) : LRESULT;
  1196. function TabCtrl_GetItem(hwnd:HWND;iItem : longint;var item : TC_ITEM) : LRESULT;
  1197. function TabCtrl_SetItem(hwnd:HWND;iItem : longint;var item : TC_ITEM) : LRESULT;
  1198. function TabCtrl_InsertItem(hwnd:HWND;iItem : longint;var item : TC_ITEM) : LRESULT;
  1199. function TabCtrl_DeleteItem(hwnd:HWND;i : longint) : LRESULT;
  1200. function TabCtrl_DeleteAllItems(hwnd : HWND) : LRESULT;
  1201. function TabCtrl_GetItemRect(hwnd:HWND;i : longint;var rc : RECT) : LRESULT;
  1202. function TabCtrl_GetCurSel(hwnd : HWND) : LRESULT;
  1203. function TabCtrl_SetCurSel(hwnd:HWND;i : longint) : LRESULT;
  1204. function TabCtrl_HitTest(hwndTC:HWND;var info : TC_HITTESTINFO) : LRESULT;
  1205. function TabCtrl_SetItemExtra(hwndTC:HWND;cb : longint) : LRESULT;
  1206. function TabCtrl_AdjustRect(hwnd:HWND;bLarger:WINBOOL;var rc : RECT) : LRESULT;
  1207. function TabCtrl_SetItemSize(hwnd:HWND;x,y : longint) : LRESULT;
  1208. function TabCtrl_RemoveImage(hwnd:HWND;i : WPARAM) : LRESULT;
  1209. function TabCtrl_SetPadding(hwnd:HWND;cx,cy : longint) : LRESULT;
  1210. function TabCtrl_GetRowCount(hwnd : HWND) : LRESULT;
  1211. function TabCtrl_GetToolTips(hwnd : HWND) : LRESULT;
  1212. function TabCtrl_SetToolTips(hwnd:HWND;hwndTT : longint) : LRESULT;
  1213. function TabCtrl_GetCurFocus(hwnd : HWND) : LRESULT;
  1214. function TabCtrl_SetCurFocus(hwnd:HWND;i : longint) : LRESULT;
  1215. function SNDMSG(hWnd:HWND; Msg:UINT; wParam:WPARAM; lParam:LPARAM):LRESULT;
  1216. function CommDlg_OpenSave_GetSpecA(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1217. function CommDlg_OpenSave_GetSpecW(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1218. {$ifndef Unicode}
  1219. function CommDlg_OpenSave_GetSpec(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1220. {$else Unicode}
  1221. function CommDlg_OpenSave_GetSpec(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1222. {$endif Unicode}
  1223. function CommDlg_OpenSave_GetFilePathA(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1224. function CommDlg_OpenSave_GetFilePathW(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1225. {$ifndef Unicode}
  1226. function CommDlg_OpenSave_GetFilePath(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1227. {$else Unicode}
  1228. function CommDlg_OpenSave_GetFilePath(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1229. {$endif Unicode}
  1230. function CommDlg_OpenSave_GetFolderPathA(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1231. function CommDlg_OpenSave_GetFolderPathW(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1232. {$ifndef Unicode}
  1233. function CommDlg_OpenSave_GetFolderPath(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1234. {$else Unicode}
  1235. function CommDlg_OpenSave_GetFolderPath(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1236. {$endif Unicode}
  1237. function CommDlg_OpenSave_GetFolderIDList(_hdlg:HWND;_pidl:LPVOID;_cbmax : longint) : LRESULT;
  1238. function CommDlg_OpenSave_SetControlText(_hdlg:HWND;_id : longint;_text : LPSTR) : LRESULT;
  1239. function CommDlg_OpenSave_HideControl(_hdlg:HWND;_id : longint) : LRESULT;
  1240. function CommDlg_OpenSave_SetDefExt(_hdlg:HWND;_pszext : LPSTR) : LRESULT;
  1241. function GetNextWindow(hWnd:HWND; uCmd:UINT):HWND; external 'user32' name 'GetWindow';
  1242. function GlobalAllocPtr(flags,cb:DWord):Pointer;
  1243. function GlobalFreePtr(lp:Pointer):Pointer;
  1244. function GlobalUnlockPtr(lp:pointer):Pointer;
  1245. function GlobalLockPtr(lp:pointer):Pointer;
  1246. function GlobalReAllocPtr(lp:Pointer;cbNew,flags:DWord):Pointer;
  1247. function GlobalPtrHandle(lp:pointer):Pointer;
  1248. function SetLayeredWindowAttributes(HWND:hwnd;crKey :COLORREF;bAlpha : byte;dwFlags : DWORD):WINBOOL; external 'user32' name 'SetLayeredWindowAttributes';
  1249. function SignalObjectAndWait( hObjectToSignal:THANDLE; hObjectToWaitOn:THANDLE ;dwMilliseconds: DWORD ;bAlertable:BOOL):DWORD; external 'kernel32' name 'SignalObjectAndWait';
  1250. function CancelWaitableTimer(hTimer:THandle):BOOL; external 'kernel32' name 'CancelWaitableTimer';
  1251. function GetComboBoxInfo(hwndCombo:HWND;pcbi:PCOMBOBOXINFO):BOOL; external 'user32' name 'GetComboBoxInfo';
  1252. function GetAncestor(HWnd: HWND; Flag: UINT): HWND; StdCall; External 'user32';
  1253. // #if(WINVER >= 0x0500)
  1254. function GetMenuInfo(_hmenu:HMENU; lpcmi:LPMENUINFO):BOOL; external 'user32' name 'GetMenuInfo';
  1255. function SetMenuInfo(_hmenu:HMENU; lpcmi:LPCMENUINFO):BOOL; external 'user32' name 'SetMenuInfo';
  1256. function EndMenu:BOOL; external 'user32' name 'EndMenu';
  1257. //#endif /* WINVER >= 0x0500 */
  1258. function GetMenuBarInfo(_hwnd:HWND; idObject:longint; idItem:longint; pmbi:LPMENUBARINFO):BOOL; external 'user32' name 'GetMenuBarInfo';
  1259. function IMAGE_FIRST_SECTION(ntheader : PIMAGE_NT_HEADERS):PIMAGE_SECTION_HEADER;
  1260. function GET_RAWINPUT_CODE_WPARAM(wp: WPARAM): longint; inline;
  1261. function RAWINPUT_ALIGN(x: PtrUInt): PtrUInt; inline;
  1262. function NEXTRAWINPUTBLOCK(ptr: PRAWINPUT): PRAWINPUT; inline;
  1263. function RIDEV_EXMODE(mode: DWORD): DWORD; inline;
  1264. //#if (_WIN32_WINNT >= 0x0601)
  1265. function GET_DEVICE_CHANGE_WPARAM(wParam: WPARAM): WORD; inline;
  1266. //#elif (_WIN32_WINNT >= 0x0501)
  1267. function GET_DEVICE_CHANGE_LPARAM(lParam: LPARAM): WORD; inline;
  1268. //#endif /* (_WIN32_WINNT >= 0x0601) */
  1269. function CONSOLE_REAL_OUTPUT_HANDLE : HANDLE;
  1270. function CONSOLE_REAL_INPUT_HANDLE : HANDLE;
  1271. function GetConsoleScreenBufferInfoEx(hConsoleOutput:HANDLE; lpConsoleScreenBufferInfoEx:PCONSOLE_SCREEN_BUFFER_INFOEX):BOOL;stdcall;external 'kernel32' name 'GetConsoleScreenBufferInfoEx';
  1272. function SetConsoleScreenBufferInfoEx(hConsoleOutput:HANDLE; lpConsoleScreenBufferInfoEx:PCONSOLE_SCREEN_BUFFER_INFOEX):BOOL;stdcall;external 'kernel32' name 'SetConsoleScreenBufferInfoEx';
  1273. // function GetLargestConsoleWindowSize(hConsoleOutput:HANDLE):COORD;stdcall;external 'kernel32' name 'GetLargestConsoleWindowSize';
  1274. function GetCurrentConsoleFont(hConsoleOutput:HANDLE; bMaximumWindow:BOOL; lpConsoleCurrentFont:PCONSOLE_FONT_INFO):BOOL;stdcall;external 'kernel32' name 'GetCurrentConsoleFont';
  1275. function GetCurrentConsoleFontEx(hConsoleOutput:HANDLE; bMaximumWindow:BOOL; lpConsoleCurrentFontEx:PCONSOLE_FONT_INFOEX):BOOL;stdcall;external 'kernel32' name 'GetCurrentConsoleFontEx';
  1276. function SetCurrentConsoleFontEx(hConsoleOutput:HANDLE; bMaximumWindow:BOOL; lpConsoleCurrentFontEx:PCONSOLE_FONT_INFOEX):BOOL;stdcall;external 'kernel32' name 'SetCurrentConsoleFontEx';
  1277. function GetConsoleHistoryInfo(lpConsoleHistoryInfo:PCONSOLE_HISTORY_INFO):BOOL;stdcall;external 'kernel32' name 'GetConsoleHistoryInfo';
  1278. function SetConsoleHistoryInfo(lpConsoleHistoryInfo:PCONSOLE_HISTORY_INFO):BOOL;stdcall;external 'kernel32' name 'SetConsoleHistoryInfo';
  1279. function GetConsoleFontSize(hConsoleOutput:HANDLE; nFont:DWORD):COORD;stdcall;external 'kernel32' name 'GetConsoleFontSize';
  1280. function GetConsoleSelectionInfo(lpConsoleSelectionInfo:PCONSOLE_SELECTION_INFO):BOOL;stdcall;external 'kernel32' name 'GetConsoleSelectionInfo';
  1281. function AttachConsole(dwProcessId:DWORD):BOOL;stdcall;external 'kernel32' name 'AttachConsole';
  1282. function ATTACH_PARENT_PROCESS : DWORD;
  1283. function GetConsoleDisplayMode(lpModeFlags:LPDWORD):BOOL;stdcall;external 'kernel32' name 'GetConsoleDisplayMode';
  1284. function SetConsoleDisplayMode(hConsoleOutput:HANDLE; dwFlags:DWORD; lpNewScreenBufferDimensions:PCOORD):BOOL;stdcall;external 'kernel32' name 'SetConsoleDisplayMode';
  1285. function GetConsoleWindow:HWND;stdcall;external 'kernel32' name 'GetConsoleWindow';
  1286. function GetConsoleProcessList(lpdwProcessList:LPDWORD; dwProcessCount:DWORD):DWORD;stdcall;external 'kernel32' name 'GetConsoleProcessList';
  1287. {$endif read_interface}
  1288. {$ifdef read_implementation}
  1289. { Win32 API calling convention
  1290. pushes POINT struct passed by value directly
  1291. on stack instead of just pushing an address
  1292. to overcome this we use a internal function
  1293. that just pushes the two arguments.
  1294. Bug report 1807. PM
  1295. not necessary anymore FK
  1296. function Internal_MenuItemFromPoint(hWnd:HWND; hMenu:HMENU; ptScreenX, ptScreenY : LONG):longint; external 'user32' name 'MenuItemFromPoint';
  1297. function MenuItemFromPoint(hWnd:HWND; hMenu:HMENU; ptScreen:POINT):longint;
  1298. begin
  1299. MenuItemFromPoint:=Internal_MenuItemFromPoint(hWnd, hMenu, ptScreen.X, ptScreen.Y);
  1300. end;
  1301. function Internal_DragDetect(hwnd:HWND; ptX, ptY : LONG):WINBOOL; external 'user32' name 'DragDetect';
  1302. function DragDetect(hwnd:HWND; pt:POINT):WINBOOL;
  1303. begin
  1304. DragDetect:=Internal_DragDetect(hWnd, pt.X, pt.Y);
  1305. end;
  1306. function Internal_WindowFromPoint(PointX,PointY : LONG):HWND; external 'user32' name 'WindowFromPoint';
  1307. function WindowFromPoint(Point:POINT):HWND;
  1308. begin
  1309. WindowFromPoint:=Internal_WindowFromPoint(Point.X, Point.Y);
  1310. end;
  1311. function Internal_ChildWindowFromPoint(hWndParent:HWND; PointX,PointY : LONG):HWND; external 'user32' name 'ChildWindowFromPoint';
  1312. function ChildWindowFromPoint(hWndParent:HWND; Point:POINT):HWND;
  1313. begin
  1314. ChildWindowFromPoint:=Internal_ChildWindowFromPoint(hWndParent, Point.X, Point.Y);
  1315. end;
  1316. function Internal_PtInRect(var lprc:RECT; ptX,ptY : LONG):WINBOOL; external 'user32' name 'PtInRect';
  1317. function PtInRect(var lprc:RECT; pt:POINT):WINBOOL;
  1318. begin
  1319. PtInRect:=Internal_PtInRect(lprc,pt.X,pt.Y);
  1320. end;
  1321. function PtInRect(lprc:LPRECT; pt:POINT):WINBOOL;
  1322. begin
  1323. PtInRect:=Internal_PtInRect(lprc^,pt.X,pt.Y);
  1324. end;
  1325. function Internal_ChildWindowFromPointEx(_para1:HWND; _para2X,_Para2Y : LONG; _para3:UINT):HWND; external 'user32' name 'ChildWindowFromPointEx';
  1326. function ChildWindowFromPointEx(_para1:HWND; _para2:POINT; _para3:UINT):HWND;
  1327. begin
  1328. ChildWindowFromPointEx:=Internal_ChildWindowFromPointEx(_para1,_para2.X,_para2.Y,_para3);
  1329. end;
  1330. function Internal_LBItemFromPt(hLB:HWND; ptX, ptY : LONG; bAutoScroll:WINBOOL):longint; external 'comctl32' name 'LBItemFromPt';
  1331. function LBItemFromPt(hLB:HWND; pt:POINT; bAutoScroll:WINBOOL):longint;
  1332. begin
  1333. LBItemFromPt:=Internal_LBItemFromPt(hLB, pt.X, pt.Y, bAutoScroll);
  1334. end;
  1335. End of bug fixes for bug report 1807. PM }
  1336. function GlobalDiscard(hglbMem:HGLOBAL):HGLOBAL;
  1337. begin
  1338. GlobalDiscard:=GlobalReAlloc(hglbMem,0,GMEM_MOVEABLE);
  1339. end;
  1340. function LocalDiscard(hlocMem:HLOCAL):HLOCAL;
  1341. begin
  1342. LocalDiscard := LocalReAlloc(hlocMem,0,LMEM_MOVEABLE);
  1343. end;
  1344. procedure MoveMemory(Destination:PVOID; Source:pointer; Length:DWORD);
  1345. begin
  1346. Move(Source^,Destination^,Length);
  1347. end;
  1348. procedure CopyMemory(Destination:PVOID; Source:pointer; Length:DWORD);
  1349. begin
  1350. Move(Source^, Destination^, Length);
  1351. end;
  1352. procedure FillMemory(Destination:PVOID; Length:DWORD; Fill:BYTE);
  1353. begin
  1354. FillChar(Destination^,Length,Char(Fill));
  1355. end;
  1356. procedure ZeroMemory(Destination:PVOID; Length:DWORD);
  1357. begin
  1358. FillChar(Destination^,Length,#0);
  1359. end;
  1360. function GlobalAllocPtr(flags,cb:DWord):Pointer;
  1361. begin
  1362. GlobalAllocPtr:=GlobalLock(GlobalAlloc(flags,cb));
  1363. end;
  1364. function GlobalFreePtr(lp:Pointer):Pointer;
  1365. begin
  1366. GlobalFreePtr:=Pointer(GlobalFree(HWND(GlobalUnlockPtr(lp))));
  1367. end;
  1368. function GlobalUnlockPtr(lp:pointer):Pointer;
  1369. begin
  1370. GlobalUnlock(GlobalHandle(lp));
  1371. GlobalUnlockPtr:=lp;
  1372. end;
  1373. function GlobalLockPtr(lp:pointer):Pointer;
  1374. begin
  1375. GlobalLockPtr:=GlobalLock(GlobalHandle(lp));
  1376. end;
  1377. function GlobalReAllocPtr(lp:Pointer;cbNew,flags:DWord):Pointer;
  1378. begin
  1379. GlobalReAllocPtr:=GlobalLock(GlobalReAlloc(HWND(GlobalUnlockPtr(lp)),cbNew,flags));
  1380. end;
  1381. function GlobalPtrHandle(lp:pointer):Pointer;
  1382. begin
  1383. GlobalPtrHandle:=Pointer(GlobalHandle(lp));
  1384. end;
  1385. {
  1386. function ImageList_AddIcon(himl:HIMAGELIST; hicon:HICON):longint;
  1387. begin
  1388. ImageList_AddIcon:=ImageList_ReplaceIcon(himl,-(1),hicon);
  1389. end;
  1390. }
  1391. function Animate_Create(hWndP:HWND; id:HMENU;dwStyle:DWORD;hInstance:HINST):HWND;
  1392. begin
  1393. Animate_Create:=CreateWindow(LPCTSTR(ANIMATE_CLASS),nil,dwStyle,0,0,0,0,hwndP,id,hInstance,nil);
  1394. end;
  1395. function Animate_Open(hwnd : HWND;szName : LPTSTR) : LRESULT;
  1396. begin
  1397. Animate_Open:=SendMessage(hwnd,ACM_OPEN,0,LPARAM(szName));
  1398. end;
  1399. function Animate_Play(hwnd : HWND;from,_to : longint;rep : UINT) : LRESULT;
  1400. begin
  1401. Animate_Play:=SendMessage(hwnd,ACM_PLAY,WPARAM(rep),LPARAM(MAKELONG(from,_to)));
  1402. end;
  1403. function Animate_Stop(hwnd : HWND) : LRESULT;
  1404. begin
  1405. Animate_Stop:=SendMessage(hwnd,ACM_STOP,0,0);
  1406. end;
  1407. function Animate_Close(hwnd : HWND) : LRESULT;
  1408. begin
  1409. Animate_Close:=Animate_Open(hwnd,nil);
  1410. end;
  1411. function Animate_Seek(hwnd : HWND;frame : longint) : LRESULT;
  1412. begin
  1413. Animate_Seek:=Animate_Play(hwnd,frame,frame,1);
  1414. end;
  1415. function PropSheet_AddPage(hPropSheetDlg : HWND;hpage : HPROPSHEETPAGE) : LRESULT;
  1416. begin
  1417. PropSheet_AddPage:=SendMessage(hPropSheetDlg,PSM_ADDPAGE,0,LPARAM(hpage));
  1418. end;
  1419. function PropSheet_Apply(hPropSheetDlg : HWND) : LRESULT;
  1420. begin
  1421. PropSheet_Apply:=SendMessage(hPropSheetDlg,PSM_APPLY,0,0);
  1422. end;
  1423. function PropSheet_CancelToClose(hPropSheetDlg : HWND) : LRESULT;
  1424. begin
  1425. PropSheet_CancelToClose:=SendMessage(hPropSheetDlg,PSM_CANCELTOCLOSE,0,0);
  1426. end;
  1427. function PropSheet_Changed(hPropSheetDlg,hwndPage : HWND) : LRESULT;
  1428. begin
  1429. PropSheet_Changed:=SendMessage(hPropSheetDlg,PSM_CHANGED,WPARAM(hwndPage),0);
  1430. end;
  1431. function PropSheet_GetCurrentPageHwnd(hDlg : HWND) : LRESULT;
  1432. begin
  1433. PropSheet_GetCurrentPageHwnd:=SendMessage(hDlg,PSM_GETCURRENTPAGEHWND,0,0);
  1434. end;
  1435. function PropSheet_GetTabControl(hPropSheetDlg : HWND) : LRESULT;
  1436. begin
  1437. PropSheet_GetTabControl:=SendMessage(hPropSheetDlg,PSM_GETTABCONTROL,0,0);
  1438. end;
  1439. function PropSheet_IsDialogMessage(hDlg : HWND;pMsg : longint) : LRESULT;
  1440. begin
  1441. PropSheet_IsDialogMessage:=SendMessage(hDlg,PSM_ISDIALOGMESSAGE,0,LPARAM(pMsg));
  1442. end;
  1443. function PropSheet_PressButton(hPropSheetDlg : HWND;iButton : longint) : LRESULT;
  1444. begin
  1445. PropSheet_PressButton:=SendMessage(hPropSheetDlg,PSM_PRESSBUTTON,WPARAM(longint(iButton)),0);
  1446. end;
  1447. function PropSheet_QuerySiblings(hPropSheetDlg : HWND;param1,param2 : longint) : LRESULT;
  1448. begin
  1449. PropSheet_QuerySiblings:=SendMessage(hPropSheetDlg,PSM_QUERYSIBLINGS,WPARAM(param1),LPARAM(param2));
  1450. end;
  1451. function PropSheet_RebootSystem(hPropSheetDlg : HWND) : LRESULT;
  1452. begin
  1453. PropSheet_RebootSystem:=SendMessage(hPropSheetDlg,PSM_REBOOTSYSTEM,0,0);
  1454. end;
  1455. function PropSheet_RemovePage(hPropSheetDlg : HWND;hpage : HPROPSHEETPAGE; index : longint) : LRESULT;
  1456. begin
  1457. PropSheet_RemovePage:=SendMessage(hPropSheetDlg,PSM_REMOVEPAGE,WPARAM(index),LPARAM(hpage));
  1458. end;
  1459. function PropSheet_RestartWindows(hPropSheetDlg : HWND) : LRESULT;
  1460. begin
  1461. PropSheet_RestartWindows:=SendMessage(hPropSheetDlg,PSM_RESTARTWINDOWS,0,0);
  1462. end;
  1463. function PropSheet_SetCurSel(hPropSheetDlg : HWND;hpage : HPROPSHEETPAGE; index : longint) : LRESULT;
  1464. begin
  1465. PropSheet_SetCurSel:=SendMessage(hPropSheetDlg,PSM_SETCURSEL,WPARAM(index),LPARAM(hpage));
  1466. end;
  1467. function PropSheet_SetCurSelByID(hPropSheetDlg : HWND; id : longint) : LRESULT;
  1468. begin
  1469. PropSheet_SetCurSelByID:=SendMessage(hPropSheetDlg,PSM_SETCURSELID,0,LPARAM(id));
  1470. end;
  1471. function PropSheet_SetFinishText(hPropSheetDlg:HWND;lpszText : LPTSTR) : LRESULT;
  1472. begin
  1473. PropSheet_SetFinishText:=SendMessage(hPropSheetDlg,PSM_SETFINISHTEXT,0,LPARAM(lpszText));
  1474. end;
  1475. function PropSheet_SetTitle(hPropSheetDlg:HWND;dwStyle:DWORD;lpszText : LPCTSTR) : LRESULT;
  1476. begin
  1477. PropSheet_SetTitle:=SendMessage(hPropSheetDlg,PSM_SETTITLE,WPARAM(dwStyle),LPARAM(lpszText));
  1478. end;
  1479. function PropSheet_SetWizButtons(hPropSheetDlg:HWND;dwFlags : DWORD) : LRESULT;
  1480. begin
  1481. PropSheet_SetWizButtons:=SendMessage(hPropSheetDlg,PSM_SETWIZBUTTONS,0,LPARAM(dwFlags));
  1482. end;
  1483. function PropSheet_UnChanged(hPropSheetDlg:HWND;hwndPage : HWND) : LRESULT;
  1484. begin
  1485. PropSheet_UnChanged:=SendMessage(hPropSheetDlg,PSM_UNCHANGED,WPARAM(hwndPage),0);
  1486. end;
  1487. function Header_DeleteItem(hwndHD:HWND;index : longint) : WINBOOL;
  1488. begin
  1489. Header_DeleteItem:=WINBOOL(SendMessage(hwndHD,HDM_DELETEITEM,WPARAM(index),0));
  1490. end;
  1491. function Header_GetItem(hwndHD:HWND;index:longint;var hdi : HD_ITEM) : WINBOOL;
  1492. begin
  1493. Header_GetItem:=WINBOOL(SendMessage(hwndHD,HDM_GETITEM,WPARAM(index),LPARAM(@hdi)));
  1494. end;
  1495. function Header_GetItemCount(hwndHD : HWND) : longint;
  1496. begin
  1497. Header_GetItemCount:=longint(SendMessage(hwndHD,HDM_GETITEMCOUNT,0,0));
  1498. end;
  1499. function Header_InsertItem(hwndHD:HWND;index : longint;var hdi : HD_ITEM) : longint;
  1500. begin
  1501. Header_InsertItem:=longint(SendMessage(hwndHD,HDM_INSERTITEM,WPARAM(index),LPARAM(@hdi)));
  1502. end;
  1503. function Header_Layout(hwndHD:HWND;var layout : HD_LAYOUT) : WINBOOL;
  1504. begin
  1505. Header_Layout:=WINBOOL(SendMessage(hwndHD,HDM_LAYOUT,0,LPARAM(@layout)));
  1506. end;
  1507. function Header_SetItem(hwndHD:HWND;index : longint;var hdi : HD_ITEM) : WINBOOL;
  1508. begin
  1509. Header_SetItem:=WINBOOL(SendMessage(hwndHD,HDM_SETITEM,WPARAM(index),LPARAM(@hdi)));
  1510. end;
  1511. function ListView_Arrange(hwndLV:HWND;code : UINT) : LRESULT;
  1512. begin
  1513. ListView_Arrange:=SendMessage(hwndLV,LVM_ARRANGE,WPARAM(UINT(code)),0);
  1514. end;
  1515. function ListView_CreateDragImage(hwnd:HWND;i : longint;lpptUpLeft : LPPOINT) : LRESULT;
  1516. begin
  1517. ListView_CreateDragImage:=SendMessage(hwnd,LVM_CREATEDRAGIMAGE,WPARAM(i),LPARAM(lpptUpLeft));
  1518. end;
  1519. function ListView_DeleteAllItems(hwnd : HWND) : LRESULT;
  1520. begin
  1521. ListView_DeleteAllItems:=SendMessage(hwnd,LVM_DELETEALLITEMS,0,0);
  1522. end;
  1523. function ListView_DeleteColumn(hwnd:HWND;iCol : longint) : LRESULT;
  1524. begin
  1525. ListView_DeleteColumn:=SendMessage(hwnd,LVM_DELETECOLUMN,WPARAM(iCol),0);
  1526. end;
  1527. function ListView_DeleteItem(hwnd:HWND;iItem : longint) : LRESULT;
  1528. begin
  1529. ListView_DeleteItem:=SendMessage(hwnd,LVM_DELETEITEM,WPARAM(iItem),0);
  1530. end;
  1531. function ListView_EditLabel(hwndLV:HWND;i : longint) : LRESULT;
  1532. begin
  1533. ListView_EditLabel:=SendMessage(hwndLV,LVM_EDITLABEL,WPARAM(longint(i)),0);
  1534. end;
  1535. function ListView_EnsureVisible(hwndLV:HWND;i,fPartialOK : longint) : LRESULT;
  1536. begin
  1537. ListView_EnsureVisible:=SendMessage(hwndLV,LVM_ENSUREVISIBLE,WPARAM(i),MAKELPARAM(fPartialOK,0));
  1538. end;
  1539. function ListView_FindItem(hwnd:HWND;iStart : longint;var lvfi : LV_FINDINFO) : longint;
  1540. begin
  1541. ListView_FindItem:=SendMessage(hwnd,LVM_FINDITEM,WPARAM(iStart),LPARAM(@lvfi));
  1542. end;
  1543. function ListView_GetBkColor(hwnd : HWND) : LRESULT;
  1544. begin
  1545. ListView_GetBkColor:=SendMessage(hwnd,LVM_GETBKCOLOR,0,0);
  1546. end;
  1547. function ListView_GetCallbackMask(hwnd : HWND) : LRESULT;
  1548. begin
  1549. ListView_GetCallbackMask:=SendMessage(hwnd,LVM_GETCALLBACKMASK,0,0);
  1550. end;
  1551. function ListView_GetColumn(hwnd:HWND;iCol : longint;var col : LV_COLUMN) : LRESULT;
  1552. begin
  1553. ListView_GetColumn:=SendMessage(hwnd,LVM_GETCOLUMN,WPARAM(iCol),LPARAM(@col));
  1554. end;
  1555. function ListView_GetColumnWidth(hwnd:HWND;iCol : longint) : LRESULT;
  1556. begin
  1557. ListView_GetColumnWidth:=SendMessage(hwnd,LVM_GETCOLUMNWIDTH,WPARAM(iCol),0);
  1558. end;
  1559. function ListView_GetCountPerPage(hwndLV : HWND) : LRESULT;
  1560. begin
  1561. ListView_GetCountPerPage:=SendMessage(hwndLV,LVM_GETCOUNTPERPAGE,0,0);
  1562. end;
  1563. function ListView_GetEditControl(hwndLV : HWND) : LRESULT;
  1564. begin
  1565. ListView_GetEditControl:=SendMessage(hwndLV,LVM_GETEDITCONTROL,0,0);
  1566. end;
  1567. function ListView_GetImageList(hwnd:HWND;iImageList : wINT) : LRESULT;
  1568. begin
  1569. ListView_GetImageList:=SendMessage(hwnd,LVM_GETIMAGELIST,WPARAM(iImageList),0);
  1570. end;
  1571. function ListView_GetISearchString(hwndLV:HWND;lpsz : LPTSTR) : LRESULT;
  1572. begin
  1573. ListView_GetISearchString:=SendMessage(hwndLV,LVM_GETISEARCHSTRING,0,LPARAM(lpsz));
  1574. end;
  1575. function ListView_GetItem(hwnd:HWND;var item : LV_ITEM) : LRESULT;
  1576. begin
  1577. ListView_GetItem:=SendMessage(hwnd,LVM_GETITEM,0,LPARAM(@item));
  1578. end;
  1579. function ListView_GetItemCount(hwnd : HWND) : LRESULT;
  1580. begin
  1581. ListView_GetItemCount:=SendMessage(hwnd,LVM_GETITEMCOUNT,0,0);
  1582. end;
  1583. function ListView_GetItemPosition(hwndLV:HWND;i : longint;var pt : POINT) : longint;
  1584. begin
  1585. ListView_GetItemPosition:=SendMessage(hwndLV,LVM_GETITEMPOSITION,WPARAM(longint(i)),LPARAM(@pt));
  1586. end;
  1587. function ListView_GetItemSpacing(hwndLV:HWND;fSmall : longint) : LRESULT;
  1588. begin
  1589. ListView_GetItemSpacing:=SendMessage(hwndLV,LVM_GETITEMSPACING,fSmall,0);
  1590. end;
  1591. function ListView_GetItemState(hwndLV:HWND;i,mask : longint) : LRESULT;
  1592. begin
  1593. ListView_GetItemState:=SendMessage(hwndLV,LVM_GETITEMSTATE,WPARAM(i),LPARAM(mask));
  1594. end;
  1595. function ListView_GetNextItem(hwnd:HWND; iStart, flags : longint) : LRESULT;
  1596. begin
  1597. ListView_GetNextItem:=SendMessage(hwnd, LVM_GETNEXTITEM, WPARAM(iStart), LPARAM(flags));
  1598. end;
  1599. function ListView_GetOrigin(hwndLV:HWND;var pt : POINT) : LRESULT;
  1600. begin
  1601. ListView_GetOrigin:=SendMessage(hwndLV,LVM_GETORIGIN,WPARAM(0),LPARAM(@pt));
  1602. end;
  1603. function ListView_GetSelectedCount(hwndLV : HWND) : LRESULT;
  1604. begin
  1605. ListView_GetSelectedCount:=SendMessage(hwndLV,LVM_GETSELECTEDCOUNT,0,0);
  1606. end;
  1607. function ListView_GetStringWidth(hwndLV:HWND;psz : LPCTSTR) : LRESULT;
  1608. begin
  1609. ListView_GetStringWidth:=SendMessage(hwndLV,LVM_GETSTRINGWIDTH,0,LPARAM(psz));
  1610. end;
  1611. function ListView_GetTextBkColor(hwnd : HWND) : LRESULT;
  1612. begin
  1613. ListView_GetTextBkColor:=SendMessage(hwnd,LVM_GETTEXTBKCOLOR,0,0);
  1614. end;
  1615. function ListView_GetTextColor(hwnd : HWND) : LRESULT;
  1616. begin
  1617. ListView_GetTextColor:=SendMessage(hwnd,LVM_GETTEXTCOLOR,0,0);
  1618. end;
  1619. function ListView_GetTopIndex(hwndLV : HWND) : LRESULT;
  1620. begin
  1621. ListView_GetTopIndex:=SendMessage(hwndLV,LVM_GETTOPINDEX,0,0);
  1622. end;
  1623. function ListView_GetViewRect(hwnd:HWND;var rc : RECT) : LRESULT;
  1624. begin
  1625. ListView_GetViewRect:=SendMessage(hwnd,LVM_GETVIEWRECT,0,LPARAM(@rc));
  1626. end;
  1627. function ListView_HitTest(hwndLV:HWND;var info : LV_HITTESTINFO) : LRESULT;
  1628. begin
  1629. ListView_HitTest:=SendMessage(hwndLV,LVM_HITTEST,0,LPARAM(@info));
  1630. end;
  1631. function ListView_InsertColumn(hwnd:HWND;iCol : longint;var col : LV_COLUMN) : LRESULT;
  1632. begin
  1633. ListView_InsertColumn:=SendMessage(hwnd,LVM_INSERTCOLUMN,WPARAM(iCol),LPARAM(@col));
  1634. end;
  1635. function ListView_InsertItem(hwnd:HWND;var item : LV_ITEM) : LRESULT;
  1636. begin
  1637. ListView_InsertItem:=SendMessage(hwnd,LVM_INSERTITEM,0,LPARAM(@item));
  1638. end;
  1639. function ListView_RedrawItems(hwndLV:HWND;iFirst,iLast : longint) : LRESULT;
  1640. begin
  1641. ListView_RedrawItems:=SendMessage(hwndLV,LVM_REDRAWITEMS,WPARAM(iFirst),LPARAM(iLast));
  1642. end;
  1643. function ListView_Scroll(hwndLV:HWND;dx,dy : longint) : LRESULT;
  1644. begin
  1645. ListView_Scroll:=SendMessage(hwndLV,LVM_SCROLL,WPARAM(dx),LPARAM(dy));
  1646. end;
  1647. function ListView_SetBkColor(hwnd:HWND;clrBk : COLORREF) : LRESULT;
  1648. begin
  1649. ListView_SetBkColor:=SendMessage(hwnd,LVM_SETBKCOLOR,0,LPARAM(clrBk));
  1650. end;
  1651. function ListView_SetCallbackMask(hwnd:HWND;mask : UINT) : LRESULT;
  1652. begin
  1653. ListView_SetCallbackMask:=SendMessage(hwnd,LVM_SETCALLBACKMASK,WPARAM(mask),0);
  1654. end;
  1655. function ListView_SetColumn(hwnd:HWND;iCol : longint; var col : LV_COLUMN) : LRESULT;
  1656. begin
  1657. ListView_SetColumn:=SendMessage(hwnd,LVM_SETCOLUMN,WPARAM(iCol),LPARAM(@col));
  1658. end;
  1659. function ListView_SetColumnWidth(hwnd:HWND;iCol,cx : longint) : LRESULT;
  1660. begin
  1661. ListView_SetColumnWidth:=SendMessage(hwnd,LVM_SETCOLUMNWIDTH,WPARAM(iCol),MAKELPARAM(cx,0));
  1662. end;
  1663. function ListView_SetImageList(hwnd:HWND;himl : longint;iImageList : HIMAGELIST) : LRESULT;
  1664. begin
  1665. ListView_SetImageList:=SendMessage(hwnd,LVM_SETIMAGELIST,WPARAM(iImageList),LPARAM(UINT(himl)));
  1666. end;
  1667. function ListView_SetItem(hwnd:HWND;var item : LV_ITEM) : LRESULT;
  1668. begin
  1669. ListView_SetItem:=SendMessage(hwnd,LVM_SETITEM,0,LPARAM(@item));
  1670. end;
  1671. function ListView_SetItemCount(hwndLV:HWND;cItems : longint) : LRESULT;
  1672. begin
  1673. ListView_SetItemCount:=SendMessage(hwndLV,LVM_SETITEMCOUNT,WPARAM(cItems),0);
  1674. end;
  1675. function ListView_SetItemPosition(hwndLV:HWND;i,x,y : longint) : LRESULT;
  1676. begin
  1677. ListView_SetItemPosition:=SendMessage(hwndLV,LVM_SETITEMPOSITION,WPARAM(i),MAKELPARAM(x,y));
  1678. end;
  1679. function ListView_SetItemPosition32(hwndLV:HWND;i,x,y : longint) : LRESULT;
  1680. var
  1681. ptNewPos : POINT;
  1682. begin
  1683. ptNewPos.x:=x;
  1684. ptNewPos.y:=y;
  1685. ListView_SetItemPosition32:=SendMessage(hwndLV, LVM_SETITEMPOSITION32, WPARAM(i),LPARAM(@ptNewPos));
  1686. end;
  1687. function ListView_SetItemState(hwndLV:HWND; i, data, mask:longint) : LRESULT;
  1688. var
  1689. _gnu_lvi : LV_ITEM;
  1690. begin
  1691. _gnu_lvi.stateMask:=mask;
  1692. _gnu_lvi.state:=data;
  1693. ListView_SetItemState:=SendMessage(hwndLV, LVM_SETITEMSTATE, WPARAM(i),LPARAM(@_gnu_lvi));
  1694. end;
  1695. function ListView_SetItemText(hwndLV:HWND; i, iSubItem_:longint;pszText_ : LPTSTR) : LRESULT;
  1696. var
  1697. _gnu_lvi : LV_ITEM;
  1698. begin
  1699. _gnu_lvi.iSubItem:=iSubItem_;
  1700. _gnu_lvi.pszText:=pszText_;
  1701. ListView_SetItemText:=SendMessage(hwndLV, LVM_SETITEMTEXT, WPARAM(i),LPARAM(@_gnu_lvi));
  1702. end;
  1703. function ListView_SetTextBkColor(hwnd:HWND;clrTextBk : COLORREF) : LRESULT;
  1704. begin
  1705. ListView_SetTextBkColor:=SendMessage(hwnd,LVM_SETTEXTBKCOLOR,0,LPARAM(clrTextBk));
  1706. end;
  1707. function ListView_SetTextColor(hwnd:HWND;clrText : COLORREF) : LRESULT;
  1708. begin
  1709. ListView_SetTextColor:=SendMessage(hwnd,LVM_SETTEXTCOLOR,0,LPARAM(clrText));
  1710. end;
  1711. function ListView_SortItems(hwndLV:HWND;_pfnCompare:PFNLVCOMPARE;_lPrm : LPARAM) : LRESULT;
  1712. begin
  1713. ListView_SortItems:=SendMessage(hwndLV,LVM_SORTITEMS,WPARAM(_lPrm),LPARAM(_pfnCompare));
  1714. end;
  1715. function ListView_Update(hwndLV:HWND;i : longint) : LRESULT;
  1716. begin
  1717. ListView_Update:=SendMessage(hwndLV,LVM_UPDATE,WPARAM(i),0);
  1718. end;
  1719. function TreeView_InsertItem(hwnd:HWND;lpis : LPTV_INSERTSTRUCT) : LRESULT;
  1720. begin
  1721. TreeView_InsertItem:=SendMessage(hwnd,TVM_INSERTITEM,0,LPARAM(lpis));
  1722. end;
  1723. function TreeView_DeleteItem(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1724. begin
  1725. TreeView_DeleteItem:=SendMessage(hwnd,TVM_DELETEITEM,0,LPARAM(hitem));
  1726. end;
  1727. function TreeView_DeleteAllItems(hwnd : HWND) : LRESULT;
  1728. begin
  1729. TreeView_DeleteAllItems:=SendMessage(hwnd,TVM_DELETEITEM,0,LPARAM(TVI_ROOT));
  1730. end;
  1731. function TreeView_Expand(hwnd:HWND;hitem:HTREEITEM;code : longint) : LRESULT;
  1732. begin
  1733. TreeView_Expand:=SendMessage(hwnd,TVM_EXPAND,WPARAM(code),LPARAM(hitem));
  1734. end;
  1735. function TreeView_GetCount(hwnd : HWND) : LRESULT;
  1736. begin
  1737. TreeView_GetCount:=SendMessage(hwnd,TVM_GETCOUNT,0,0);
  1738. end;
  1739. function TreeView_GetIndent(hwnd : HWND) : LRESULT;
  1740. begin
  1741. TreeView_GetIndent:=SendMessage(hwnd,TVM_GETINDENT,0,0);
  1742. end;
  1743. function TreeView_SetIndent(hwnd:HWND;indent : longint) : LRESULT;
  1744. begin
  1745. TreeView_SetIndent:=SendMessage(hwnd,TVM_SETINDENT,WPARAM(indent),0);
  1746. end;
  1747. function TreeView_GetImageList(hwnd:HWND;iImage : WPARAM) : LRESULT;
  1748. begin
  1749. TreeView_GetImageList:=SendMessage(hwnd,TVM_GETIMAGELIST,iImage,0);
  1750. end;
  1751. function TreeView_SetImageList(hwnd:HWND;himl:HIMAGELIST;iImage : WPARAM) : LRESULT;
  1752. begin
  1753. TreeView_SetImageList:=SendMessage(hwnd,TVM_SETIMAGELIST,iImage,LPARAM(UINT(himl)));
  1754. end;
  1755. function TreeView_GetNextItem(hwnd:HWND;hitem:HTREEITEM;code : longint) : LRESULT;
  1756. begin
  1757. TreeView_GetNextItem:=SendMessage(hwnd,TVM_GETNEXTITEM,WPARAM(code),LPARAM(hitem));
  1758. end;
  1759. function TreeView_GetChild(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1760. begin
  1761. TreeView_GetChild:=TreeView_GetNextItem(hwnd,hitem,TVGN_CHILD);
  1762. end;
  1763. function TreeView_GetNextSibling(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1764. begin
  1765. TreeView_GetNextSibling:=TreeView_GetNextItem(hwnd,hitem,TVGN_NEXT);
  1766. end;
  1767. function TreeView_GetPrevSibling(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1768. begin
  1769. TreeView_GetPrevSibling:=TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUS);
  1770. end;
  1771. function TreeView_GetParent(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1772. begin
  1773. TreeView_GetParent:=TreeView_GetNextItem(hwnd,hitem,TVGN_PARENT);
  1774. end;
  1775. function TreeView_GetFirstVisible(hwnd : HWND) : LRESULT;
  1776. begin
  1777. TreeView_GetFirstVisible:=TreeView_GetNextItem(hwnd,HTREEITEM(nil),TVGN_FIRSTVISIBLE);
  1778. end;
  1779. function TreeView_GetNextVisible(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1780. begin
  1781. TreeView_GetNextVisible:=TreeView_GetNextItem(hwnd,hitem,TVGN_NEXTVISIBLE);
  1782. end;
  1783. function TreeView_GetPrevVisible(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1784. begin
  1785. TreeView_GetPrevVisible:=TreeView_GetNextItem(hwnd,hitem,TVGN_PREVIOUSVISIBLE);
  1786. end;
  1787. function TreeView_GetSelection(hwnd : HWND) : LRESULT;
  1788. begin
  1789. TreeView_GetSelection:=TreeView_GetNextItem(hwnd,HTREEITEM(nil),TVGN_CARET);
  1790. end;
  1791. function TreeView_GetDropHilight(hwnd : HWND) : LRESULT;
  1792. begin
  1793. TreeView_GetDropHilight:=TreeView_GetNextItem(hwnd,HTREEITEM(nil),TVGN_DROPHILITE);
  1794. end;
  1795. function TreeView_GetRoot(hwnd : HWND) : LRESULT;
  1796. begin
  1797. TreeView_GetRoot:=TreeView_GetNextItem(hwnd,HTREEITEM(nil),TVGN_ROOT);
  1798. end;
  1799. function TreeView_Select(hwnd:HWND;hitem:HTREEITEM;code : longint) : LRESULT;
  1800. begin
  1801. TreeView_Select:=SendMessage(hwnd,TVM_SELECTITEM,WPARAM(code),LPARAM(hitem));
  1802. end;
  1803. function TreeView_SelectItem(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1804. begin
  1805. TreeView_SelectItem:=TreeView_Select(hwnd,hitem,TVGN_CARET);
  1806. end;
  1807. function TreeView_SelectDropTarget(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1808. begin
  1809. TreeView_SelectDropTarget:=TreeView_Select(hwnd,hitem,TVGN_DROPHILITE);
  1810. end;
  1811. function TreeView_SelectSetFirstVisible(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1812. begin
  1813. TreeView_SelectSetFirstVisible:=TreeView_Select(hwnd,hitem,TVGN_FIRSTVISIBLE);
  1814. end;
  1815. function TreeView_GetItem(hwnd:HWND;var item : TV_ITEM) : LRESULT;
  1816. begin
  1817. TreeView_GetItem:=SendMessage(hwnd,TVM_GETITEM,0,LPARAM(@item));
  1818. end;
  1819. function TreeView_SetItem(hwnd:HWND;var item : TV_ITEM) : LRESULT;
  1820. begin
  1821. TreeView_SetItem:=SendMessage(hwnd,TVM_SETITEM,0,LPARAM(@item));
  1822. end;
  1823. function TreeView_EditLabel(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1824. begin
  1825. TreeView_EditLabel:=SendMessage(hwnd,TVM_EDITLABEL,0,LPARAM(hitem));
  1826. end;
  1827. function TreeView_GetEditControl(hwnd : HWND) : LRESULT;
  1828. begin
  1829. TreeView_GetEditControl:=SendMessage(hwnd,TVM_GETEDITCONTROL,0,0);
  1830. end;
  1831. function TreeView_GetVisibleCount(hwnd : HWND) : LRESULT;
  1832. begin
  1833. TreeView_GetVisibleCount:=SendMessage(hwnd,TVM_GETVISIBLECOUNT,0,0);
  1834. end;
  1835. function TreeView_HitTest(hwnd:HWND;lpht : LPTV_HITTESTINFO) : LRESULT;
  1836. begin
  1837. TreeView_HitTest:=SendMessage(hwnd,TVM_HITTEST,0,LPARAM(lpht));
  1838. end;
  1839. function TreeView_CreateDragImage(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1840. begin
  1841. TreeView_CreateDragImage:=SendMessage(hwnd,TVM_CREATEDRAGIMAGE,0,LPARAM(hitem));
  1842. end;
  1843. function TreeView_SortChildren(hwnd:HWND;hitem:HTREEITEM;recurse : longint) : LRESULT;
  1844. begin
  1845. TreeView_SortChildren:=SendMessage(hwnd,TVM_SORTCHILDREN,WPARAM(recurse),LPARAM(hitem));
  1846. end;
  1847. function TreeView_EnsureVisible(hwnd:HWND;hitem : HTREEITEM) : LRESULT;
  1848. begin
  1849. TreeView_EnsureVisible:=SendMessage(hwnd,TVM_ENSUREVISIBLE,0,LPARAM(hitem));
  1850. end;
  1851. function TreeView_SortChildrenCB(hwnd:HWND;psort:LPTV_SORTCB;recurse : longint) : LRESULT;
  1852. begin
  1853. TreeView_SortChildrenCB:=SendMessage(hwnd,TVM_SORTCHILDRENCB,WPARAM(recurse),LPARAM(psort));
  1854. end;
  1855. function TreeView_EndEditLabelNow(hwnd:HWND;fCancel : longint) : LRESULT;
  1856. begin
  1857. TreeView_EndEditLabelNow:=SendMessage(hwnd,TVM_ENDEDITLABELNOW,WPARAM(fCancel),0);
  1858. end;
  1859. function TreeView_GetISearchString(hwndTV:HWND;lpsz : LPTSTR) : LRESULT;
  1860. begin
  1861. TreeView_GetISearchString:=SendMessage(hwndTV,TVM_GETISEARCHSTRING,0,LPARAM(lpsz));
  1862. end;
  1863. function TabCtrl_GetImageList(hwnd : HWND) : LRESULT;
  1864. begin
  1865. TabCtrl_GetImageList:=SendMessage(hwnd,TCM_GETIMAGELIST,0,0);
  1866. end;
  1867. function TabCtrl_SetImageList(hwnd:HWND;himl : HIMAGELIST) : LRESULT;
  1868. begin
  1869. TabCtrl_SetImageList:=SendMessage(hwnd,TCM_SETIMAGELIST,0,LPARAM(UINT(himl)));
  1870. end;
  1871. function TabCtrl_GetItemCount(hwnd : HWND) : LRESULT;
  1872. begin
  1873. TabCtrl_GetItemCount:=SendMessage(hwnd,TCM_GETITEMCOUNT,0,0);
  1874. end;
  1875. function TabCtrl_GetItem(hwnd:HWND;iItem : longint;var item : TC_ITEM) : LRESULT;
  1876. begin
  1877. TabCtrl_GetItem:=SendMessage(hwnd,TCM_GETITEM,WPARAM(iItem),LPARAM(@item));
  1878. end;
  1879. function TabCtrl_SetItem(hwnd:HWND;iItem : longint;var item : TC_ITEM) : LRESULT;
  1880. begin
  1881. TabCtrl_SetItem:=SendMessage(hwnd,TCM_SETITEM,WPARAM(iItem),LPARAM(@item));
  1882. end;
  1883. function TabCtrl_InsertItem(hwnd:HWND;iItem : longint;var item : TC_ITEM) : LRESULT;
  1884. begin
  1885. TabCtrl_InsertItem:=SendMessage(hwnd,TCM_INSERTITEM,WPARAM(iItem),LPARAM(@item));
  1886. end;
  1887. function TabCtrl_DeleteItem(hwnd:HWND;i : longint) : LRESULT;
  1888. begin
  1889. TabCtrl_DeleteItem:=SendMessage(hwnd,TCM_DELETEITEM,WPARAM(i),0);
  1890. end;
  1891. function TabCtrl_DeleteAllItems(hwnd : HWND) : LRESULT;
  1892. begin
  1893. TabCtrl_DeleteAllItems:=SendMessage(hwnd,TCM_DELETEALLITEMS,0,0);
  1894. end;
  1895. function TabCtrl_GetItemRect(hwnd:HWND;i : longint;var rc : RECT) : LRESULT;
  1896. begin
  1897. TabCtrl_GetItemRect:=SendMessage(hwnd,TCM_GETITEMRECT,WPARAM(longint(i)),LPARAM(@rc));
  1898. end;
  1899. function TabCtrl_GetCurSel(hwnd : HWND) : LRESULT;
  1900. begin
  1901. TabCtrl_GetCurSel:=SendMessage(hwnd,TCM_GETCURSEL,0,0);
  1902. end;
  1903. function TabCtrl_SetCurSel(hwnd:HWND;i : longint) : LRESULT;
  1904. begin
  1905. TabCtrl_SetCurSel:=SendMessage(hwnd,TCM_SETCURSEL,WPARAM(i),0);
  1906. end;
  1907. function TabCtrl_HitTest(hwndTC:HWND;var info : TC_HITTESTINFO) : LRESULT;
  1908. begin
  1909. TabCtrl_HitTest:=SendMessage(hwndTC,TCM_HITTEST,0,LPARAM(@info));
  1910. end;
  1911. function TabCtrl_SetItemExtra(hwndTC:HWND;cb : longint) : LRESULT;
  1912. begin
  1913. TabCtrl_SetItemExtra:=SendMessage(hwndTC,TCM_SETITEMEXTRA,WPARAM(cb),0);
  1914. end;
  1915. function TabCtrl_AdjustRect(hwnd:HWND;bLarger:WINBOOL;var rc : RECT) : LRESULT;
  1916. begin
  1917. TabCtrl_AdjustRect:=SendMessage(hwnd,TCM_ADJUSTRECT,WPARAM(bLarger),LPARAM(@rc));
  1918. end;
  1919. function TabCtrl_SetItemSize(hwnd:HWND;x,y : longint) : LRESULT;
  1920. begin
  1921. TabCtrl_SetItemSize:=SendMessage(hwnd,TCM_SETITEMSIZE,0,MAKELPARAM(x,y));
  1922. end;
  1923. function TabCtrl_RemoveImage(hwnd:HWND;i : WPARAM) : LRESULT;
  1924. begin
  1925. TabCtrl_RemoveImage:=SendMessage(hwnd,TCM_REMOVEIMAGE,i,0);
  1926. end;
  1927. function TabCtrl_SetPadding(hwnd:HWND;cx,cy : longint) : LRESULT;
  1928. begin
  1929. TabCtrl_SetPadding:=SendMessage(hwnd,TCM_SETPADDING,0,MAKELPARAM(cx,cy));
  1930. end;
  1931. function TabCtrl_GetRowCount(hwnd : HWND) : LRESULT;
  1932. begin
  1933. TabCtrl_GetRowCount:=SendMessage(hwnd,TCM_GETROWCOUNT,0,0);
  1934. end;
  1935. function TabCtrl_GetToolTips(hwnd : HWND) : LRESULT;
  1936. begin
  1937. TabCtrl_GetToolTips:=SendMessage(hwnd,TCM_GETTOOLTIPS,0,0);
  1938. end;
  1939. function TabCtrl_SetToolTips(hwnd:HWND;hwndTT : longint) : LRESULT;
  1940. begin
  1941. TabCtrl_SetToolTips:=SendMessage(hwnd,TCM_SETTOOLTIPS,WPARAM(hwndTT),0);
  1942. end;
  1943. function TabCtrl_GetCurFocus(hwnd : HWND) : LRESULT;
  1944. begin
  1945. TabCtrl_GetCurFocus:=SendMessage(hwnd,TCM_GETCURFOCUS,0,0);
  1946. end;
  1947. function TabCtrl_SetCurFocus(hwnd:HWND;i : longint) : LRESULT;
  1948. begin
  1949. TabCtrl_SetCurFocus:=SendMessage(hwnd,TCM_SETCURFOCUS,i,0);
  1950. end;
  1951. function SNDMSG(hWnd:HWND; Msg:UINT; wParam:WPARAM; lParam:LPARAM):LRESULT;
  1952. begin
  1953. SNDMSG:=SendMessage(hWnd,Msg,wParam,lParam);
  1954. end;
  1955. function SNDMSGW(hWnd:HWND; Msg:UINT; wParam:WPARAM; lParam:LPARAM):LRESULT;
  1956. begin
  1957. SNDMSGW:=SendMessageW(hWnd,Msg,wParam,lParam);
  1958. end;
  1959. function CommDlg_OpenSave_GetSpecA(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1960. begin
  1961. CommDlg_OpenSave_GetSpecA:=SNDMSG(_hdlg,CDM_GETSPEC,WPARAM(_cbmax),LPARAM(_psz));
  1962. end;
  1963. function CommDlg_OpenSave_GetSpecW(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1964. begin
  1965. CommDlg_OpenSave_GetSpecW:=SNDMSGW(_hdlg,CDM_GETSPEC,WPARAM(_cbmax),LPARAM(_psz));
  1966. end;
  1967. {$ifndef Unicode}
  1968. function CommDlg_OpenSave_GetSpec(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1969. begin
  1970. CommDlg_OpenSave_GetSpec:=SNDMSG(_hdlg,CDM_GETSPEC,WPARAM(_cbmax),LPARAM(_psz));
  1971. end;
  1972. {$else Unicode}
  1973. function CommDlg_OpenSave_GetSpec(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1974. begin
  1975. CommDlg_OpenSave_GetSpec:=SNDMSGW(_hdlg,CDM_GETSPEC,WPARAM(_cbmax),LPARAM(_psz));
  1976. end;
  1977. {$endif Unicode}
  1978. function CommDlg_OpenSave_GetFilePathA(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1979. begin
  1980. CommDlg_OpenSave_GetFilePathA:=SNDMSG(_hdlg,CDM_GETFILEPATH,WPARAM(_cbmax),LPARAM(_psz));
  1981. end;
  1982. function CommDlg_OpenSave_GetFilePathW(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1983. begin
  1984. CommDlg_OpenSave_GetFilePathW:=SNDMSGW(_hdlg,CDM_GETFILEPATH,WPARAM(_cbmax),LPARAM(LPWSTR(_psz)));
  1985. end;
  1986. {$ifndef Unicode}
  1987. function CommDlg_OpenSave_GetFilePath(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1988. begin
  1989. CommDlg_OpenSave_GetFilePath:=SNDMSG(_hdlg,CDM_GETFILEPATH,WPARAM(_cbmax),LPARAM(_psz));
  1990. end;
  1991. {$else Unicode}
  1992. function CommDlg_OpenSave_GetFilePath(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  1993. begin
  1994. CommDlg_OpenSave_GetFilePath:=SNDMSGW(_hdlg,CDM_GETFILEPATH,WPARAM(_cbmax),LPARAM(_psz));
  1995. end;
  1996. {$endif Unicode}
  1997. function CommDlg_OpenSave_GetFolderPathA(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  1998. begin
  1999. CommDlg_OpenSave_GetFolderPathA:=SNDMSG(_hdlg,CDM_GETFOLDERPATH,WPARAM(_cbmax),LPARAM(LPSTR(_psz)));
  2000. end;
  2001. function CommDlg_OpenSave_GetFolderPathW(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  2002. begin
  2003. CommDlg_OpenSave_GetFolderPathW:=SNDMSGW(_hdlg,CDM_GETFOLDERPATH,WPARAM(_cbmax),LPARAM(LPWSTR(_psz)));
  2004. end;
  2005. {$ifndef Unicode}
  2006. function CommDlg_OpenSave_GetFolderPath(_hdlg:HWND;_psz:LPSTR;_cbmax : longint) : LRESULT;
  2007. begin
  2008. CommDlg_OpenSave_GetFolderPath:=SNDMSG(_hdlg,CDM_GETFOLDERPATH,WPARAM(_cbmax),LPARAM(LPSTR(_psz)));
  2009. end;
  2010. {$else Unicode}
  2011. function CommDlg_OpenSave_GetFolderPath(_hdlg:HWND;_psz:LPWSTR;_cbmax : longint) : LRESULT;
  2012. begin
  2013. CommDlg_OpenSave_GetFolderPath:=SNDMSGW(_hdlg,CDM_GETFOLDERPATH,WPARAM(_cbmax),LPARAM(LPWSTR(_psz)));
  2014. end;
  2015. {$endif Unicode}
  2016. function CommDlg_OpenSave_GetFolderIDList(_hdlg:HWND;_pidl:LPVOID;_cbmax : longint) : LRESULT;
  2017. begin
  2018. CommDlg_OpenSave_GetFolderIDList:=SNDMSG(_hdlg,CDM_GETFOLDERIDLIST,WPARAM(_cbmax),LPARAM(_pidl));
  2019. end;
  2020. function CommDlg_OpenSave_SetControlText(_hdlg:HWND;_id : longint;_text : LPSTR) : LRESULT;
  2021. begin
  2022. CommDlg_OpenSave_SetControlText:=SNDMSG(_hdlg,CDM_SETCONTROLTEXT,WPARAM(_id),LPARAM(_text));
  2023. end;
  2024. function CommDlg_OpenSave_HideControl(_hdlg:HWND;_id : longint) : LRESULT;
  2025. begin
  2026. CommDlg_OpenSave_HideControl:=SNDMSG(_hdlg,CDM_HIDECONTROL,WPARAM(_id),0);
  2027. end;
  2028. function CommDlg_OpenSave_SetDefExt(_hdlg:HWND;_pszext : LPSTR) : LRESULT;
  2029. begin
  2030. CommDlg_OpenSave_SetDefExt:=SNDMSG(_hdlg,CDM_SETDEFEXT,0,LPARAM(_pszext));
  2031. end;
  2032. function InternalGetLargestConsoleWindowSize(hConsoleOutput:HANDLE):DWord; external 'kernel32' name 'GetLargestConsoleWindowSize';
  2033. function GetLargestConsoleWindowSize(hConsoleOutput:HANDLE):COORD;
  2034. var
  2035. res : dword;
  2036. begin
  2037. res:=InternalGetLargestConsoleWindowSize(hConsoleOutput);
  2038. GetLargestConsoleWindowSize:=COORD(res);
  2039. end;
  2040. {
  2041. #define IMAGE_FIRST_SECTION( ntheader ) ((PIMAGE_SECTION_HEADER) \
  2042. ((ULONG_PTR)(ntheader) + \
  2043. FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) + \
  2044. ((ntheader))->FileHeader.SizeOfOptionalHeader \
  2045. ))
  2046. }
  2047. function IMAGE_FIRST_SECTION(ntheader : PIMAGE_NT_HEADERS):PIMAGE_SECTION_HEADER;
  2048. // (PTRUINT(ntheader)+ OFS(ntheader^.OptionalHeader) - OFS(NTHEADER); -> address of ntheader cancels.
  2049. begin
  2050. IMAGE_FIRST_SECTION:=PIMAGE_SECTION_HEADER(OFS(ntheader^.OptionalHeader) + ntheader^.FileHeader.SizeOfOptionalHeader);
  2051. end;
  2052. function GET_RAWINPUT_CODE_WPARAM(wp: WPARAM): longint;
  2053. begin
  2054. GET_RAWINPUT_CODE_WPARAM:=wp and $FF;
  2055. end;
  2056. function RAWINPUT_ALIGN(x: PtrUInt): PtrUInt;
  2057. begin
  2058. RAWINPUT_ALIGN:=PtrUInt(x+(SizeOf(PtrUInt)-1)) and not PtrUInt(SizeOf(PtrUInt)-1);
  2059. end;
  2060. function NEXTRAWINPUTBLOCK(ptr: PRAWINPUT): PRAWINPUT;
  2061. begin
  2062. NEXTRAWINPUTBLOCK:=PRAWINPUT(RAWINPUT_ALIGN(ULONG_PTR(PBYTE(ptr)+ptr^.header.dwSize)));
  2063. end;
  2064. function RIDEV_EXMODE(mode: DWORD): DWORD;
  2065. begin
  2066. RIDEV_EXMODE:=mode and RIDEV_EXMODEMASK;
  2067. end;
  2068. function GET_DEVICE_CHANGE_WPARAM(wParam: WPARAM): WORD;
  2069. begin
  2070. GET_DEVICE_CHANGE_WPARAM:=LOWORD(wParam);
  2071. end;
  2072. function GET_DEVICE_CHANGE_LPARAM(lParam: LPARAM): WORD;
  2073. begin
  2074. GET_DEVICE_CHANGE_LPARAM:=LOWORD(lParam);
  2075. end;
  2076. function CONSOLE_REAL_OUTPUT_HANDLE : HANDLE;
  2077. begin
  2078. CONSOLE_REAL_OUTPUT_HANDLE:=HANDLE(-(2));
  2079. end;
  2080. function CONSOLE_REAL_INPUT_HANDLE : HANDLE;
  2081. begin
  2082. CONSOLE_REAL_INPUT_HANDLE:=HANDLE(-(3));
  2083. end;
  2084. function ATTACH_PARENT_PROCESS : DWORD;
  2085. begin
  2086. ATTACH_PARENT_PROCESS:=DWORD(-(1));
  2087. end;
  2088. {$endif read_implementation}