redef.inc 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2001 by the Free Pascal development team
  4. This file defines type names as they are used by Delphi
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************
  11. }
  12. {$ifdef read_interface}
  13. type
  14. PIID = PGUID;
  15. TIID = TGUID;
  16. REFIID = TIID;
  17. THANDLE = HANDLE;
  18. PSmallRect = ^TSmallRect;
  19. TSmallRect = SMALL_RECT;
  20. PCharInfo = ^TCharInfo;
  21. TCharInfo = _CHAR_INFO;
  22. TFarProc = FARPROC;
  23. TFNDlgProc = FARPROC;
  24. TFNThreadStartRoutine = FARPROC;
  25. TFNTimerAPCRoutine = FARPROC;
  26. TFNFiberStartRoutine = FARPROC;
  27. PObjectTypeList = ^TObjectTypeList;
  28. _OBJECT_TYPE_LIST = record
  29. Level: WORD;
  30. Sbz: WORD;
  31. ObjectType: PGUID;
  32. end;
  33. TObjectTypeList = _OBJECT_TYPE_LIST;
  34. OBJECT_TYPE_LIST = _OBJECT_TYPE_LIST;
  35. AUDIT_EVENT_TYPE = DWORD;
  36. PBlendFunction = ^TBlendFunction;
  37. _BLENDFUNCTION = packed record
  38. BlendOp: BYTE;
  39. BlendFlags: BYTE;
  40. SourceConstantAlpha: BYTE;
  41. AlphaFormat: BYTE;
  42. end;
  43. TBlendFunction = _BLENDFUNCTION;
  44. BLENDFUNCTION = _BLENDFUNCTION;
  45. _WIN_CERTIFICATE = Packed Record
  46. dwLength : DWord;
  47. wRevision : Word;
  48. wCertificateType : Word;
  49. bCertificate : Array[0..0] of Byte;
  50. End;
  51. TWinCertificate = _WIN_CERTIFICATE;
  52. PWinCertificate = ^TWinCertificate;
  53. TMaxLogPalette = Packed Record
  54. palVersion : Word;
  55. palNumEntries : Word;
  56. palPalEntry : array[Byte] of TPaletteEntry;
  57. end;
  58. PMaxLogPalette = ^TMaxLogPalette;
  59. //
  60. // A language ID is a 16 bit value which is the combination of a
  61. // primary language ID and a secondary language ID. The bits are
  62. // allocated as follows:
  63. //
  64. // +-----------------------+-------------------------+
  65. // | Sublanguage ID | Primary Language ID |
  66. // +-----------------------+-------------------------+
  67. // 15 10 9 0 bit
  68. //
  69. //
  70. // Language ID creation/extraction macros:
  71. //
  72. // MAKELANGID - construct language id from a primary language id and
  73. // a sublanguage id.
  74. // PRIMARYLANGID - extract primary language id from a language id.
  75. // SUBLANGID - extract sublanguage id from a language id.
  76. //
  77. function MAKELANGID(PrimaryLang, SubLang: USHORT): WORD;
  78. function PRIMARYLANGID(LangId: WORD): WORD;
  79. function SUBLANGID(LangId: WORD): WORD;
  80. //
  81. // A locale ID is a 32 bit value which is the combination of a
  82. // language ID, a sort ID, and a reserved area. The bits are
  83. // allocated as follows:
  84. //
  85. // +-------------+---------+-------------------------+
  86. // | Reserved | Sort ID | Language ID |
  87. // +-------------+---------+-------------------------+
  88. // 31 20 19 16 15 0 bit
  89. //
  90. //
  91. // Locale ID creation/extraction macros:
  92. //
  93. // MAKELCID - construct the locale id from a language id and a sort id.
  94. // MAKESORTLCID - construct the locale id from a language id, sort id, and sort version.
  95. // LANGIDFROMLCID - extract the language id from a locale id.
  96. // SORTIDFROMLCID - extract the sort id from a locale id.
  97. // SORTVERSIONFROMLCID - extract the sort version from a locale id.
  98. //
  99. const
  100. NLS_VALID_LOCALE_MASK = $000fffff; //winnt
  101. function MAKELCID(LangId, SortId: WORD): DWORD; //winnt
  102. function MAKESORTLCID(LangId, SortId, SortVersion: WORD): DWORD; //winnt
  103. function LANGIDFROMLCID(LocaleId: LCID): WORD; //winnt
  104. function SORTIDFROMLCID(LocaleId: LCID): WORD; //winnt
  105. function SORTVERSIONFROMLCID(LocaleId: LCID): WORD; //winnt
  106. //
  107. // Default System and User IDs for language and locale.
  108. //
  109. function LANG_SYSTEM_DEFAULT: WORD; //winnt
  110. function LANG_USER_DEFAULT: WORD; //winnt
  111. function LOCALE_SYSTEM_DEFAULT: DWORD; //+winnt
  112. function LOCALE_USER_DEFAULT: DWORD; //+winnt
  113. function LOCALE_NEUTRAL: DWORD; //winnt
  114. function LOCALE_INVARIANT: DWORD; //winnt
  115. function BeginPaint(hWnd: HWND; var lpPaint: TPaintStruct): HDC; external KernelDLL name 'BeginPaint';
  116. function ChangeDisplaySettingsEx(lpszDeviceName: PWideChar; var lpDevMode: TDeviceMode; wnd: HWND; dwFlags: DWORD; lParam: Pointer): Longint;external KernelDLL name 'ChangeDisplaySettingsEx';
  117. function ClearCommError(hFile: THandle; var lpErrors: DWORD; lpStat: PComStat): BOOL; external KernelDLL name 'ClearCommError';
  118. function ClientToScreen(hWnd: HWND; var lpPoint: TPoint): BOOL; external KernelDLL name 'ClientToScreen';
  119. function ClipCursor(var lpRect:RECT):WINBOOL; external KernelDLL name 'ClipCursor';
  120. function CopyRect(var lprcDst: TRect; const lprcSrc: TRect): BOOL; external KernelDLL name 'CopyRect';
  121. function CreateAcceleratorTable(var Accel; Count: Integer): HACCEL; external KernelDLL name 'CreateAcceleratorTableW';
  122. function CreateAcceleratorTableW(var Accel; Count: Integer): HACCEL; external KernelDLL name 'CreateAcceleratorTableW';
  123. function CreateDialogIndirectParam(hInstance: HINST; const lpTemplate: TDlgTemplate; hWndParent: HWND; lpDialogFunc: TFNDlgProc; dwInitParam: LPARAM): HWND;external KernelDLL name 'CreateDialogIndirectParamW';
  124. function CreateFontIndirect(const p1: TLogFont): HFONT; external KernelDLL name 'CreateFontIndirectW';
  125. function CreateFontIndirectW(const p1: TLogFontW): HFONT; external KernelDLL name 'CreateFontIndirectW';
  126. function CreateIconIndirect(var piconinfo: TIconInfo): HICON; external KernelDLL name 'CreateIconIndirect';
  127. function CreateProcess(lpApplicationName: LPTSTR; lpCommandLine: LPTSTR; lpProcessAttributes, lpThreadAttributes: PSecurityAttributes; bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: Pointer; lpCurrentDirectory: LPTSTR;
  128. const lpStartupInfo: LPStartupInfo; var lpProcessInformation: TProcessInformation): BOOL;external KernelDLL name 'CreateProcessW';
  129. function CreateProcess(lpApplicationName: LPTSTR; lpCommandLine: LPTSTR; lpProcessAttributes, lpThreadAttributes: PSecurityAttributes; bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: Pointer; lpCurrentDirectory: LPTSTR;
  130. const lpStartupInfo: TStartupInfo; var lpProcessInformation: TProcessInformation): BOOL;external KernelDLL name 'CreateProcessW';
  131. function CreateProcessW(lpApplicationName: LPWSTR; lpCommandLine: LPWSTR; lpProcessAttributes, lpThreadAttributes: PSecurityAttributes; bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: Pointer; lpCurrentDirectory: LPWSTR;
  132. const lpStartupInfo: TStartupInfo; var lpProcessInformation: TProcessInformation): BOOL; external KernelDLL name 'CreateProcessW';
  133. procedure DeleteCriticalSection(var CriticalSection : TRTLCriticalSection); external KernelDLL name 'DeleteCriticalSection';
  134. function DeviceIoControl(hDevice: THandle; dwIoControlCode: DWORD; lpInBuffer: Pointer; nInBufferSize: DWORD; lpOutBuffer: Pointer; nOutBufferSize: DWORD; var lpBytesReturned: DWORD; lpOverlapped: POverlapped): BOOL;
  135. external KernelDLL name 'DeviceIoControl';
  136. function DispatchMessage(const lpMsg: TMsg): Longint; external KernelDLL name 'DispatchMessageW';
  137. function DispatchMessageW(const lpMsg: TMsg): Longint; external KernelDLL name 'DispatchMessageW';
  138. function DrawEdge(hdc: HDC; var qrc: TRect; edge: UINT; grfFlags: UINT): BOOL; external KernelDLL name 'DrawEdge';
  139. function DrawFrameControl(DC: HDC; const Rect: TRect; uType, uState: UINT): BOOL; external KernelDLL name 'DrawFrameControl';
  140. function DrawText(hDC: HDC; lpString: LPWSTR; nCount: Integer; var lpRect: TRect; uFormat: UINT): Integer; external KernelDLL name 'DrawTextW';
  141. function DrawTextW(hDC: HDC; lpString: LPWSTR; nCount: Integer; var lpRect: TRect; uFormat: UINT): Integer; external KernelDLL name 'DrawTextW';
  142. function EndPaint(hWnd: HWND; const lpPaint: TPaintStruct): BOOL; external KernelDLL name 'EndPaint';
  143. procedure EnterCriticalSection(var CriticalSection : TRTLCriticalSection); external KernelDLL name 'EnterCriticalSection';
  144. function EnumDisplaySettings(lpszDeviceName: PWideChar; iModeNum: DWORD; var lpDevMode: TDeviceMode): BOOL;external KernelDLL name 'EnumDisplaySettings';
  145. function EnumDisplaySettingsW(lpszDeviceName: PWideChar; iModeNum: DWORD; var lpDevMode: TDeviceModeW): BOOL;external KernelDLL name 'EnumDisplaySettings';
  146. function ExtCreateRegion(p1: PXForm; p2: DWORD; const p3: TRgnData): HRGN; external KernelDLL name 'ExtCreateRegion';
  147. function FileTimeToSystemTime(const lpFileTime: TFileTime; var lpSystemTime: TSystemTime): BOOL; external KernelDLL name 'FileTimeToSystemTime';
  148. function FileTimeToLocalFileTime(const lpFileTime: TFileTime; var lpLocalFileTime: TFileTime): BOOL; external KernelDLL name 'FileTimeToLocalFileTime';
  149. function FindFirstFile(lpFileName: LPTSTR; var lpFindFileData: TWIN32FindData): THandle; external KernelDLL name 'FindFirstFileW';
  150. function FindFirstFileW(lpFileName: LPTSTR; var lpFindFileData: TWIN32FindDataW): THandle; external KernelDLL name 'FindFirstFileW';
  151. function FindNextFile(hFindFile: THandle; var lpFindFileData: TWIN32FindData): BOOL; external KernelDLL name 'FindNextFileW';
  152. function FindNextFileW(hFindFile: THandle; var lpFindFileData: TWIN32FindDataW): BOOL; external KernelDLL name 'FindNextFileW';
  153. function GetCaretPos(var lpPoint: TPoint): BOOL; external KernelDLL name 'GetCaretPos';
  154. function GetCharABCWidths(DC: HDC; p2, p3: UINT; const ABCStructs): BOOL;external KernelDLL name 'GetCharABCWidths';
  155. function GetCharABCWidthsW(DC: HDC; p2, p3: UINT; const ABCStructs): BOOL;external KernelDLL name 'GetCharABCWidths';
  156. function GetCharWidth32(DC: HDC; p2, p3: UINT; const Widths): BOOL;external KernelDLL name 'GetCharWidth32';
  157. function GetCharWidth32W(DC: HDC; p2, p3: UINT; const Widths): BOOL;external KernelDLL name 'GetCharWidth32';
  158. function GetClassInfo(hInstance: HINST; lpClassName: LPWSTR; var lpWndClass: TWndClassW): BOOL; external KernelDLL name 'GetClassInfoW';
  159. function GetClassInfoW(hInstance: HINST; lpClassName: LPWSTR; var lpWndClass: TWndClassW): BOOL; external KernelDLL name 'GetClassInfoW';
  160. function GetClientRect(hWnd: HWND; var lpRect: TRect): BOOL; external KernelDLL name 'GetClientRect';
  161. function GetClipBox(DC: HDC; var Rect: TRect): Integer; external KernelDLL name 'GetClipBox';
  162. function GetClipCursor(var lpRect: TRect): BOOL; external KernelDLL name 'GetClipCursor';
  163. function GetCommModemStatus(hFile: THandle; var lpModemStat: DWORD): BOOL; external KernelDLL name 'GetCommModemStatus';
  164. function GetCommProperties(hFile: THandle; var lpCommProp: TCommProp): BOOL; external KernelDLL name 'GetCommProperties';
  165. function GetCommState(hFile: THandle; var lpDCB: TDCB): BOOL; external KernelDLL name 'GetCommState';
  166. function GetCommTimeouts(hFile: THandle; var lpCommTimeouts: TCommTimeouts): BOOL; external KernelDLL name 'GetCommTimeouts';
  167. function GetCursorPos(var lpPoint: TPoint): BOOL; external KernelDLL name 'GetCursorPos';
  168. function GetCPInfo(CodePage: UINT; var lpCPInfo: TCPInfo): BOOL;external KernelDLL name 'GetCPInfo';
  169. function GetDIBColorTable(DC: HDC; p2, p3: UINT; var RGBQuadStructs): UINT; external KernelDLL name 'GetDIBColorTable';
  170. function GetDiskFreeSpaceEx(lpDirectoryName: PWideChar; var lpFreeBytesAvailableToCaller, lpTotalNumberOfBytes: TLargeInteger; lpTotalNumberOfFreeBytes: PLargeInteger): BOOL;external KernelDLL name 'GetDiskFreeSpaceExW';
  171. function GetDiskFreeSpaceExW(lpDirectoryName: PWideChar; var lpFreeBytesAvailableToCaller, lpTotalNumberOfBytes: TLargeInteger; lpTotalNumberOfFreeBytes: PLargeInteger): BOOL;external KernelDLL name 'GetDiskFreeSpaceExW';
  172. function GetExitCodeProcess(hProcess: THandle; var lpExitCode: DWORD): BOOL; external KernelDLL name 'GetExitCodeProcess';
  173. function GetExitCodeThread(hThread: THandle; var lpExitCode: DWORD): BOOL; external KernelDLL name 'GetExitCodeThread';
  174. function GetFileInformationByHandle(hFile: THandle; var lpFileInformation: TByHandleFileInformation): BOOL; external KernelDLL name 'GetFileInformationByHandle';
  175. function GetKeyboardLayoutList(nBuff: Integer; var List): UINT; external KernelDLL name 'GetKeyboardLayoutList';
  176. procedure GetLocalTime(var SystemTime: SYSTEMTIME); external KernelDLL name 'GetLocalTime';
  177. function GetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; var p4: TMenuItemInfo): BOOL; external KernelDLL name 'GetMenuItemInfoW';
  178. function GetMenuItemInfoW(p1: HMENU; p2: UINT; p3: BOOL; var p4: TMenuItemInfoW): BOOL; external KernelDLL name 'GetMenuItemInfoW';
  179. function GetMessage(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax: UINT): BOOL;external KernelDLL name 'GetMessageW';
  180. function GetOpenFileName(var OpenFile:TOPENFILENAMEW):WINBOOL; external KernelDLL name 'GetOpenFileNameW';
  181. function GetOpenFileNameW(var OpenFile:TOPENFILENAMEW):WINBOOL; external KernelDLL name 'GetOpenFileNameW';
  182. function GetPaletteEntries(Palette: HPALETTE; StartIndex, NumEntries: UINT; var PaletteEntries): UINT; external KernelDLL name 'GetPaletteEntries';
  183. function GetRgnBox(RGN: HRGN; var p2: TRect): Integer; external KernelDLL name 'GetRgnBox';
  184. function GetSaveFileName(var OpenFile:TOPENFILENAMEW):WINBOOL; external KernelDLL name 'GetSaveFileNameW';
  185. function GetSaveFileNameW(var OpenFile:TOPENFILENAMEW):WINBOOL; external KernelDLL name 'GetSaveFileNameW';
  186. function GetScrollInfo(hWnd: HWND; BarFlag: Integer; var ScrollInfo: TScrollInfo): BOOL; external KernelDLL name 'GetScrollInfo';
  187. function GetStringType(dwInfoType: DWORD; const lpSrcStr: PWideChar; cchSrc: BOOL; var lpCharType: Word): BOOL;external KernelDLL name 'GetStringTypeW';
  188. function GetStringTypeW(dwInfoType: DWORD; const lpSrcStr: PWideChar; cchSrc: BOOL; var lpCharType: Word): BOOL;external KernelDLL name 'GetStringTypeW';
  189. function GetStringTypeEx(Locale: LCID; dwInfoType: DWORD; lpSrcStr: PWideChar; cchSrc: Integer; var lpCharType): BOOL; external KernelDLL name 'GetStringTypeExW';
  190. function GetStringTypeExW(Locale: LCID; dwInfoType: DWORD; lpSrcStr: PWideChar; cchSrc: Integer; var lpCharType): BOOL; external KernelDLL name 'GetStringTypeExW';
  191. procedure GetSystemInfo(var SystemInfo:SYSTEM_INFO); external KernelDLL name 'GetSystemInfo';
  192. function GetSystemPaletteEntries(DC: HDC; StartIndex, NumEntries: UINT; var PaletteEntries): UINT; external KernelDLL name 'GetSystemPaletteEntries';
  193. procedure GetSystemTime(var lpSystemTime:SYSTEMTIME); external KernelDLL name 'GetSystemTime';
  194. function GetTextExtentExPoint(DC: HDC; p2: LPWSTR; p3, p4: Integer; p5, p6: PInteger; var p7: TSize): BOOL; external KernelDLL name 'GetTextExtentExPointW';
  195. function GetTextExtentExPointW(DC: HDC; p2: LPWSTR; p3, p4: Integer; p5, p6: PInteger; var p7: TSize): BOOL; external KernelDLL name 'GetTextExtentExPointW';
  196. function GetTextExtentPoint32(DC: HDC; Str: LPWSTR; Count: Integer; var Size: TSize): BOOL;
  197. function GetTextExtentPoint32W(DC: HDC; Str: LPWSTR; Count: Integer; var Size: TSize): BOOL;
  198. function GetTextMetrics(DC: HDC; var TM: TTextMetric): BOOL;external KernelDLL name 'GetTextMetricsW';
  199. function GetThreadContext(hThread: THandle; var lpContext: TContext): BOOL; external KernelDLL name 'GetThreadContext';
  200. function GetThreadTimes(hThread: THandle; var lpCreationTime, lpExitTime, lpKernelTime, lpUserTime: TFileTime): BOOL; external KernelDLL name 'GetThreadTimes';
  201. function GetTimeZoneInformation(var lpTimeZoneInformation: TTimeZoneInformation): DWORD; external KernelDLL name 'GetTimeZoneInformation';
  202. function GetUpdateRect(hWnd: HWND; var lpRect: TRect; bErase: BOOL): BOOL; external KernelDLL name 'GetUpdateRect';
  203. function GetVersionEx(var lpVersionInformation: TOSVersionInfo): BOOL;external KernelDLL name 'GetVersionExW';
  204. function GetVersionExW(var lpVersionInformation: TOSVersionInfoW): BOOL; external KernelDLL name 'GetVersionExW';
  205. function GetWindowRect(hWnd: HWND; var lpRect: TRect): BOOL; external KernelDLL name 'GetWindowRect';
  206. procedure GlobalMemoryStatus(var Buffer: MEMORYSTATUS); external KernelDLL name 'GlobalMemoryStatus';
  207. function ImageList_GetDragImage(var ppt:POINT; var pptHotspot:POINT):HIMAGELIST; external KernelDLL name 'ImageList_GetDragImage';
  208. function InflateRect(var lprc: TRect; dx, dy: Integer): BOOL; external KernelDLL name 'InflateRect';
  209. procedure InitializeCriticalSection(var CriticalSection : TRTLCriticalSection); external KernelDLL name 'InitializeCriticalSection';
  210. function IntersectRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): BOOL; external KernelDLL name 'IntersectRect';
  211. function IsDialogMessage(hDlg: HWND; var lpMsg: TMsg): BOOL; external KernelDLL name 'IsDialogMessageW';
  212. function IsDialogMessageW(hDlg: HWND; var lpMsg: TMsg): BOOL; external KernelDLL name 'IsDialogMessageW';
  213. procedure LeaveCriticalSection(var CriticalSection : TRTLCriticalSection); external KernelDLL name 'LeaveCriticalSection';
  214. function LocalFileTimeToFileTime(const lpLocalFileTime: TFileTime; var lpFileTime: TFileTime): BOOL; external KernelDLL name 'LocalFileTimeToFileTime';
  215. function MapDialogRect(hDlg: HWND; var lpRect: TRect): BOOL; external KernelDLL name 'MapDialogRect';
  216. function MapWindowPoints(hWndFrom, hWndTo: HWND; var lpPoints; cPoints: UINT): Integer; external KernelDLL name 'MapWindowPoints';
  217. //redirected to MsgWaitForMultipleObjectsEx
  218. function MsgWaitForMultipleObjects(nCount: DWORD; var pHandles; fWaitAll: BOOL; dwMilliseconds, dwWakeMask: DWORD): DWORD;
  219. function OffsetRect(var lprc: TRect; dx, dy: Integer): BOOL; external KernelDLL name 'OffsetRect';
  220. function PeekMessage(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL;external KernelDLL name 'PeekMessageW';
  221. function PeekMessageW(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external KernelDLL name 'PeekMessageW';
  222. function Polygon(DC: HDC; var Points; Count: Integer): BOOL; external KernelDLL name 'Polygon';
  223. function Polyline(DC: HDC; var Points; Count: Integer): BOOL; external KernelDLL name 'Polyline';
  224. function PtInRect(const lprc:TRect; pt:POINT):WINBOOL; external KernelDLL name 'PtInRect';
  225. function QueryPerformanceCounter(var lpPerformanceCount: TLargeInteger): BOOL; external KernelDLL name 'QueryPerformanceCounter';
  226. function QueryPerformanceFrequency(var lpFrequency: TLargeInteger): BOOL; external KernelDLL name 'QueryPerformanceFrequency';
  227. procedure RaiseException(dwExceptionCode:DWORD; dwExceptionFlags:DWORD; nNumberOfArguments:DWORD; var lpArguments:DWORD); external KernelDLL name 'RaiseException';
  228. function ReadFile(hFile: THandle; var Buffer; nNumberOfBytesToRead: DWORD; var lpNumberOfBytesRead: DWORD; lpOverlapped: POverlapped): BOOL; external KernelDLL name 'ReadFile';
  229. function ReadProcessMemory(hProcess: THandle; const lpBaseAddress: Pointer; lpBuffer: Pointer; nSize: DWORD; var lpNumberOfBytesRead: DWORD): BOOL; external KernelDLL name 'ReadProcessMemory';
  230. function RegCreateKeyEx(hKey: HKEY; lpSubKey: LPWSTR; Reserved: DWORD; lpClass: LPWSTR; dwOptions: DWORD; samDesired: REGSAM; lpSecurityAttributes: PSecurityAttributes; var phkResult: HKEY; lpdwDisposition: PDWORD): Longint; external KERNELDLL name 'RegCreateKeyExW';
  231. function RegCreateKeyExW(hKey: HKEY; lpSubKey: LPWSTR; Reserved: DWORD; lpClass: LPWSTR; dwOptions: DWORD; samDesired: REGSAM; lpSecurityAttributes: PSecurityAttributes; var phkResult: HKEY; lpdwDisposition: PDWORD): Longint; external KERNELDLL name 'RegCreateKeyExW';
  232. function RegEnumKeyEx(hKey: HKEY; dwIndex: DWORD; lpName: LPWSTR; var lpcbName: DWORD; lpReserved: Pointer; lpClass: LPWSTR; lpcbClass: PDWORD; lpftLastWriteTime: PFileTime): Longint; external KernelDLL name 'RegEnumKeyExW';
  233. function RegEnumKeyExW(hKey: HKEY; dwIndex: DWORD; lpName: LPWSTR; var lpcbName: DWORD; lpReserved: Pointer; lpClass: LPWSTR; lpcbClass: PDWORD; lpftLastWriteTime: PFileTime): Longint; external KernelDLL name 'RegEnumKeyExW';
  234. function RegEnumValue(hKey: HKEY; dwIndex: DWORD; lpValueName: LPWSTR; var lpcbValueName: DWORD; lpReserved: Pointer; lpType: PDWORD; lpData: PByte; lpcbData: PDWORD): Longint; external KernelDLL name 'RegEnumValueW';
  235. function RegEnumValueW(hKey: HKEY; dwIndex: DWORD; lpValueName: LPWSTR; var lpcbValueName: DWORD; lpReserved: Pointer; lpType: PDWORD; lpData: PByte; lpcbData: PDWORD): Longint; external KernelDLL name 'RegEnumValueW';
  236. function RegisterClass(const lpWndClass: TWndClass): ATOM;external KernelDLL name 'RegisterClassW';
  237. function RegisterClassW(const lpWndClass: TWndClassW): ATOM; external KernelDLL name 'RegisterClassW';
  238. function RegOpenKeyEx(hKey: HKEY; lpSubKey: LPWSTR; ulOptions: DWORD; samDesired: REGSAM; var phkResult: HKEY): Longint; external KernelDLL name 'RegOpenKeyExW';
  239. function RegOpenKeyExW(hKey: HKEY; lpSubKey: LPWSTR; ulOptions: DWORD; samDesired: REGSAM; var phkResult: HKEY): Longint; external KernelDLL name 'RegOpenKeyExW';
  240. function ScreenToClient(hWnd: HWND; var lpPoint: TPoint): BOOL; external KernelDLL name 'ScreenToClient';
  241. function ScrollWindowEx(hWnd:HWND; dx:longint; dy:longint; prcScroll:lpRECT; prcClip:lpRECT;hrgnUpdate:HRGN; prcUpdate:LPRECT; flags:UINT):longint; external KernelDLL name 'ScrollWindowEx';
  242. function SendMessageTimeout(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM; fuFlags, uTimeout: UINT; var lpdwResult: DWORD): LRESULT;external KernelDLL name 'SendMessageTimeout';
  243. function SendMessageTimeoutW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM; fuFlags, uTimeout: UINT; var lpdwResult: DWORD): LRESULT;external KernelDLL name 'SendMessageTimeout';
  244. function SetCommState(hFile: THandle; const lpDCB: TDCB): BOOL; external KernelDLL name 'SetCommState';
  245. function SetCommTimeouts(hFile: THandle; const lpCommTimeouts: TCommTimeouts): BOOL; external KernelDLL name 'SetCommTimeouts';
  246. function SetDIBColorTable(DC: HDC; p2, p3: UINT; var RGBQuadSTructs): UINT; external KernelDLL name 'SetDIBColorTable';
  247. function SetDIBits(DC: HDC; Bitmap: HBITMAP; StartScan, NumScans: UINT; Bits: Pointer; var BitsInfo: TBitmapInfo; Usage: UINT): Integer; external KernelDLL name 'SetDIBits';
  248. function SetFileTime(hFile:HANDLE; var lpCreationTime:FILETIME; var lpLastAccessTime:FILETIME; var lpLastWriteTime:FILETIME):WINBOOL; external KernelDLL name 'SetFileTime';
  249. function SetLocalTime(var lpSystemTime:SYSTEMTIME):WINBOOL; external KernelDLL name 'SetLocalTime';
  250. function SetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; const p4: TMenuItemInfo): BOOL; external KernelDLL name 'SetMenuItemInfoW';
  251. function SetMenuItemInfoW(p1: HMENU; p2: UINT; p3: BOOL; const p4: TMenuItemInfoW): BOOL; external KernelDLL name 'SetMenuItemInfoW';
  252. function SetPaletteEntries(Palette: HPALETTE; StartIndex, NumEntries: UINT; var PaletteEntries): UINT; external KernelDLL name 'SetPaletteEntries';
  253. function SetRect(var lprc:TRect; xLeft:longint; yTop:longint; xRight:longint; yBottom:longint):WINBOOL; external KernelDLL name 'SetRect';
  254. function SetRectEmpty(var lprc: TRect): BOOL; external KernelDLL name 'SetRectEmpty';
  255. function SetScrollInfo(hWnd: HWND; BarFlag: Integer; const ScrollInfo: TScrollInfo; Redraw: BOOL): Integer; external KernelDLL name 'SetScrollInfo';
  256. function SetSysColors(cElements: Integer; const lpaElements; const lpaRgbValues): BOOL; external KernelDLL name 'SetSysColors';
  257. function SetSystemTime(var lpSystemTime:SYSTEMTIME):WINBOOL; external KernelDLL name 'SetSystemTime';
  258. function SetThreadContext(hThread: THandle; const lpContext: TContext): BOOL; external KernelDLL name 'SetThreadContext';
  259. function StartDoc(DC: HDC; const p2: TDocInfo): Integer;external KernelDLL name 'StartDocW';
  260. function StartDocW(DC: HDC; const p2: TDocInfoW): Integer;external KernelDLL name 'StartDocW';
  261. function SubtractRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): BOOL; external KernelDLL name 'SubtractRect';
  262. function SystemTimeToFileTime(const lpSystemTime: TSystemTime; var lpFileTime: TFileTime): BOOL; external KernelDLL name 'SystemTimeToFileTime';
  263. function TranslateAccelerator(hWnd: HWND; hAccTable: HACCEL; var lpMsg: TMsg): Integer; external KernelDLL name 'TranslateAcceleratorW';
  264. function TranslateAcceleratorW(hWnd: HWND; hAccTable: HACCEL; var lpMsg: TMsg): Integer; external KernelDLL name 'TranslateAcceleratorW';
  265. function TranslateCharsetInfo(var lpSrc: DWORD; var lpCs: TCharsetInfo; dwFlags: DWORD): BOOL; external KernelDLL name 'TranslateCharsetInfo';
  266. function TranslateMessage(const lpMsg: TMsg): BOOL; external KernelDLL name 'TranslateMessage';
  267. function TryEnterCriticalSection(var CriticalSection : TRTLCriticalSection) : BOOL; external KernelDLL name 'TryEnterCriticalSection';
  268. function UnionRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): BOOL; external KernelDLL name 'UnionRect';
  269. function VerQueryValue(pBlock: Pointer; lpSubBlock: LPWSTR; var lplpBuffer: Pointer; var uLen: UINT): BOOL; external KernelDLL name 'VerQueryValueW';
  270. function VerQueryValueW(pBlock: Pointer; lpSubBlock: LPWSTR; var lplpBuffer: Pointer; var uLen: UINT): BOOL; external KernelDLL name 'VerQueryValueW';
  271. function VirtualProtect(lpAddress:LPVOID; dwSize:DWORD; flNewProtect:DWORD; var lpflOldProtect:DWORD):WINBOOL; external KernelDLL name 'VirtualProtect';
  272. function VirtualQuery(lpAddress: Pointer; var lpBuffer: TMemoryBasicInformation; dwLength: DWORD): DWORD; external KernelDLL name 'VirtualQuery';
  273. function WaitCommEvent(hFile: THandle; var lpEvtMask: DWORD; lpOverlapped: POverlapped): BOOL; external KernelDLL name 'WaitCommEvent';
  274. function WaitForDebugEvent(var lpDebugEvent: TDebugEvent; dwMilliseconds: DWORD): BOOL; external KernelDLL name 'WaitForDebugEvent';
  275. function WriteFile(hFile: THandle; const Buffer; nNumberOfBytesToWrite: DWORD; var lpNumberOfBytesWritten: DWORD; lpOverlapped: POverlapped): BOOL; external KernelDLL name 'WriteFile';
  276. function WriteProcessMemory(hProcess: THandle; const lpBaseAddress: Pointer; lpBuffer: Pointer; nSize: DWORD; var lpNumberOfBytesWritten: DWORD): BOOL; external KernelDLL name 'WriteProcessMemory';
  277. {$endif read_interface}
  278. {$ifdef read_implementation}
  279. function MAKELANGID(PrimaryLang, SubLang: USHORT): WORD;
  280. begin
  281. MAKELANGID := (SubLang shl 10) or PrimaryLang;
  282. end;
  283. function PRIMARYLANGID(LangId: WORD): WORD;
  284. begin
  285. PRIMARYLANGID := LangId and $3FF;
  286. end;
  287. function SUBLANGID(LangId: WORD): WORD;
  288. begin
  289. SUBLANGID := LangId shr 10;
  290. end;
  291. function MAKELCID(LangId, SortId: WORD): DWORD;
  292. begin
  293. MAKELCID := (DWORD(SortId) shl 16) or DWORD(LangId);
  294. end;
  295. function MAKESORTLCID(LangId, SortId, SortVersion: WORD): DWORD;
  296. begin
  297. MAKESORTLCID := MAKELCID(LangId, SortId) or (SortVersion shl 20);
  298. end;
  299. function LANGIDFROMLCID(LocaleId: LCID): WORD;
  300. begin
  301. LANGIDFROMLCID := WORD(LocaleId);
  302. end;
  303. function SORTIDFROMLCID(LocaleId: LCID): WORD;
  304. begin
  305. SORTIDFROMLCID := WORD((DWORD(LocaleId) shr 16) and $F);
  306. end;
  307. function SORTVERSIONFROMLCID(LocaleId: LCID): WORD;
  308. begin
  309. SORTVERSIONFROMLCID := WORD((DWORD(LocaleId) shr 20) and $F);
  310. end;
  311. function LANG_SYSTEM_DEFAULT: WORD;
  312. begin
  313. LANG_SYSTEM_DEFAULT := MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT);
  314. end;
  315. function LANG_USER_DEFAULT: WORD;
  316. begin
  317. LANG_USER_DEFAULT := MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
  318. end;
  319. function LOCALE_USER_DEFAULT: DWORD;
  320. begin
  321. LOCALE_USER_DEFAULT:= MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT);
  322. end;
  323. function LOCALE_SYSTEM_DEFAULT: DWORD;
  324. begin
  325. LOCALE_SYSTEM_DEFAULT:= MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT);
  326. end;
  327. function LOCALE_NEUTRAL: DWORD;
  328. begin
  329. LOCALE_NEUTRAL := MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT);
  330. end;
  331. function LOCALE_INVARIANT: DWORD;
  332. begin
  333. LOCALE_INVARIANT := MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT);
  334. end;
  335. function MsgWaitForMultipleObjects(nCount: DWORD; var pHandles; fWaitAll: BOOL; dwMilliseconds, dwWakeMask: DWORD): DWORD;
  336. begin
  337. MsgWaitForMultipleObjects:=MsgWaitForMultipleObjectsEx(nCount,@pHandles,dwMilliseconds,dwWakeMask,0);
  338. end;
  339. function GetTextExtentPoint32(DC: HDC; Str: LPWSTR; Count: Integer; var Size: TSize): BOOL;
  340. begin
  341. Result:=GetTextExtentExPoint(DC, Str, Count, 0, nil, nil, @Size);
  342. end;
  343. function GetTextExtentPoint32W(DC: HDC; Str: LPWSTR; Count: Integer; var Size: TSize): BOOL;
  344. begin
  345. Result:=GetTextExtentExPoint(DC, Str, Count, 0, nil, nil, @Size);
  346. end;
  347. {$endif read_implementation}