JwaWinBase.pas
资源名称:win32api.zip [点击查看]
上传用户:davidchvip
上传日期:2009-07-28
资源大小:1749k
文件大小:683k
源码类别:
Windows编程
开发平台:
Delphi
- {******************************************************************************}
- { }
- { Windows Base Services API interface Unit for Object Pascal }
- { }
- { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
- { Corporation. All Rights Reserved. }
- { }
- { The original file is: winbase.h, released August 2001. The original Pascal }
- { code is: WinBase.pas, released December 2000. The initial developer of the }
- { Pascal code is Marcel van Brakel (brakelm@chello.nl). }
- { }
- { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
- { Marcel van Brakel. All Rights Reserved. }
- { }
- { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
- { }
- { You may retrieve the latest version of this file at the Project JEDI home }
- { page, located at http://delphi-jedi.org or my personal homepage located at }
- { http://members.chello.nl/m.vanbrakel2 }
- { }
- { The contents of this file are used with permission, subject to the Mozilla }
- { Public License Version 1.1 (the "License"); you may not use this file except }
- { in compliance with the License. You may obtain a copy of the License at }
- { http://www.mozilla.org/MPL/MPL-1.1.html }
- { }
- { Software distributed under the License is distributed on an "AS IS" basis, }
- { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
- { the specific language governing rights and limitations under the License. }
- { }
- { Alternatively, the contents of this file may be used under the terms of the }
- { GNU Lesser General Public License (the "LGPL License"), in which case the }
- { provisions of the LGPL License are applicable instead of those above. }
- { If you wish to allow use of your version of this file only under the terms }
- { of the LGPL License and not to allow others to use your version of this file }
- { under the MPL, indicate your decision by deleting the provisions above and }
- { replace them with the notice and other provisions required by the LGPL }
- { License. If you do not delete the provisions above, a recipient may use }
- { your version of this file under either the MPL or the LGPL License. }
- { }
- { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
- { }
- {******************************************************************************}
- unit JwaWinBase;
- {$WEAKPACKAGEUNIT}
- {$HPPEMIT ''}
- {$HPPEMIT '#include "WinBase.h"'}
- {$HPPEMIT ''}
- {$I WINDEFINES.INC}
- {$STACKFRAMES ON}
- interface
- uses
- {$IFDEF USE_DELPHI_TYPES}Windows,{$ENDIF}
- JwaNtStatus, JwaWinNT, JwaWinType;
- const
- INVALID_HANDLE_VALUE = HANDLE(-1);
- {$EXTERNALSYM INVALID_HANDLE_VALUE}
- INVALID_FILE_SIZE = DWORD($FFFFFFFF);
- {$EXTERNALSYM INVALID_FILE_SIZE}
- INVALID_SET_FILE_POINTER = DWORD(-1);
- {$EXTERNALSYM INVALID_SET_FILE_POINTER}
- INVALID_FILE_ATTRIBUTES = DWORD(-1);
- {$EXTERNALSYM INVALID_FILE_ATTRIBUTES}
- FILE_BEGIN = 0;
- {$EXTERNALSYM FILE_BEGIN}
- FILE_CURRENT = 1;
- {$EXTERNALSYM FILE_CURRENT}
- FILE_END = 2;
- {$EXTERNALSYM FILE_END}
- TIME_ZONE_ID_INVALID = DWORD($FFFFFFFF);
- {$EXTERNALSYM TIME_ZONE_ID_INVALID}
- WAIT_FAILED = DWORD($FFFFFFFF);
- {$EXTERNALSYM WAIT_FAILED}
- WAIT_OBJECT_0 = STATUS_WAIT_0 + 0;
- {$EXTERNALSYM WAIT_OBJECT_0}
- WAIT_ABANDONED = STATUS_ABANDONED_WAIT_0 + 0;
- {$EXTERNALSYM WAIT_ABANDONED}
- WAIT_ABANDONED_0 = STATUS_ABANDONED_WAIT_0 + 0;
- {$EXTERNALSYM WAIT_ABANDONED_0}
- WAIT_IO_COMPLETION = STATUS_USER_APC;
- {$EXTERNALSYM WAIT_IO_COMPLETION}
- STILL_ACTIVE = STATUS_PENDING;
- {$EXTERNALSYM STILL_ACTIVE}
- EXCEPTION_ACCESS_VIOLATION = STATUS_ACCESS_VIOLATION;
- {$EXTERNALSYM EXCEPTION_ACCESS_VIOLATION}
- EXCEPTION_DATATYPE_MISALIGNMENT = STATUS_DATATYPE_MISALIGNMENT;
- {$EXTERNALSYM EXCEPTION_DATATYPE_MISALIGNMENT}
- EXCEPTION_BREAKPOINT = STATUS_BREAKPOINT;
- {$EXTERNALSYM EXCEPTION_BREAKPOINT}
- EXCEPTION_SINGLE_STEP = STATUS_SINGLE_STEP;
- {$EXTERNALSYM EXCEPTION_SINGLE_STEP}
- EXCEPTION_ARRAY_BOUNDS_EXCEEDED = STATUS_ARRAY_BOUNDS_EXCEEDED;
- {$EXTERNALSYM EXCEPTION_ARRAY_BOUNDS_EXCEEDED}
- EXCEPTION_FLT_DENORMAL_OPERAND = STATUS_FLOAT_DENORMAL_OPERAND;
- {$EXTERNALSYM EXCEPTION_FLT_DENORMAL_OPERAND}
- EXCEPTION_FLT_DIVIDE_BY_ZERO = STATUS_FLOAT_DIVIDE_BY_ZERO;
- {$EXTERNALSYM EXCEPTION_FLT_DIVIDE_BY_ZERO}
- EXCEPTION_FLT_INEXACT_RESULT = STATUS_FLOAT_INEXACT_RESULT;
- {$EXTERNALSYM EXCEPTION_FLT_INEXACT_RESULT}
- EXCEPTION_FLT_INVALID_OPERATION = STATUS_FLOAT_INVALID_OPERATION;
- {$EXTERNALSYM EXCEPTION_FLT_INVALID_OPERATION}
- EXCEPTION_FLT_OVERFLOW = STATUS_FLOAT_OVERFLOW;
- {$EXTERNALSYM EXCEPTION_FLT_OVERFLOW}
- EXCEPTION_FLT_STACK_CHECK = STATUS_FLOAT_STACK_CHECK;
- {$EXTERNALSYM EXCEPTION_FLT_STACK_CHECK}
- EXCEPTION_FLT_UNDERFLOW = STATUS_FLOAT_UNDERFLOW;
- {$EXTERNALSYM EXCEPTION_FLT_UNDERFLOW}
- EXCEPTION_INT_DIVIDE_BY_ZERO = STATUS_INTEGER_DIVIDE_BY_ZERO;
- {$EXTERNALSYM EXCEPTION_INT_DIVIDE_BY_ZERO}
- EXCEPTION_INT_OVERFLOW = STATUS_INTEGER_OVERFLOW;
- {$EXTERNALSYM EXCEPTION_INT_OVERFLOW}
- EXCEPTION_PRIV_INSTRUCTION = STATUS_PRIVILEGED_INSTRUCTION;
- {$EXTERNALSYM EXCEPTION_PRIV_INSTRUCTION}
- EXCEPTION_IN_PAGE_ERROR = STATUS_IN_PAGE_ERROR;
- {$EXTERNALSYM EXCEPTION_IN_PAGE_ERROR}
- EXCEPTION_ILLEGAL_INSTRUCTION = STATUS_ILLEGAL_INSTRUCTION;
- {$EXTERNALSYM EXCEPTION_ILLEGAL_INSTRUCTION}
- EXCEPTION_NONCONTINUABLE_EXCEPTION = STATUS_NONCONTINUABLE_EXCEPTION;
- {$EXTERNALSYM EXCEPTION_NONCONTINUABLE_EXCEPTION}
- EXCEPTION_STACK_OVERFLOW = STATUS_STACK_OVERFLOW;
- {$EXTERNALSYM EXCEPTION_STACK_OVERFLOW}
- EXCEPTION_INVALID_DISPOSITION = STATUS_INVALID_DISPOSITION;
- {$EXTERNALSYM EXCEPTION_INVALID_DISPOSITION}
- EXCEPTION_GUARD_PAGE = STATUS_GUARD_PAGE_VIOLATION;
- {$EXTERNALSYM EXCEPTION_GUARD_PAGE}
- EXCEPTION_INVALID_HANDLE = STATUS_INVALID_HANDLE;
- {$EXTERNALSYM EXCEPTION_INVALID_HANDLE}
- CONTROL_C_EXIT = STATUS_CONTROL_C_EXIT;
- {$EXTERNALSYM CONTROL_C_EXIT}
- procedure MoveMemory(Destination, Source: PVOID; Length: SIZE_T);
- {$EXTERNALSYM MoveMemory}
- procedure CopyMemory(Destination, Source: PVOID; Length: SIZE_T);
- {$EXTERNALSYM CopyMemory}
- procedure FillMemory(Destination: PVOID; Length: SIZE_T; Fill: BYTE);
- {$EXTERNALSYM FillMemory}
- procedure ZeroMemory(Destination: PVOID; Length: SIZE_T);
- {$EXTERNALSYM ZeroMemory}
- //#define SecureZeroMemory RtlSecureZeroMemory TODO
- //
- // File creation flags must start at the high end since they
- // are combined with the attributes
- //
- const
- FILE_FLAG_WRITE_THROUGH = DWORD($80000000);
- {$EXTERNALSYM FILE_FLAG_WRITE_THROUGH}
- FILE_FLAG_OVERLAPPED = $40000000;
- {$EXTERNALSYM FILE_FLAG_OVERLAPPED}
- FILE_FLAG_NO_BUFFERING = $20000000;
- {$EXTERNALSYM FILE_FLAG_NO_BUFFERING}
- FILE_FLAG_RANDOM_ACCESS = $10000000;
- {$EXTERNALSYM FILE_FLAG_RANDOM_ACCESS}
- FILE_FLAG_SEQUENTIAL_SCAN = $08000000;
- {$EXTERNALSYM FILE_FLAG_SEQUENTIAL_SCAN}
- FILE_FLAG_DELETE_ON_CLOSE = $04000000;
- {$EXTERNALSYM FILE_FLAG_DELETE_ON_CLOSE}
- FILE_FLAG_BACKUP_SEMANTICS = $02000000;
- {$EXTERNALSYM FILE_FLAG_BACKUP_SEMANTICS}
- FILE_FLAG_POSIX_SEMANTICS = $01000000;
- {$EXTERNALSYM FILE_FLAG_POSIX_SEMANTICS}
- FILE_FLAG_OPEN_REPARSE_POINT = $00200000;
- {$EXTERNALSYM FILE_FLAG_OPEN_REPARSE_POINT}
- FILE_FLAG_OPEN_NO_RECALL = $00100000;
- {$EXTERNALSYM FILE_FLAG_OPEN_NO_RECALL}
- FILE_FLAG_FIRST_PIPE_INSTANCE = $00080000;
- {$EXTERNALSYM FILE_FLAG_FIRST_PIPE_INSTANCE}
- CREATE_NEW = 1;
- {$EXTERNALSYM CREATE_NEW}
- CREATE_ALWAYS = 2;
- {$EXTERNALSYM CREATE_ALWAYS}
- OPEN_EXISTING = 3;
- {$EXTERNALSYM OPEN_EXISTING}
- OPEN_ALWAYS = 4;
- {$EXTERNALSYM OPEN_ALWAYS}
- TRUNCATE_EXISTING = 5;
- {$EXTERNALSYM TRUNCATE_EXISTING}
- //
- // Define possible return codes from the CopyFileEx callback routine
- //
- PROGRESS_CONTINUE = 0;
- {$EXTERNALSYM PROGRESS_CONTINUE}
- PROGRESS_CANCEL = 1;
- {$EXTERNALSYM PROGRESS_CANCEL}
- PROGRESS_STOP = 2;
- {$EXTERNALSYM PROGRESS_STOP}
- PROGRESS_QUIET = 3;
- {$EXTERNALSYM PROGRESS_QUIET}
- //
- // Define CopyFileEx callback routine state change values
- //
- CALLBACK_CHUNK_FINISHED = $00000000;
- {$EXTERNALSYM CALLBACK_CHUNK_FINISHED}
- CALLBACK_STREAM_SWITCH = $00000001;
- {$EXTERNALSYM CALLBACK_STREAM_SWITCH}
- //
- // Define CopyFileEx option flags
- //
- COPY_FILE_FAIL_IF_EXISTS = $00000001;
- {$EXTERNALSYM COPY_FILE_FAIL_IF_EXISTS}
- COPY_FILE_RESTARTABLE = $00000002;
- {$EXTERNALSYM COPY_FILE_RESTARTABLE}
- COPY_FILE_OPEN_SOURCE_FOR_WRITE = $00000004;
- {$EXTERNALSYM COPY_FILE_OPEN_SOURCE_FOR_WRITE}
- COPY_FILE_ALLOW_DECRYPTED_DESTINATION = $00000008;
- {$EXTERNALSYM COPY_FILE_ALLOW_DECRYPTED_DESTINATION}
- //
- // Define ReplaceFile option flags
- //
- REPLACEFILE_WRITE_THROUGH = $00000001;
- {$EXTERNALSYM REPLACEFILE_WRITE_THROUGH}
- REPLACEFILE_IGNORE_MERGE_ERRORS = $00000002;
- {$EXTERNALSYM REPLACEFILE_IGNORE_MERGE_ERRORS}
- //
- // Define the NamedPipe definitions
- //
- //
- // Define the dwOpenMode values for CreateNamedPipe
- //
- PIPE_ACCESS_INBOUND = $00000001;
- {$EXTERNALSYM PIPE_ACCESS_INBOUND}
- PIPE_ACCESS_OUTBOUND = $00000002;
- {$EXTERNALSYM PIPE_ACCESS_OUTBOUND}
- PIPE_ACCESS_DUPLEX = $00000003;
- {$EXTERNALSYM PIPE_ACCESS_DUPLEX}
- //
- // Define the Named Pipe End flags for GetNamedPipeInfo
- //
- PIPE_CLIENT_END = $00000000;
- {$EXTERNALSYM PIPE_CLIENT_END}
- PIPE_SERVER_END = $00000001;
- {$EXTERNALSYM PIPE_SERVER_END}
- //
- // Define the dwPipeMode values for CreateNamedPipe
- //
- PIPE_WAIT = $00000000;
- {$EXTERNALSYM PIPE_WAIT}
- PIPE_NOWAIT = $00000001;
- {$EXTERNALSYM PIPE_NOWAIT}
- PIPE_READMODE_BYTE = $00000000;
- {$EXTERNALSYM PIPE_READMODE_BYTE}
- PIPE_READMODE_MESSAGE = $00000002;
- {$EXTERNALSYM PIPE_READMODE_MESSAGE}
- PIPE_TYPE_BYTE = $00000000;
- {$EXTERNALSYM PIPE_TYPE_BYTE}
- PIPE_TYPE_MESSAGE = $00000004;
- {$EXTERNALSYM PIPE_TYPE_MESSAGE}
- //
- // Define the well known values for CreateNamedPipe nMaxInstances
- //
- PIPE_UNLIMITED_INSTANCES = 255;
- {$EXTERNALSYM PIPE_UNLIMITED_INSTANCES}
- //
- // Define the Security Quality of Service bits to be passed
- // into CreateFile
- //
- SECURITY_ANONYMOUS = (Ord(SecurityAnonymous) shl 16);
- {$EXTERNALSYM SECURITY_ANONYMOUS}
- SECURITY_IDENTIFICATION = (Ord(SecurityIdentification) shl 16);
- {$EXTERNALSYM SECURITY_IDENTIFICATION}
- SECURITY_IMPERSONATION = (Ord(SecurityImpersonation) shl 16);
- {$EXTERNALSYM SECURITY_IMPERSONATION}
- SECURITY_DELEGATION = (Ord(SecurityDelegation) shl 16);
- {$EXTERNALSYM SECURITY_DELEGATION}
- SECURITY_CONTEXT_TRACKING = $00040000;
- {$EXTERNALSYM SECURITY_CONTEXT_TRACKING}
- SECURITY_EFFECTIVE_ONLY = $00080000;
- {$EXTERNALSYM SECURITY_EFFECTIVE_ONLY}
- SECURITY_SQOS_PRESENT = $00100000;
- {$EXTERNALSYM SECURITY_SQOS_PRESENT}
- SECURITY_VALID_SQOS_FLAGS = $001F0000;
- {$EXTERNALSYM SECURITY_VALID_SQOS_FLAGS}
- //
- // File structures
- //
- type
- LPOVERLAPPED = ^OVERLAPPED;
- {$EXTERNALSYM LPOVERLAPPED}
- _OVERLAPPED = record
- Internal: ULONG_PTR;
- InternalHigh: ULONG_PTR;
- Union: record
- case Integer of
- 0: (
- Offset: DWORD;
- OffsetHigh: DWORD);
- 1: (
- Pointer: PVOID);
- end;
- hEvent: HANDLE;
- end;
- {$EXTERNALSYM _OVERLAPPED}
- OVERLAPPED = _OVERLAPPED;
- {$EXTERNALSYM OVERLAPPED}
- TOverlapped = OVERLAPPED;
- POverlapped = LPOVERLAPPED;
- PSECURITY_ATTRIBUTES = ^SECURITY_ATTRIBUTES;
- {$EXTERNALSYM PSECURITY_ATTRIBUTES}
- _SECURITY_ATTRIBUTES = record
- nLength: DWORD;
- lpSecurityDescriptor: LPVOID;
- bInheritHandle: BOOL;
- end;
- {$EXTERNALSYM _SECURITY_ATTRIBUTES}
- SECURITY_ATTRIBUTES = _SECURITY_ATTRIBUTES;
- {$EXTERNALSYM SECURITY_ATTRIBUTES}
- LPSECURITY_ATTRIBUTES = ^SECURITY_ATTRIBUTES;
- {$EXTERNALSYM LPSECURITY_ATTRIBUTES}
- TSecurityAttributes = SECURITY_ATTRIBUTES;
- PSecurityAttributes = PSECURITY_ATTRIBUTES;
- PPROCESS_INFORMATION = ^PROCESS_INFORMATION;
- {$EXTERNALSYM PPROCESS_INFORMATION}
- _PROCESS_INFORMATION = record
- hProcess: HANDLE;
- hThread: HANDLE;
- dwProcessId: DWORD;
- dwThreadId: DWORD;
- end;
- {$EXTERNALSYM _PROCESS_INFORMATION}
- PROCESS_INFORMATION = _PROCESS_INFORMATION;
- {$EXTERNALSYM PROCESS_INFORMATION}
- LPPROCESS_INFORMATION = ^PROCESS_INFORMATION;
- {$EXTERNALSYM LPPROCESS_INFORMATION}
- TProcessInformation = PROCESS_INFORMATION;
- PProcessInformation = PPROCESS_INFORMATION;
- //
- // File System time stamps are represented with the following structure:
- //
- {$IFNDEF _FILETIME_}
- {$DEFINE _FILETIME_}
- LPFILETIME = ^FILETIME;
- {$EXTERNALSYM LPFILETIME}
- _FILETIME = record
- dwLowDateTime: DWORD;
- dwHighDateTime: DWORD;
- end;
- {$EXTERNALSYM _FILETIME}
- FILETIME = _FILETIME;
- {$EXTERNALSYM FILETIME}
- TFileTime = FILETIME;
- PFileTime = LPFILETIME;
- {$ENDIF}
- //
- // System time is represented with the following structure:
- //
- LPSYSTEMTIME = ^SYSTEMTIME;
- {$EXTERNALSYM LPSYSTEMTIME}
- {$IFDEF USE_DELPHI_TYPES}
- _SYSTEMTIME = Windows._SYSTEMTIME;
- SYSTEMTIME = Windows.SYSTEMTIME;
- TSystemTime = Windows.TSystemTime;
- PSystemtime = Windows.PSystemTime;
- {$ELSE}
- _SYSTEMTIME = record
- wYear: Word;
- wMonth: Word;
- wDayOfWeek: Word;
- wDay: Word;
- wHour: Word;
- wMinute: Word;
- wSecond: Word;
- wMilliseconds: Word;
- end;
- {$EXTERNALSYM _SYSTEMTIME}
- SYSTEMTIME = _SYSTEMTIME;
- {$EXTERNALSYM SYSTEMTIME}
- TSystemTime = SYSTEMTIME;
- PSystemTime = LPSYSTEMTIME;
- {$ENDIF}
- PTHREAD_START_ROUTINE = function (lpThreadParameter: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM PTHREAD_START_ROUTINE}
- LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE;
- {$EXTERNALSYM LPTHREAD_START_ROUTINE}
- TThreadStartRoutine = PTHREAD_START_ROUTINE;
- PFIBER_START_ROUTINE = procedure (lpFiberParameter: LPVOID); stdcall;
- {$EXTERNALSYM PFIBER_START_ROUTINE}
- LPFIBER_START_ROUTINE = PFIBER_START_ROUTINE;
- {$EXTERNALSYM LPFIBER_START_ROUTINE}
- TFiberStartRoutine = PFIBER_START_ROUTINE;
- CRITICAL_SECTION = RTL_CRITICAL_SECTION;
- {$EXTERNALSYM CRITICAL_SECTION}
- PCRITICAL_SECTION = PRTL_CRITICAL_SECTION;
- {$EXTERNALSYM PCRITICAL_SECTION}
- LPCRITICAL_SECTION = PRTL_CRITICAL_SECTION;
- {$EXTERNALSYM LPCRITICAL_SECTION}
- TCriticalSection = CRITICAL_SECTION;
- PCriticalSection = PCRITICAL_SECTION;
- CRITICAL_SECTION_DEBUG = RTL_CRITICAL_SECTION_DEBUG;
- {$EXTERNALSYM CRITICAL_SECTION_DEBUG}
- PCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG;
- {$EXTERNALSYM PCRITICAL_SECTION_DEBUG}
- LPCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG;
- {$EXTERNALSYM LPCRITICAL_SECTION_DEBUG}
- TCriticalSectionDebug = CRITICAL_SECTION_DEBUG;
- PCriticalSectionDebug = PCRITICAL_SECTION_DEBUG;
- LPLDT_ENTRY = PLDT_ENTRY;
- {$EXTERNALSYM LPLDT_ENTRY}
- PLdtEntry = LPLDT_ENTRY;
- const
- MUTEX_MODIFY_STATE = MUTANT_QUERY_STATE;
- {$EXTERNALSYM MUTEX_MODIFY_STATE}
- MUTEX_ALL_ACCESS = MUTANT_ALL_ACCESS;
- {$EXTERNALSYM MUTEX_ALL_ACCESS}
- //
- // Serial provider type.
- //
- SP_SERIALCOMM = DWORD($00000001);
- {$EXTERNALSYM SP_SERIALCOMM}
- //
- // Provider SubTypes
- //
- PST_UNSPECIFIED = DWORD($00000000);
- {$EXTERNALSYM PST_UNSPECIFIED}
- PST_RS232 = DWORD($00000001);
- {$EXTERNALSYM PST_RS232}
- PST_PARALLELPORT = DWORD($00000002);
- {$EXTERNALSYM PST_PARALLELPORT}
- PST_RS422 = DWORD($00000003);
- {$EXTERNALSYM PST_RS422}
- PST_RS423 = DWORD($00000004);
- {$EXTERNALSYM PST_RS423}
- PST_RS449 = DWORD($00000005);
- {$EXTERNALSYM PST_RS449}
- PST_MODEM = DWORD($00000006);
- {$EXTERNALSYM PST_MODEM}
- PST_FAX = DWORD($00000021);
- {$EXTERNALSYM PST_FAX}
- PST_SCANNER = DWORD($00000022);
- {$EXTERNALSYM PST_SCANNER}
- PST_NETWORK_BRIDGE = DWORD($00000100);
- {$EXTERNALSYM PST_NETWORK_BRIDGE}
- PST_LAT = DWORD($00000101);
- {$EXTERNALSYM PST_LAT}
- PST_TCPIP_TELNET = DWORD($00000102);
- {$EXTERNALSYM PST_TCPIP_TELNET}
- PST_X25 = DWORD($00000103);
- {$EXTERNALSYM PST_X25}
- //
- // Provider capabilities flags.
- //
- PCF_DTRDSR = DWORD($0001);
- {$EXTERNALSYM PCF_DTRDSR}
- PCF_RTSCTS = DWORD($0002);
- {$EXTERNALSYM PCF_RTSCTS}
- PCF_RLSD = DWORD($0004);
- {$EXTERNALSYM PCF_RLSD}
- PCF_PARITY_CHECK = DWORD($0008);
- {$EXTERNALSYM PCF_PARITY_CHECK}
- PCF_XONXOFF = DWORD($0010);
- {$EXTERNALSYM PCF_XONXOFF}
- PCF_SETXCHAR = DWORD($0020);
- {$EXTERNALSYM PCF_SETXCHAR}
- PCF_TOTALTIMEOUTS = DWORD($0040);
- {$EXTERNALSYM PCF_TOTALTIMEOUTS}
- PCF_INTTIMEOUTS = DWORD($0080);
- {$EXTERNALSYM PCF_INTTIMEOUTS}
- PCF_SPECIALCHARS = DWORD($0100);
- {$EXTERNALSYM PCF_SPECIALCHARS}
- PCF_16BITMODE = DWORD($0200);
- {$EXTERNALSYM PCF_16BITMODE}
- //
- // Comm provider settable parameters.
- //
- SP_PARITY = DWORD($0001);
- {$EXTERNALSYM SP_PARITY}
- SP_BAUD = DWORD($0002);
- {$EXTERNALSYM SP_BAUD}
- SP_DATABITS = DWORD($0004);
- {$EXTERNALSYM SP_DATABITS}
- SP_STOPBITS = DWORD($0008);
- {$EXTERNALSYM SP_STOPBITS}
- SP_HANDSHAKING = DWORD($0010);
- {$EXTERNALSYM SP_HANDSHAKING}
- SP_PARITY_CHECK = DWORD($0020);
- {$EXTERNALSYM SP_PARITY_CHECK}
- SP_RLSD = DWORD($0040);
- {$EXTERNALSYM SP_RLSD}
- //
- // Settable baud rates in the provider.
- //
- BAUD_075 = DWORD($00000001);
- {$EXTERNALSYM BAUD_075}
- BAUD_110 = DWORD($00000002);
- {$EXTERNALSYM BAUD_110}
- BAUD_134_5 = DWORD($00000004);
- {$EXTERNALSYM BAUD_134_5}
- BAUD_150 = DWORD($00000008);
- {$EXTERNALSYM BAUD_150}
- BAUD_300 = DWORD($00000010);
- {$EXTERNALSYM BAUD_300}
- BAUD_600 = DWORD($00000020);
- {$EXTERNALSYM BAUD_600}
- BAUD_1200 = DWORD($00000040);
- {$EXTERNALSYM BAUD_1200}
- BAUD_1800 = DWORD($00000080);
- {$EXTERNALSYM BAUD_1800}
- BAUD_2400 = DWORD($00000100);
- {$EXTERNALSYM BAUD_2400}
- BAUD_4800 = DWORD($00000200);
- {$EXTERNALSYM BAUD_4800}
- BAUD_7200 = DWORD($00000400);
- {$EXTERNALSYM BAUD_7200}
- BAUD_9600 = DWORD($00000800);
- {$EXTERNALSYM BAUD_9600}
- BAUD_14400 = DWORD($00001000);
- {$EXTERNALSYM BAUD_14400}
- BAUD_19200 = DWORD($00002000);
- {$EXTERNALSYM BAUD_19200}
- BAUD_38400 = DWORD($00004000);
- {$EXTERNALSYM BAUD_38400}
- BAUD_56K = DWORD($00008000);
- {$EXTERNALSYM BAUD_56K}
- BAUD_128K = DWORD($00010000);
- {$EXTERNALSYM BAUD_128K}
- BAUD_115200 = DWORD($00020000);
- {$EXTERNALSYM BAUD_115200}
- BAUD_57600 = DWORD($00040000);
- {$EXTERNALSYM BAUD_57600}
- BAUD_USER = DWORD($10000000);
- {$EXTERNALSYM BAUD_USER}
- //
- // Settable Data Bits
- //
- DATABITS_5 = WORD($0001);
- {$EXTERNALSYM DATABITS_5}
- DATABITS_6 = WORD($0002);
- {$EXTERNALSYM DATABITS_6}
- DATABITS_7 = WORD($0004);
- {$EXTERNALSYM DATABITS_7}
- DATABITS_8 = WORD($0008);
- {$EXTERNALSYM DATABITS_8}
- DATABITS_16 = WORD($0010);
- {$EXTERNALSYM DATABITS_16}
- DATABITS_16X = WORD($0020);
- {$EXTERNALSYM DATABITS_16X}
- //
- // Settable Stop and Parity bits.
- //
- STOPBITS_10 = WORD($0001);
- {$EXTERNALSYM STOPBITS_10}
- STOPBITS_15 = WORD($0002);
- {$EXTERNALSYM STOPBITS_15}
- STOPBITS_20 = WORD($0004);
- {$EXTERNALSYM STOPBITS_20}
- PARITY_NONE = WORD($0100);
- {$EXTERNALSYM PARITY_NONE}
- PARITY_ODD = WORD($0200);
- {$EXTERNALSYM PARITY_ODD}
- PARITY_EVEN = WORD($0400);
- {$EXTERNALSYM PARITY_EVEN}
- PARITY_MARK = WORD($0800);
- {$EXTERNALSYM PARITY_MARK}
- PARITY_SPACE = WORD($1000);
- {$EXTERNALSYM PARITY_SPACE}
- type
- LPCOMMPROP = ^COMMPROP;
- {$EXTERNALSYM LPCOMMPROP}
- _COMMPROP = record
- wPacketLength: Word;
- wPacketVersion: Word;
- dwServiceMask: DWORD;
- dwReserved1: DWORD;
- dwMaxTxQueue: DWORD;
- dwMaxRxQueue: DWORD;
- dwMaxBaud: DWORD;
- dwProvSubType: DWORD;
- dwProvCapabilities: DWORD;
- dwSettableParams: DWORD;
- dwSettableBaud: DWORD;
- wSettableData: Word;
- wSettableStopParity: Word;
- dwCurrentTxQueue: DWORD;
- dwCurrentRxQueue: DWORD;
- dwProvSpec1: DWORD;
- dwProvSpec2: DWORD;
- wcProvChar: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM _COMMPROP}
- COMMPROP = _COMMPROP;
- {$EXTERNALSYM COMMPROP}
- TCommProp = COMMPROP;
- PCommProp = LPCOMMPROP;
- //
- // Set dwProvSpec1 to COMMPROP_INITIALIZED to indicate that wPacketLength
- // is valid before a call to GetCommProperties().
- //
- const
- COMMPROP_INITIALIZED = DWORD($E73CF52E);
- {$EXTERNALSYM COMMPROP_INITIALIZED}
- //_COMSTAT Flags (bitfield)
- COMSTAT_CTS_HOLD = 1 shl 0;
- COMSTAT_DSR_HOLD = 1 shl 1;
- COMSTAT_RLSD_HOLD = 1 shl 2;
- COMSTAT_XOFF_HOLD = 1 shl 3;
- COMSTAT_XOFF_SENT = 1 shl 4;
- COMSTAT_F_EOF = 1 shl 5;
- COMSTAT_F_TXIM = 1 shl 6;
- type
- LPCOMSTAT = ^COMSTAT;
- {$EXTERNALSYM LPCOMSTAT}
- _COMSTAT = record
- Flags: DWORD;
- cbInQue: DWORD;
- cbOutQue: DWORD;
- end;
- {$EXTERNALSYM _COMSTAT}
- COMSTAT = _COMSTAT;
- {$EXTERNALSYM COMSTAT}
- TComstat = COMSTAT;
- PComstat = LPCOMSTAT;
- //
- // DTR Control Flow Values.
- //
- const
- DTR_CONTROL_DISABLE = $00;
- {$EXTERNALSYM DTR_CONTROL_DISABLE}
- DTR_CONTROL_ENABLE = $01;
- {$EXTERNALSYM DTR_CONTROL_ENABLE}
- DTR_CONTROL_HANDSHAKE = $02;
- {$EXTERNALSYM DTR_CONTROL_HANDSHAKE}
- //
- // RTS Control Flow Values
- //
- RTS_CONTROL_DISABLE = $00;
- {$EXTERNALSYM RTS_CONTROL_DISABLE}
- RTS_CONTROL_ENABLE = $01;
- {$EXTERNALSYM RTS_CONTROL_ENABLE}
- RTS_CONTROL_HANDSHAKE = $02;
- {$EXTERNALSYM RTS_CONTROL_HANDSHAKE}
- RTS_CONTROL_TOGGLE = $03;
- {$EXTERNALSYM RTS_CONTROL_TOGGLE}
- // _DCB.Flags
- const
- fDcbBinary = 1 shl 0; // Binary Mode (skip EOF check)
- fDcbParity = 1 shl 1; // Enable parity checking
- fDcbOutxCtsFlow = 1 shl 2; // CTS handshaking on output
- fDcbOutxDsrFlow = 1 shl 3; // DSR handshaking on output
- fDcbDtrControl = $0030; // DTR Flow control
- fDcbDsrSensitivity = 1 shl 6; // DSR Sensitivity
- fDcbTXContinueOnXoff = 1 shl 7; // Continue TX when Xoff sent
- fDcbOutX = 1 shl 8; // Enable output X-ON/X-OFF
- fDcbInX = 1 shl 9; // Enable input X-ON/X-OFF
- fDcbErrorChar = 1 shl 10; // Enable Err Replacement
- fDcbNull = 1 shl 11; // Enable Null stripping
- fDcbRtsControl = $3000; // Rts Flow control
- fAbortOnError = 1 shl 14; // Abort all reads and writes on Error
- type
- LPDCB = ^DCB;
- {$EXTERNALSYM LPDCB}
- _DCB = record
- DCBlength: DWORD; // sizeof(DCB)
- BaudRate: DWORD; // Baudrate at which running
- Flags: DWORD; // See constants above
- wReserved: WORD; // Not currently used
- XonLim: WORD; // Transmit X-ON threshold
- XoffLim: WORD; // Transmit X-OFF threshold
- ByteSize: BYTE; // Number of bits/byte, 4-8
- Parity: BYTE; // 0-4=None,Odd,Even,Mark,Space
- StopBits: BYTE; // 0,1,2 = 1, 1.5, 2
- XonChar: Char; // Tx and Rx X-ON character
- XoffChar: Char; // Tx and Rx X-OFF character
- ErrorChar: Char; // Error replacement char
- EofChar: Char; // End of Input character
- EvtChar: Char; // Received Event character
- wReserved1: WORD; // Fill for now.
- end;
- {$EXTERNALSYM _DCB}
- DCB = _DCB;
- {$EXTERNALSYM DCB}
- TDCB = DCB;
- PDCB = LPDCB;
- LPCOMMTIMEOUTS = ^COMMTIMEOUTS;
- {$EXTERNALSYM LPCOMMTIMEOUTS}
- _COMMTIMEOUTS = record
- ReadIntervalTimeout: DWORD; // Maximum time between read chars.
- ReadTotalTimeoutMultiplier: DWORD; // Multiplier of characters.
- ReadTotalTimeoutConstant: DWORD; // Constant in milliseconds.
- WriteTotalTimeoutMultiplier: DWORD; // Multiplier of characters.
- WriteTotalTimeoutConstant: DWORD; // Constant in milliseconds.
- end;
- {$EXTERNALSYM _COMMTIMEOUTS}
- COMMTIMEOUTS = _COMMTIMEOUTS;
- {$EXTERNALSYM COMMTIMEOUTS}
- TCommTimeouts = COMMTIMEOUTS;
- PCommTimeouts = LPCOMMTIMEOUTS;
- LPCOMMCONFIG = ^COMMCONFIG;
- {$EXTERNALSYM LPCOMMCONFIG}
- _COMMCONFIG = record
- dwSize: DWORD; // Size of the entire struct
- wVersion: Word; // version of the structure
- wReserved: Word; // alignment
- dcb: DCB; // device control block
- dwProviderSubType: DWORD; // ordinal value for identifying
- // provider-defined data structure format
- dwProviderOffset: DWORD; // Specifies the offset of provider specific
- // data field in bytes from the start
- dwProviderSize: DWORD; // size of the provider-specific data field
- wcProviderData: array [0..0] of WCHAR; // provider-specific data
- end;
- {$EXTERNALSYM _COMMCONFIG}
- COMMCONFIG = _COMMCONFIG;
- {$EXTERNALSYM COMMCONFIG}
- TCommConfig = COMMCONFIG;
- PCommConfig = LPCOMMCONFIG;
- LPSYSTEM_INFO = ^SYSTEM_INFO;
- {$EXTERNALSYM LPSYSTEM_INFO}
- _SYSTEM_INFO = record
- case Integer of
- 0: (
- dwOemId: DWORD); // absolete, do not use
- 1: (
- wProcessorArchitecture: WORD;
- wReserved: WORD;
- dwPageSize: DWORD;
- lpMinimumApplicationAddress: LPVOID;
- lpMaximumApplicationAddress: LPVOID;
- dwActiveProcessorMask: DWORD_PTR;
- dwNumberOfProcessors: DWORD;
- dwProcessorType: DWORD;
- dwAllocationGranularity: DWORD;
- wProcessorLevel: WORD;
- wProcessorRevision: WORD);
- end;
- {$EXTERNALSYM _SYSTEM_INFO}
- SYSTEM_INFO = _SYSTEM_INFO;
- {$EXTERNALSYM SYSTEM_INFO}
- TSystemInfo = SYSTEM_INFO;
- PSystemInfo = LPSYSTEM_INFO;
- //
- //
- function FreeModule(hLibModule: HMODULE): BOOL;
- {$EXTERNALSYM FreeModule}
- function MakeProcInstance(lpProc: FARPROC; hInstance: HINSTANCE): FARPROC;
- {$EXTERNALSYM MakeProcInstance}
- procedure FreeProcInstance(lpProc: FARPROC);
- {$EXTERNALSYM FreeProcInstance}
- // Global Memory Flags
- const
- GMEM_FIXED = $0000;
- {$EXTERNALSYM GMEM_FIXED}
- GMEM_MOVEABLE = $0002;
- {$EXTERNALSYM GMEM_MOVEABLE}
- GMEM_NOCOMPACT = $0010;
- {$EXTERNALSYM GMEM_NOCOMPACT}
- GMEM_NODISCARD = $0020;
- {$EXTERNALSYM GMEM_NODISCARD}
- GMEM_ZEROINIT = $0040;
- {$EXTERNALSYM GMEM_ZEROINIT}
- GMEM_MODIFY = $0080;
- {$EXTERNALSYM GMEM_MODIFY}
- GMEM_DISCARDABLE = $0100;
- {$EXTERNALSYM GMEM_DISCARDABLE}
- GMEM_NOT_BANKED = $1000;
- {$EXTERNALSYM GMEM_NOT_BANKED}
- GMEM_SHARE = $2000;
- {$EXTERNALSYM GMEM_SHARE}
- GMEM_DDESHARE = $2000;
- {$EXTERNALSYM GMEM_DDESHARE}
- GMEM_NOTIFY = $4000;
- {$EXTERNALSYM GMEM_NOTIFY}
- GMEM_LOWER = GMEM_NOT_BANKED;
- {$EXTERNALSYM GMEM_LOWER}
- GMEM_VALID_FLAGS = $7F72;
- {$EXTERNALSYM GMEM_VALID_FLAGS}
- GMEM_INVALID_HANDLE = $8000;
- {$EXTERNALSYM GMEM_INVALID_HANDLE}
- GHND = (GMEM_MOVEABLE or GMEM_ZEROINIT);
- {$EXTERNALSYM GHND}
- GPTR = (GMEM_FIXED or GMEM_ZEROINIT);
- {$EXTERNALSYM GPTR}
- function GlobalLRUNewest(h: HANDLE): HANDLE;
- {$EXTERNALSYM GlobalLRUNewest}
- function GlobalLRUOldest(h: HANDLE): HANDLE;
- {$EXTERNALSYM GlobalLRUOldest}
- function GlobalDiscard(h: HANDLE): HANDLE;
- {$EXTERNALSYM GlobalDiscard}
- // Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE)
- const
- GMEM_DISCARDED = $4000;
- {$EXTERNALSYM GMEM_DISCARDED}
- GMEM_LOCKCOUNT = $00FF;
- {$EXTERNALSYM GMEM_LOCKCOUNT}
- type
- LPMEMORYSTATUS = ^MEMORYSTATUS;
- {$EXTERNALSYM LPMEMORYSTATUS}
- _MEMORYSTATUS = record
- dwLength: DWORD;
- dwMemoryLoad: DWORD;
- dwTotalPhys: SIZE_T;
- dwAvailPhys: SIZE_T;
- dwTotalPageFile: SIZE_T;
- dwAvailPageFile: SIZE_T;
- dwTotalVirtual: SIZE_T;
- dwAvailVirtual: SIZE_T;
- end;
- {$EXTERNALSYM _MEMORYSTATUS}
- MEMORYSTATUS = _MEMORYSTATUS;
- {$EXTERNALSYM MEMORYSTATUS}
- TMemoryStatus = MEMORYSTATUS;
- PMemoryStatus = LPMEMORYSTATUS;
- // Local Memory Flags
- const
- LMEM_FIXED = $0000;
- {$EXTERNALSYM LMEM_FIXED}
- LMEM_MOVEABLE = $0002;
- {$EXTERNALSYM LMEM_MOVEABLE}
- LMEM_NOCOMPACT = $0010;
- {$EXTERNALSYM LMEM_NOCOMPACT}
- LMEM_NODISCARD = $0020;
- {$EXTERNALSYM LMEM_NODISCARD}
- LMEM_ZEROINIT = $0040;
- {$EXTERNALSYM LMEM_ZEROINIT}
- LMEM_MODIFY = $0080;
- {$EXTERNALSYM LMEM_MODIFY}
- LMEM_DISCARDABLE = $0F00;
- {$EXTERNALSYM LMEM_DISCARDABLE}
- LMEM_VALID_FLAGS = $0F72;
- {$EXTERNALSYM LMEM_VALID_FLAGS}
- LMEM_INVALID_HANDLE = $8000;
- {$EXTERNALSYM LMEM_INVALID_HANDLE}
- LHND = (LMEM_MOVEABLE or LMEM_ZEROINIT);
- {$EXTERNALSYM LHND}
- LPTR = (LMEM_FIXED or LMEM_ZEROINIT);
- {$EXTERNALSYM LPTR}
- NONZEROLHND = (LMEM_MOVEABLE);
- {$EXTERNALSYM NONZEROLHND}
- NONZEROLPTR = (LMEM_FIXED);
- {$EXTERNALSYM NONZEROLPTR}
- function LocalDiscard(h: HLOCAL): HLOCAL;
- {$EXTERNALSYM LocalDiscard}
- // Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE)
- const
- LMEM_DISCARDED = $4000;
- {$EXTERNALSYM LMEM_DISCARDED}
- LMEM_LOCKCOUNT = $00FF;
- {$EXTERNALSYM LMEM_LOCKCOUNT}
- //
- // dwCreationFlag values
- //
- DEBUG_PROCESS = $00000001;
- {$EXTERNALSYM DEBUG_PROCESS}
- DEBUG_ONLY_THIS_PROCESS = $00000002;
- {$EXTERNALSYM DEBUG_ONLY_THIS_PROCESS}
- CREATE_SUSPENDED = $00000004;
- {$EXTERNALSYM CREATE_SUSPENDED}
- DETACHED_PROCESS = $00000008;
- {$EXTERNALSYM DETACHED_PROCESS}
- CREATE_NEW_CONSOLE = $00000010;
- {$EXTERNALSYM CREATE_NEW_CONSOLE}
- NORMAL_PRIORITY_CLASS = $00000020;
- {$EXTERNALSYM NORMAL_PRIORITY_CLASS}
- IDLE_PRIORITY_CLASS = $00000040;
- {$EXTERNALSYM IDLE_PRIORITY_CLASS}
- HIGH_PRIORITY_CLASS = $00000080;
- {$EXTERNALSYM HIGH_PRIORITY_CLASS}
- REALTIME_PRIORITY_CLASS = $00000100;
- {$EXTERNALSYM REALTIME_PRIORITY_CLASS}
- CREATE_NEW_PROCESS_GROUP = $00000200;
- {$EXTERNALSYM CREATE_NEW_PROCESS_GROUP}
- CREATE_UNICODE_ENVIRONMENT = $00000400;
- {$EXTERNALSYM CREATE_UNICODE_ENVIRONMENT}
- CREATE_SEPARATE_WOW_VDM = $00000800;
- {$EXTERNALSYM CREATE_SEPARATE_WOW_VDM}
- CREATE_SHARED_WOW_VDM = $00001000;
- {$EXTERNALSYM CREATE_SHARED_WOW_VDM}
- CREATE_FORCEDOS = $00002000;
- {$EXTERNALSYM CREATE_FORCEDOS}
- BELOW_NORMAL_PRIORITY_CLASS = $00004000;
- {$EXTERNALSYM BELOW_NORMAL_PRIORITY_CLASS}
- ABOVE_NORMAL_PRIORITY_CLASS = $00008000;
- {$EXTERNALSYM ABOVE_NORMAL_PRIORITY_CLASS}
- STACK_SIZE_PARAM_IS_A_RESERVATION = $00010000;
- {$EXTERNALSYM STACK_SIZE_PARAM_IS_A_RESERVATION}
- CREATE_BREAKAWAY_FROM_JOB = $01000000;
- {$EXTERNALSYM CREATE_BREAKAWAY_FROM_JOB}
- CREATE_PRESERVE_CODE_AUTHZ_LEVEL = $02000000;
- {$EXTERNALSYM CREATE_PRESERVE_CODE_AUTHZ_LEVEL}
- CREATE_DEFAULT_ERROR_MODE = $04000000;
- {$EXTERNALSYM CREATE_DEFAULT_ERROR_MODE}
- CREATE_NO_WINDOW = $08000000;
- {$EXTERNALSYM CREATE_NO_WINDOW}
- PROFILE_USER = $10000000;
- {$EXTERNALSYM PROFILE_USER}
- PROFILE_KERNEL = $20000000;
- {$EXTERNALSYM PROFILE_KERNEL}
- PROFILE_SERVER = $40000000;
- {$EXTERNALSYM PROFILE_SERVER}
- CREATE_IGNORE_SYSTEM_DEFAULT = DWORD($80000000);
- {$EXTERNALSYM CREATE_IGNORE_SYSTEM_DEFAULT}
- THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN;
- {$EXTERNALSYM THREAD_PRIORITY_LOWEST}
- THREAD_PRIORITY_BELOW_NORMAL = (THREAD_PRIORITY_LOWEST+1);
- {$EXTERNALSYM THREAD_PRIORITY_BELOW_NORMAL}
- THREAD_PRIORITY_NORMAL = 0;
- {$EXTERNALSYM THREAD_PRIORITY_NORMAL}
- THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX;
- {$EXTERNALSYM THREAD_PRIORITY_HIGHEST}
- THREAD_PRIORITY_ABOVE_NORMAL = (THREAD_PRIORITY_HIGHEST-1);
- {$EXTERNALSYM THREAD_PRIORITY_ABOVE_NORMAL}
- THREAD_PRIORITY_ERROR_RETURN = (MAXLONG);
- {$EXTERNALSYM THREAD_PRIORITY_ERROR_RETURN}
- THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT;
- {$EXTERNALSYM THREAD_PRIORITY_TIME_CRITICAL}
- THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE;
- {$EXTERNALSYM THREAD_PRIORITY_IDLE}
- //
- // Debug APIs
- //
- EXCEPTION_DEBUG_EVENT = 1;
- {$EXTERNALSYM EXCEPTION_DEBUG_EVENT}
- CREATE_THREAD_DEBUG_EVENT = 2;
- {$EXTERNALSYM CREATE_THREAD_DEBUG_EVENT}
- CREATE_PROCESS_DEBUG_EVENT = 3;
- {$EXTERNALSYM CREATE_PROCESS_DEBUG_EVENT}
- EXIT_THREAD_DEBUG_EVENT = 4;
- {$EXTERNALSYM EXIT_THREAD_DEBUG_EVENT}
- EXIT_PROCESS_DEBUG_EVENT = 5;
- {$EXTERNALSYM EXIT_PROCESS_DEBUG_EVENT}
- LOAD_DLL_DEBUG_EVENT = 6;
- {$EXTERNALSYM LOAD_DLL_DEBUG_EVENT}
- UNLOAD_DLL_DEBUG_EVENT = 7;
- {$EXTERNALSYM UNLOAD_DLL_DEBUG_EVENT}
- OUTPUT_DEBUG_STRING_EVENT = 8;
- {$EXTERNALSYM OUTPUT_DEBUG_STRING_EVENT}
- RIP_EVENT = 9;
- {$EXTERNALSYM RIP_EVENT}
- type
- LPEXCEPTION_DEBUG_INFO = ^EXCEPTION_DEBUG_INFO;
- {$EXTERNALSYM LPEXCEPTION_DEBUG_INFO}
- _EXCEPTION_DEBUG_INFO = record
- ExceptionRecord: EXCEPTION_RECORD;
- dwFirstChance: DWORD;
- end;
- {$EXTERNALSYM _EXCEPTION_DEBUG_INFO}
- EXCEPTION_DEBUG_INFO = _EXCEPTION_DEBUG_INFO;
- {$EXTERNALSYM EXCEPTION_DEBUG_INFO}
- TExceptionDebugInfo = EXCEPTION_DEBUG_INFO;
- PExceptionDebugInfo = LPEXCEPTION_DEBUG_INFO;
- LPCREATE_THREAD_DEBUG_INFO = ^CREATE_THREAD_DEBUG_INFO;
- {$EXTERNALSYM LPCREATE_THREAD_DEBUG_INFO}
- _CREATE_THREAD_DEBUG_INFO = record
- hThread: HANDLE;
- lpThreadLocalBase: LPVOID;
- lpStartAddress: LPTHREAD_START_ROUTINE;
- end;
- {$EXTERNALSYM _CREATE_THREAD_DEBUG_INFO}
- CREATE_THREAD_DEBUG_INFO = _CREATE_THREAD_DEBUG_INFO;
- {$EXTERNALSYM CREATE_THREAD_DEBUG_INFO}
- TCreateThreadDebugInfo = CREATE_THREAD_DEBUG_INFO;
- PCreateThreadDebugInfo = LPCREATE_THREAD_DEBUG_INFO;
- LPCREATE_PROCESS_DEBUG_INFO = ^CREATE_PROCESS_DEBUG_INFO;
- {$EXTERNALSYM LPCREATE_PROCESS_DEBUG_INFO}
- _CREATE_PROCESS_DEBUG_INFO = record
- hFile: HANDLE;
- hProcess: HANDLE;
- hThread: HANDLE;
- lpBaseOfImage: LPVOID;
- dwDebugInfoFileOffset: DWORD;
- nDebugInfoSize: DWORD;
- lpThreadLocalBase: LPVOID;
- lpStartAddress: LPTHREAD_START_ROUTINE;
- lpImageName: LPVOID;
- fUnicode: Word;
- end;
- {$EXTERNALSYM _CREATE_PROCESS_DEBUG_INFO}
- CREATE_PROCESS_DEBUG_INFO = _CREATE_PROCESS_DEBUG_INFO;
- {$EXTERNALSYM CREATE_PROCESS_DEBUG_INFO}
- TCreateProcessDebugInfo = CREATE_PROCESS_DEBUG_INFO;
- PCreateProcessDebugInfo = LPCREATE_PROCESS_DEBUG_INFO;
- LPEXIT_THREAD_DEBUG_INFO = ^EXIT_THREAD_DEBUG_INFO;
- {$EXTERNALSYM LPEXIT_THREAD_DEBUG_INFO}
- _EXIT_THREAD_DEBUG_INFO = record
- dwExitCode: DWORD;
- end;
- {$EXTERNALSYM _EXIT_THREAD_DEBUG_INFO}
- EXIT_THREAD_DEBUG_INFO = _EXIT_THREAD_DEBUG_INFO;
- {$EXTERNALSYM EXIT_THREAD_DEBUG_INFO}
- TExitThreadDebugInfo = EXIT_THREAD_DEBUG_INFO;
- PExitThreadDebugInfo = LPEXIT_THREAD_DEBUG_INFO;
- LPEXIT_PROCESS_DEBUG_INFO = ^EXIT_PROCESS_DEBUG_INFO;
- {$EXTERNALSYM LPEXIT_PROCESS_DEBUG_INFO}
- _EXIT_PROCESS_DEBUG_INFO = record
- dwExitCode: DWORD;
- end;
- {$EXTERNALSYM _EXIT_PROCESS_DEBUG_INFO}
- EXIT_PROCESS_DEBUG_INFO = _EXIT_PROCESS_DEBUG_INFO;
- {$EXTERNALSYM EXIT_PROCESS_DEBUG_INFO}
- TExitProcessDebugInfo = EXIT_PROCESS_DEBUG_INFO;
- PExitProcessDebugInfo = LPEXIT_PROCESS_DEBUG_INFO;
- LPLOAD_DLL_DEBUG_INFO = ^LOAD_DLL_DEBUG_INFO;
- {$EXTERNALSYM LPLOAD_DLL_DEBUG_INFO}
- _LOAD_DLL_DEBUG_INFO = record
- hFile: HANDLE;
- lpBaseOfDll: LPVOID;
- dwDebugInfoFileOffset: DWORD;
- nDebugInfoSize: DWORD;
- lpImageName: LPVOID;
- fUnicode: Word;
- end;
- {$EXTERNALSYM _LOAD_DLL_DEBUG_INFO}
- LOAD_DLL_DEBUG_INFO = _LOAD_DLL_DEBUG_INFO;
- {$EXTERNALSYM LOAD_DLL_DEBUG_INFO}
- TLoadDllDebugInfo = LOAD_DLL_DEBUG_INFO;
- PLoadDllDebugInfo = LPLOAD_DLL_DEBUG_INFO;
- LPUNLOAD_DLL_DEBUG_INFO = ^UNLOAD_DLL_DEBUG_INFO;
- {$EXTERNALSYM LPUNLOAD_DLL_DEBUG_INFO}
- _UNLOAD_DLL_DEBUG_INFO = record
- lpBaseOfDll: LPVOID;
- end;
- {$EXTERNALSYM _UNLOAD_DLL_DEBUG_INFO}
- UNLOAD_DLL_DEBUG_INFO = _UNLOAD_DLL_DEBUG_INFO;
- {$EXTERNALSYM UNLOAD_DLL_DEBUG_INFO}
- TUnloadDllDebugInfo = UNLOAD_DLL_DEBUG_INFO;
- PUnloadDllDebugInfo = LPUNLOAD_DLL_DEBUG_INFO;
- LPOUTPUT_DEBUG_STRING_INFO = ^OUTPUT_DEBUG_STRING_INFO;
- {$EXTERNALSYM LPOUTPUT_DEBUG_STRING_INFO}
- _OUTPUT_DEBUG_STRING_INFO = record
- lpDebugStringData: LPSTR;
- fUnicode: Word;
- nDebugStringLength: Word;
- end;
- {$EXTERNALSYM _OUTPUT_DEBUG_STRING_INFO}
- OUTPUT_DEBUG_STRING_INFO = _OUTPUT_DEBUG_STRING_INFO;
- {$EXTERNALSYM OUTPUT_DEBUG_STRING_INFO}
- TOutputDebugStringInfo = OUTPUT_DEBUG_STRING_INFO;
- POutputDebugStringInfo = LPOUTPUT_DEBUG_STRING_INFO;
- LPRIP_INFO = ^RIP_INFO;
- {$EXTERNALSYM LPRIP_INFO}
- _RIP_INFO = record
- dwError: DWORD;
- dwType: DWORD;
- end;
- {$EXTERNALSYM _RIP_INFO}
- RIP_INFO = _RIP_INFO;
- {$EXTERNALSYM RIP_INFO}
- TRipInfo = RIP_INFO;
- PRipInfo = LPRIP_INFO;
- LPDEBUG_EVENT = ^DEBUG_EVENT;
- {$EXTERNALSYM LPDEBUG_EVENT}
- _DEBUG_EVENT = record
- dwDebugEventCode: DWORD;
- dwProcessId: DWORD;
- dwThreadId: DWORD;
- case Integer of
- 0: (Exception: EXCEPTION_DEBUG_INFO);
- 1: (CreateThread: CREATE_THREAD_DEBUG_INFO);
- 2: (CreateProcessInfo: CREATE_PROCESS_DEBUG_INFO);
- 3: (ExitThread: EXIT_THREAD_DEBUG_INFO);
- 4: (ExitProcess: EXIT_PROCESS_DEBUG_INFO);
- 5: (LoadDll: LOAD_DLL_DEBUG_INFO);
- 6: (UnloadDll: UNLOAD_DLL_DEBUG_INFO);
- 7: (DebugString: OUTPUT_DEBUG_STRING_INFO);
- 8: (RipInfo: RIP_INFO);
- end;
- {$EXTERNALSYM _DEBUG_EVENT}
- DEBUG_EVENT = _DEBUG_EVENT;
- {$EXTERNALSYM DEBUG_EVENT}
- TDebugEvent = DEBUG_EVENT;
- PDebugEvent = LPDEBUG_EVENT;
- LPCONTEXT = PCONTEXT;
- {$EXTERNALSYM LPCONTEXT}
- LPEXCEPTION_RECORD = PEXCEPTION_RECORD;
- {$EXTERNALSYM LPEXCEPTION_RECORD}
- LPEXCEPTION_POINTERS = PEXCEPTION_POINTERS;
- {$EXTERNALSYM LPEXCEPTION_POINTERS}
- const
- DRIVE_UNKNOWN = 0;
- {$EXTERNALSYM DRIVE_UNKNOWN}
- DRIVE_NO_ROOT_DIR = 1;
- {$EXTERNALSYM DRIVE_NO_ROOT_DIR}
- DRIVE_REMOVABLE = 2;
- {$EXTERNALSYM DRIVE_REMOVABLE}
- DRIVE_FIXED = 3;
- {$EXTERNALSYM DRIVE_FIXED}
- DRIVE_REMOTE = 4;
- {$EXTERNALSYM DRIVE_REMOTE}
- DRIVE_CDROM = 5;
- {$EXTERNALSYM DRIVE_CDROM}
- DRIVE_RAMDISK = 6;
- {$EXTERNALSYM DRIVE_RAMDISK}
- function GetFreeSpace(w: WORD): DWORD;
- {$EXTERNALSYM GetFreeSpace}
- const
- FILE_TYPE_UNKNOWN = $0000;
- {$EXTERNALSYM FILE_TYPE_UNKNOWN}
- FILE_TYPE_DISK = $0001;
- {$EXTERNALSYM FILE_TYPE_DISK}
- FILE_TYPE_CHAR = $0002;
- {$EXTERNALSYM FILE_TYPE_CHAR}
- FILE_TYPE_PIPE = $0003;
- {$EXTERNALSYM FILE_TYPE_PIPE}
- FILE_TYPE_REMOTE = $8000;
- {$EXTERNALSYM FILE_TYPE_REMOTE}
- STD_INPUT_HANDLE = DWORD(-10);
- {$EXTERNALSYM STD_INPUT_HANDLE}
- STD_OUTPUT_HANDLE = DWORD(-11);
- {$EXTERNALSYM STD_OUTPUT_HANDLE}
- STD_ERROR_HANDLE = DWORD(-12);
- {$EXTERNALSYM STD_ERROR_HANDLE}
- NOPARITY = 0;
- {$EXTERNALSYM NOPARITY}
- ODDPARITY = 1;
- {$EXTERNALSYM ODDPARITY}
- EVENPARITY = 2;
- {$EXTERNALSYM EVENPARITY}
- MARKPARITY = 3;
- {$EXTERNALSYM MARKPARITY}
- SPACEPARITY = 4;
- {$EXTERNALSYM SPACEPARITY}
- ONESTOPBIT = 0;
- {$EXTERNALSYM ONESTOPBIT}
- ONE5STOPBITS = 1;
- {$EXTERNALSYM ONE5STOPBITS}
- TWOSTOPBITS = 2;
- {$EXTERNALSYM TWOSTOPBITS}
- IGNORE = 0; // Ignore signal
- {$EXTERNALSYM IGNORE}
- INFINITE = DWORD($FFFFFFFF); // Infinite timeout
- {$EXTERNALSYM INFINITE}
- //
- // Baud rates at which the communication device operates
- //
- CBR_110 = 110;
- {$EXTERNALSYM CBR_110}
- CBR_300 = 300;
- {$EXTERNALSYM CBR_300}
- CBR_600 = 600;
- {$EXTERNALSYM CBR_600}
- CBR_1200 = 1200;
- {$EXTERNALSYM CBR_1200}
- CBR_2400 = 2400;
- {$EXTERNALSYM CBR_2400}
- CBR_4800 = 4800;
- {$EXTERNALSYM CBR_4800}
- CBR_9600 = 9600;
- {$EXTERNALSYM CBR_9600}
- CBR_14400 = 14400;
- {$EXTERNALSYM CBR_14400}
- CBR_19200 = 19200;
- {$EXTERNALSYM CBR_19200}
- CBR_38400 = 38400;
- {$EXTERNALSYM CBR_38400}
- CBR_56000 = 56000;
- {$EXTERNALSYM CBR_56000}
- CBR_57600 = 57600;
- {$EXTERNALSYM CBR_57600}
- CBR_115200 = 115200;
- {$EXTERNALSYM CBR_115200}
- CBR_128000 = 128000;
- {$EXTERNALSYM CBR_128000}
- CBR_256000 = 256000;
- {$EXTERNALSYM CBR_256000}
- //
- // Error Flags
- //
- CE_RXOVER = $0001; // Receive Queue overflow
- {$EXTERNALSYM CE_RXOVER}
- CE_OVERRUN = $0002; // Receive Overrun Error
- {$EXTERNALSYM CE_OVERRUN}
- CE_RXPARITY = $0004; // Receive Parity Error
- {$EXTERNALSYM CE_RXPARITY}
- CE_FRAME = $0008; // Receive Framing error
- {$EXTERNALSYM CE_FRAME}
- CE_BREAK = $0010; // Break Detected
- {$EXTERNALSYM CE_BREAK}
- CE_TXFULL = $0100; // TX Queue is full
- {$EXTERNALSYM CE_TXFULL}
- CE_PTO = $0200; // LPTx Timeout
- {$EXTERNALSYM CE_PTO}
- CE_IOE = $0400; // LPTx I/O Error
- {$EXTERNALSYM CE_IOE}
- CE_DNS = $0800; // LPTx Device not selected
- {$EXTERNALSYM CE_DNS}
- CE_OOP = $1000; // LPTx Out-Of-Paper
- {$EXTERNALSYM CE_OOP}
- CE_MODE = $8000; // Requested mode unsupported
- {$EXTERNALSYM CE_MODE}
- IE_BADID = DWORD(-1); // Invalid or unsupported id
- {$EXTERNALSYM IE_BADID}
- IE_OPEN = DWORD(-2); // Device Already Open
- {$EXTERNALSYM IE_OPEN}
- IE_NOPEN = DWORD(-3); // Device Not Open
- {$EXTERNALSYM IE_NOPEN}
- IE_MEMORY = DWORD(-4); // Unable to allocate queues
- {$EXTERNALSYM IE_MEMORY}
- IE_DEFAULT = DWORD(-5); // Error in default parameters
- {$EXTERNALSYM IE_DEFAULT}
- IE_HARDWARE = DWORD(-10); // Hardware Not Present
- {$EXTERNALSYM IE_HARDWARE}
- IE_BYTESIZE = DWORD(-11); // Illegal Byte Size
- {$EXTERNALSYM IE_BYTESIZE}
- IE_BAUDRATE = DWORD(-12); // Unsupported BaudRate
- {$EXTERNALSYM IE_BAUDRATE}
- //
- // Events
- //
- EV_RXCHAR = $0001; // Any Character received
- {$EXTERNALSYM EV_RXCHAR}
- EV_RXFLAG = $0002; // Received certain character
- {$EXTERNALSYM EV_RXFLAG}
- EV_TXEMPTY = $0004; // Transmitt Queue Empty
- {$EXTERNALSYM EV_TXEMPTY}
- EV_CTS = $0008; // CTS changed state
- {$EXTERNALSYM EV_CTS}
- EV_DSR = $0010; // DSR changed state
- {$EXTERNALSYM EV_DSR}
- EV_RLSD = $0020; // RLSD changed state
- {$EXTERNALSYM EV_RLSD}
- EV_BREAK = $0040; // BREAK received
- {$EXTERNALSYM EV_BREAK}
- EV_ERR = $0080; // Line status error occurred
- {$EXTERNALSYM EV_ERR}
- EV_RING = $0100; // Ring signal detected
- {$EXTERNALSYM EV_RING}
- EV_PERR = $0200; // Printer error occured
- {$EXTERNALSYM EV_PERR}
- EV_RX80FULL = $0400; // Receive buffer is 80 percent full
- {$EXTERNALSYM EV_RX80FULL}
- EV_EVENT1 = $0800; // Provider specific event 1
- {$EXTERNALSYM EV_EVENT1}
- EV_EVENT2 = $1000; // Provider specific event 2
- {$EXTERNALSYM EV_EVENT2}
- //
- // Escape Functions
- //
- SETXOFF = 1; // Simulate XOFF received
- {$EXTERNALSYM SETXOFF}
- SETXON = 2; // Simulate XON received
- {$EXTERNALSYM SETXON}
- SETRTS = 3; // Set RTS high
- {$EXTERNALSYM SETRTS}
- CLRRTS = 4; // Set RTS low
- {$EXTERNALSYM CLRRTS}
- SETDTR = 5; // Set DTR high
- {$EXTERNALSYM SETDTR}
- CLRDTR = 6; // Set DTR low
- {$EXTERNALSYM CLRDTR}
- RESETDEV = 7; // Reset device if possible
- {$EXTERNALSYM RESETDEV}
- SETBREAK = 8; // Set the device break line.
- {$EXTERNALSYM SETBREAK}
- CLRBREAK = 9; // Clear the device break line.
- {$EXTERNALSYM CLRBREAK}
- //
- // PURGE function flags.
- //
- PURGE_TXABORT = $0001; // Kill the pending/current writes to the comm port.
- {$EXTERNALSYM PURGE_TXABORT}
- PURGE_RXABORT = $0002; // Kill the pending/current reads to the comm port.
- {$EXTERNALSYM PURGE_RXABORT}
- PURGE_TXCLEAR = $0004; // Kill the transmit queue if there.
- {$EXTERNALSYM PURGE_TXCLEAR}
- PURGE_RXCLEAR = $0008; // Kill the typeahead buffer if there.
- {$EXTERNALSYM PURGE_RXCLEAR}
- LPTx = $80; // Set if ID is for LPT device
- {$EXTERNALSYM LPTx}
- //
- // Modem Status Flags
- //
- MS_CTS_ON = DWORD($0010);
- {$EXTERNALSYM MS_CTS_ON}
- MS_DSR_ON = DWORD($0020);
- {$EXTERNALSYM MS_DSR_ON}
- MS_RING_ON = DWORD($0040);
- {$EXTERNALSYM MS_RING_ON}
- MS_RLSD_ON = DWORD($0080);
- {$EXTERNALSYM MS_RLSD_ON}
- //
- // WaitSoundState() Constants
- //
- S_QUEUEEMPTY = 0;
- {$EXTERNALSYM S_QUEUEEMPTY}
- S_THRESHOLD = 1;
- {$EXTERNALSYM S_THRESHOLD}
- S_ALLTHRESHOLD = 2;
- {$EXTERNALSYM S_ALLTHRESHOLD}
- //
- // Accent Modes
- //
- S_NORMAL = 0;
- {$EXTERNALSYM S_NORMAL}
- S_LEGATO = 1;
- {$EXTERNALSYM S_LEGATO}
- S_STACCATO = 2;
- {$EXTERNALSYM S_STACCATO}
- //
- // SetSoundNoise() Sources
- //
- S_PERIOD512 = 0; // Freq = N/512 high pitch, less coarse hiss
- {$EXTERNALSYM S_PERIOD512}
- S_PERIOD1024 = 1; // Freq = N/1024
- {$EXTERNALSYM S_PERIOD1024}
- S_PERIOD2048 = 2; // Freq = N/2048 low pitch, more coarse hiss
- {$EXTERNALSYM S_PERIOD2048}
- S_PERIODVOICE = 3; // Source is frequency from voice channel (3)
- {$EXTERNALSYM S_PERIODVOICE}
- S_WHITE512 = 4; // Freq = N/512 high pitch, less coarse hiss
- {$EXTERNALSYM S_WHITE512}
- S_WHITE1024 = 5; // Freq = N/1024
- {$EXTERNALSYM S_WHITE1024}
- S_WHITE2048 = 6; // Freq = N/2048 low pitch, more coarse hiss
- {$EXTERNALSYM S_WHITE2048}
- S_WHITEVOICE = 7; // Source is frequency from voice channel (3)
- {$EXTERNALSYM S_WHITEVOICE}
- S_SERDVNA = DWORD(-1); // Device not available
- {$EXTERNALSYM S_SERDVNA}
- S_SEROFM = DWORD(-2); // Out of memory
- {$EXTERNALSYM S_SEROFM}
- S_SERMACT = DWORD(-3); // Music active
- {$EXTERNALSYM S_SERMACT}
- S_SERQFUL = DWORD(-4); // Queue full
- {$EXTERNALSYM S_SERQFUL}
- S_SERBDNT = DWORD(-5); // Invalid note
- {$EXTERNALSYM S_SERBDNT}
- S_SERDLN = DWORD(-6); // Invalid note length
- {$EXTERNALSYM S_SERDLN}
- S_SERDCC = DWORD(-7); // Invalid note count
- {$EXTERNALSYM S_SERDCC}
- S_SERDTP = DWORD(-8); // Invalid tempo
- {$EXTERNALSYM S_SERDTP}
- S_SERDVL = DWORD(-9); // Invalid volume
- {$EXTERNALSYM S_SERDVL}
- S_SERDMD = DWORD(-10); // Invalid mode
- {$EXTERNALSYM S_SERDMD}
- S_SERDSH = DWORD(-11); // Invalid shape
- {$EXTERNALSYM S_SERDSH}
- S_SERDPT = DWORD(-12); // Invalid pitch
- {$EXTERNALSYM S_SERDPT}
- S_SERDFQ = DWORD(-13); // Invalid frequency
- {$EXTERNALSYM S_SERDFQ}
- S_SERDDR = DWORD(-14); // Invalid duration
- {$EXTERNALSYM S_SERDDR}
- S_SERDSR = DWORD(-15); // Invalid source
- {$EXTERNALSYM S_SERDSR}
- S_SERDST = DWORD(-16); // Invalid state
- {$EXTERNALSYM S_SERDST}
- NMPWAIT_WAIT_FOREVER = DWORD($ffffffff);
- {$EXTERNALSYM NMPWAIT_WAIT_FOREVER}
- NMPWAIT_NOWAIT = $00000001;
- {$EXTERNALSYM NMPWAIT_NOWAIT}
- NMPWAIT_USE_DEFAULT_WAIT = $00000000;
- {$EXTERNALSYM NMPWAIT_USE_DEFAULT_WAIT}
- FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES;
- {$EXTERNALSYM FS_CASE_IS_PRESERVED}
- FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH;
- {$EXTERNALSYM FS_CASE_SENSITIVE}
- FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK;
- {$EXTERNALSYM FS_UNICODE_STORED_ON_DISK}
- FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS;
- {$EXTERNALSYM FS_PERSISTENT_ACLS}
- FS_VOL_IS_COMPRESSED = FILE_VOLUME_IS_COMPRESSED;
- {$EXTERNALSYM FS_VOL_IS_COMPRESSED}
- FS_FILE_COMPRESSION = FILE_FILE_COMPRESSION;
- {$EXTERNALSYM FS_FILE_COMPRESSION}
- FS_FILE_ENCRYPTION = FILE_SUPPORTS_ENCRYPTION;
- {$EXTERNALSYM FS_FILE_ENCRYPTION}
- FILE_MAP_COPY = SECTION_QUERY;
- {$EXTERNALSYM FILE_MAP_COPY}
- FILE_MAP_WRITE = SECTION_MAP_WRITE;
- {$EXTERNALSYM FILE_MAP_WRITE}
- FILE_MAP_READ = SECTION_MAP_READ;
- {$EXTERNALSYM FILE_MAP_READ}
- FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS;
- {$EXTERNALSYM FILE_MAP_ALL_ACCESS}
- OF_READ = $00000000;
- {$EXTERNALSYM OF_READ}
- OF_WRITE = $00000001;
- {$EXTERNALSYM OF_WRITE}
- OF_READWRITE = $00000002;
- {$EXTERNALSYM OF_READWRITE}
- OF_SHARE_COMPAT = $00000000;
- {$EXTERNALSYM OF_SHARE_COMPAT}
- OF_SHARE_EXCLUSIVE = $00000010;
- {$EXTERNALSYM OF_SHARE_EXCLUSIVE}
- OF_SHARE_DENY_WRITE = $00000020;
- {$EXTERNALSYM OF_SHARE_DENY_WRITE}
- OF_SHARE_DENY_READ = $00000030;
- {$EXTERNALSYM OF_SHARE_DENY_READ}
- OF_SHARE_DENY_NONE = $00000040;
- {$EXTERNALSYM OF_SHARE_DENY_NONE}
- OF_PARSE = $00000100;
- {$EXTERNALSYM OF_PARSE}
- OF_DELETE = $00000200;
- {$EXTERNALSYM OF_DELETE}
- OF_VERIFY = $00000400;
- {$EXTERNALSYM OF_VERIFY}
- OF_CANCEL = $00000800;
- {$EXTERNALSYM OF_CANCEL}
- OF_CREATE = $00001000;
- {$EXTERNALSYM OF_CREATE}
- OF_PROMPT = $00002000;
- {$EXTERNALSYM OF_PROMPT}
- OF_EXIST = $00004000;
- {$EXTERNALSYM OF_EXIST}
- OF_REOPEN = $00008000;
- {$EXTERNALSYM OF_REOPEN}
- OFS_MAXPATHNAME = 128;
- {$EXTERNALSYM OFS_MAXPATHNAME}
- type
- LPOFSTRUCT = ^OFSTRUCT;
- {$EXTERNALSYM LPOFSTRUCT}
- _OFSTRUCT = record
- cBytes: Byte;
- fFixedDisk: Byte;
- nErrCode: Word;
- Reserved1: Word;
- Reserved2: Word;
- szPathName: array [0..OFS_MAXPATHNAME - 1] of CHAR;
- end;
- {$EXTERNALSYM _OFSTRUCT}
- OFSTRUCT = _OFSTRUCT;
- {$EXTERNALSYM OFSTRUCT}
- TOfStruct = OFSTRUCT;
- POfStruct = LPOFSTRUCT;
- //
- // The Risc compilers support intrinsic functions for interlocked
- // increment, decrement, and exchange.
- //
- function InterlockedIncrement(var lpAddend: LONG): LONG; stdcall;
- {$EXTERNALSYM InterlockedIncrement}
- function InterlockedDecrement(var lpAddend: LONG): LONG; stdcall;
- {$EXTERNALSYM InterlockedDecrement}
- function InterlockedExchange(var Target: LONG; Value: LONG): LONG; stdcall;
- {$EXTERNALSYM InterlockedExchange}
- function InterlockedExchangePointer(var Target: PVOID; Value: PVOID): PVOID;
- {$EXTERNALSYM InterlockedExchangePointer}
- function InterlockedExchangeAdd(var Addend: LONG; Value: LONG): LONG; stdcall;
- {$EXTERNALSYM InterlockedExchangeAdd}
- function InterlockedCompareExchange(var Destination: LONG; Exchange: LONG;
- Comperand: LONG): LONG; stdcall;
- {$EXTERNALSYM InterlockedCompareExchange}
- function InterlockedCompareExchangePointer(var Destination: PVOID;
- Exchange, Comperand: PVOID): PVOID;
- {$EXTERNALSYM InterlockedCompareExchangePointer}
- procedure InitializeSListHead(ListHead: PSLIST_HEADER); stdcall;
- {$EXTERNALSYM InitializeSListHead}
- function InterlockedPopEntrySList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
- {$EXTERNALSYM InterlockedPopEntrySList}
- function InterlockedPushEntrySList(ListHead: PSLIST_HEADER; ListEntry: PSLIST_ENTRY): PSLIST_ENTRY; stdcall;
- {$EXTERNALSYM InterlockedPushEntrySList}
- function InterlockedFlushSList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
- {$EXTERNALSYM InterlockedFlushSList}
- function QueryDepthSList(ListHead: PSLIST_HEADER): USHORT; stdcall;
- {$EXTERNALSYM QueryDepthSList}
- function FreeResource(hResData: HGLOBAL): BOOL; stdcall;
- {$EXTERNALSYM FreeResource}
- function LockResource(hResData: HGLOBAL): LPVOID; stdcall;
- {$EXTERNALSYM LockResource}
- function UnlockResource(hResData: HANDLE): BOOL;
- {$EXTERNALSYM UnlockResource}
- const
- MAXINTATOM = $C000;
- {$EXTERNALSYM MAXINTATOM}
- INVALID_ATOM = ATOM(0);
- {$EXTERNALSYM INVALID_ATOM}
- type
- MAKEINTATOMA = PAnsiChar;
- MAKEINTATOMW = PWideChar;
- {$IFDEF UNICODE}
- MAKEINTATOM = MAKEINTATOMW;
- {$EXTERNALSYM MAKEINTATOM}
- {$ELSE}
- MAKEINTATOM = MAKEINTATOMA;
- {$EXTERNALSYM MAKEINTATOM}
- {$ENDIF}
- function FreeLibrary(hLibModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM FreeLibrary}
- procedure FreeLibraryAndExitThread(hLibModule: HMODULE; dwExitCode: DWORD); stdcall;
- {$EXTERNALSYM FreeLibraryAndExitThread}
- function DisableThreadLibraryCalls(hLibModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM DisableThreadLibraryCalls}
- function GetProcAddress(hModule: HMODULE; lpProcName: LPCSTR): FARPROC; stdcall;
- {$EXTERNALSYM GetProcAddress}
- function GetVersion: DWORD; stdcall;
- {$EXTERNALSYM GetVersion)}
- function GlobalAlloc(uFlags: UINT; dwBytes: SIZE_T): HGLOBAL; stdcall;
- {$EXTERNALSYM GlobalAlloc}
- function GlobalReAlloc(hMem: HGLOBAL; dwBytes: SIZE_T; uFlags: UINT): HGLOBAL; stdcall;
- {$EXTERNALSYM GlobalReAlloc}
- function GlobalSize(hMem: HGLOBAL): SIZE_T; stdcall;
- {$EXTERNALSYM GlobalSize}
- function GlobalFlags(hMem: HGLOBAL): UINT; stdcall;
- {$EXTERNALSYM GlobalFlags}
- function GlobalLock(hMem: HGLOBAL): LPVOID; stdcall;
- {$EXTERNALSYM GlobalLock}
- //!!!MWH My version win31 = DWORD WINAPI GlobalHandle(UINT)
- function GlobalHandle(pMem: LPCVOID): HGLOBAL; stdcall;
- {$EXTERNALSYM GlobalHandle}
- function GlobalUnlock(hMem: HGLOBAL): BOOL; stdcall;
- {$EXTERNALSYM GlobalUnlock}
- function GlobalFree(hMem: HGLOBAL): HGLOBAL; stdcall;
- {$EXTERNALSYM GlobalFree}
- function GlobalCompact(dwMinFree: DWORD): SIZE_T; stdcall;
- {$EXTERNALSYM GlobalCompact}
- procedure GlobalFix(hMem: HGLOBAL); stdcall;
- {$EXTERNALSYM GlobalFix}
- procedure GlobalUnfix(hMem: HGLOBAL); stdcall;
- {$EXTERNALSYM GlobalUnfix}
- function GlobalWire(hMem: HGLOBAL): LPVOID; stdcall;
- {$EXTERNALSYM GlobalWire}
- function GlobalUnWire(hMem: HGLOBAL): BOOL; stdcall;
- {$EXTERNALSYM GlobalUnWire}
- procedure GlobalMemoryStatus(var lpBuffer: MEMORYSTATUS); stdcall;
- {$EXTERNALSYM GlobalMemoryStatus}
- type
- LPMEMORYSTATUSEX = ^MEMORYSTATUSEX;
- {$EXTERNALSYM LPMEMORYSTATUSEX}
- _MEMORYSTATUSEX = record
- dwLength: DWORD;
- dwMemoryLoad: DWORD;
- ullTotalPhys: DWORDLONG;
- ullAvailPhys: DWORDLONG;
- ullTotalPageFile: DWORDLONG;
- ullAvailPageFile: DWORDLONG;
- ullTotalVirtual: DWORDLONG;
- ullAvailVirtual: DWORDLONG;
- ullAvailExtendedVirtual: DWORDLONG;
- end;
- {$EXTERNALSYM _MEMORYSTATUSEX}
- MEMORYSTATUSEX = _MEMORYSTATUSEX;
- {$EXTERNALSYM MEMORYSTATUSEX}
- TMemoryStatusEx = MEMORYSTATUSEX;
- PMemoryStatusEx = LPMEMORYSTATUSEX;
- function GlobalMemoryStatusEx(var lpBuffer: MEMORYSTATUSEX): BOOL; stdcall;
- {$EXTERNALSYM GlobalMemoryStatusEx}
- function LocalAlloc(uFlags: UINT; uBytes: SIZE_T): HLOCAL; stdcall;
- {$EXTERNALSYM LocalAlloc}
- function LocalReAlloc(hMem: HLOCAL; uBytes: SIZE_T; uFlags: UINT): HLOCAL; stdcall;
- {$EXTERNALSYM LocalReAlloc}
- function LocalLock(hMem: HLOCAL): LPVOID; stdcall;
- {$EXTERNALSYM LocalLock}
- function LocalHandle(pMem: LPCVOID): HLOCAL; stdcall;
- {$EXTERNALSYM LocalHandle}
- function LocalUnlock(hMem: HLOCAL): BOOL; stdcall;
- {$EXTERNALSYM LocalUnlock}
- function LocalSize(hMem: HLOCAL): SIZE_T; stdcall;
- {$EXTERNALSYM LocalSize}
- function LocalFlags(hMem: HLOCAL): UINT; stdcall;
- {$EXTERNALSYM LocalFlags}
- function LocalFree(hMem: HLOCAL): HLOCAL; stdcall;
- {$EXTERNALSYM LocalFree}
- function LocalShrink(hMem: HLOCAL; cbNewSize: UINT): SIZE_T; stdcall;
- {$EXTERNALSYM LocalShrink}
- function LocalCompact(uMinFree: UINT): SIZE_T; stdcall;
- {$EXTERNALSYM LocalCompact}
- function FlushInstructionCache(hProcess: HANDLE; lpBaseAddress: LPCVOID;
- dwSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM FlushInstructionCache}
- function VirtualAlloc(lpAddress: LPVOID; dwSize: SIZE_T; flAllocationType: DWORD;
- flProtect: DWORD): LPVOID; stdcall;
- {$EXTERNALSYM VirtualAlloc}
- function VirtualFree(lpAddress: LPVOID; dwSize: SIZE_T; dwFreeType: DWORD): BOOL; stdcall;
- {$EXTERNALSYM VirtualFree}
- function VirtualProtect(lpAddress: LPVOID; dwSize: SIZE_T; flNewProtect: DWORD;
- lpflOldProtect: PDWORD): BOOL; stdcall;
- {$EXTERNALSYM VirtualProtect}
- function VirtualQuery(lpAddress: LPCVOID; var lpBuffer: MEMORY_BASIC_INFORMATION;
- dwLength: DWORD): DWORD; stdcall;
- {$EXTERNALSYM VirtualQuery}
- function VirtualAllocEx(hProcess: HANDLE; lpAddress: LPVOID; dwSize: SIZE_T;
- flAllocationType: DWORD; flProtect: DWORD): LPVOID; stdcall;
- {$EXTERNALSYM VirtualAllocEx}
- function GetWriteWatch(dwFlags: DWORD; lpBaseAddress: PVOID;
- dwRegionSize: SIZE_T; var lpAddresses: PVOID; var lpdwCount: ULONG_PTR;
- var lpdwGranularity: ULONG): UINT; stdcall;
- {$EXTERNALSYM GetWriteWatch}
- function ResetWriteWatch(lpBaseAddress: LPVOID; dwRegionSize: SIZE_T): UINT; stdcall;
- {$EXTERNALSYM ResetWriteWatch}
- function GetLargePageMinimum: SIZE_T; stdcall;
- {$EXTERNALSYM GetLargePageMinimum}
- function VirtualFreeEx(hProcess: HANDLE; lpAddress: LPVOID; dwSize: SIZE_T;
- dwFreeType: DWORD): BOOL; stdcall;
- {$EXTERNALSYM VirtualFreeEx}
- function VirtualProtectEx(hProcess: HANDLE; lpAddress: LPVOID; dwSize: SIZE_T;
- flNewProtect: DWORD; lpflOldProtect: PDWORD): BOOL; stdcall;
- {$EXTERNALSYM VirtualProtectEx}
- function VirtualQueryEx(hProcess: HANDLE; lpAddress: LPCVOID;
- var lpBuffer: MEMORY_BASIC_INFORMATION; dwLength: DWORD): DWORD; stdcall;
- {$EXTERNALSYM VirtualQueryEx}
- function HeapCreate(flOptions: DWORD; dwInitialSize: SIZE_T;
- dwMaximumSize: SIZE_T): HANDLE; stdcall;
- {$EXTERNALSYM HeapCreate}
- function HeapDestroy(hHeap: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM HeapDestroy}
- function HeapAlloc(hHeap: HANDLE; dwFlags: DWORD; dwBytes: SIZE_T): LPVOID; stdcall;
- {$EXTERNALSYM HeapAlloc}
- function HeapReAlloc(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPVOID; dwBytes: SIZE_T): LPVOID; stdcall;
- {$EXTERNALSYM HeapReAlloc}
- function HeapFree(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPVOID): BOOL; stdcall;
- {$EXTERNALSYM HeapFree}
- function HeapSize(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPCVOID): SIZE_T; stdcall;
- {$EXTERNALSYM HeapSize}
- function HeapValidate(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPCVOID): BOOL; stdcall;
- {$EXTERNALSYM HeapValidate}
- function HeapCompact(hHeap: HANDLE; dwFlags: DWORD): SIZE_T; stdcall;
- {$EXTERNALSYM HeapCompact}
- function GetProcessHeap: HANDLE; stdcall;
- {$EXTERNALSYM GetProcessHeap)}
- function GetProcessHeaps(NumberOfHeaps: DWORD; var ProcessHeaps: HANDLE): DWORD; stdcall;
- {$EXTERNALSYM GetProcessHeaps}
- type
- PPROCESS_HEAP_ENTRY = ^PROCESS_HEAP_ENTRY;
- {$EXTERNALSYM PPROCESS_HEAP_ENTRY}
- _PROCESS_HEAP_ENTRY = record
- lpData: PVOID;
- cbData: DWORD;
- cbOverhead: BYTE;
- iRegionIndex: BYTE;
- wFlags: WORD;
- case Integer of
- 0: (
- hMem: HANDLE;
- dwReserved: array [0..2] of DWORD);
- 1: (
- dwComittedSize: DWORD;
- dwUnComittedSize: DWORD;
- lpFirstBlock: LPVOID;
- lpLastBlock: LPVOID);
- end;
- {$EXTERNALSYM _PROCESS_HEAP_ENTRY}
- PROCESS_HEAP_ENTRY = _PROCESS_HEAP_ENTRY;
- {$EXTERNALSYM PROCESS_HEAP_ENTRY}
- LPPROCESS_HEAP_ENTRY = ^PROCESS_HEAP_ENTRY;
- {$EXTERNALSYM LPPROCESS_HEAP_ENTRY}
- TProcessHeapEntry = PROCESS_HEAP_ENTRY;
- PProcessHeapEntry = PPROCESS_HEAP_ENTRY;
- const
- PROCESS_HEAP_REGION = $0001;
- {$EXTERNALSYM PROCESS_HEAP_REGION}
- PROCESS_HEAP_UNCOMMITTED_RANGE = $0002;
- {$EXTERNALSYM PROCESS_HEAP_UNCOMMITTED_RANGE}
- PROCESS_HEAP_ENTRY_BUSY = $0004;
- {$EXTERNALSYM PROCESS_HEAP_ENTRY_BUSY}
- PROCESS_HEAP_ENTRY_MOVEABLE = $0010;
- {$EXTERNALSYM PROCESS_HEAP_ENTRY_MOVEABLE}
- PROCESS_HEAP_ENTRY_DDESHARE = $0020;
- {$EXTERNALSYM PROCESS_HEAP_ENTRY_DDESHARE}
- function HeapLock(hHeap: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM HeapLock}
- function HeapUnlock(hHeap: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM HeapUnlock}
- function HeapWalk(hHeap: HANDLE; var lpEntry: PROCESS_HEAP_ENTRY): BOOL; stdcall;
- {$EXTERNALSYM HeapWalk}
- function HeapSetInformation(HeapHandle: HANDLE; HeapInformationClass: HEAP_INFORMATION_CLASS;
- HeapInformation: PVOID; HeapInformationLength: SIZE_T): BOOL; stdcall;
- {$EXTERNALSYM HeapSetInformation}
- function HeapQueryInformation(HeapHandle: HANDLE; HeapInformationClass: HEAP_INFORMATION_CLASS;
- HeapInformation: PVOID; HeapInformationLength: SIZE_T; ReturnLength: PSIZE_T): BOOL; stdcall;
- {$EXTERNALSYM HeapQueryInformation}
- // GetBinaryType return values.
- const
- SCS_32BIT_BINARY = 0;
- {$EXTERNALSYM SCS_32BIT_BINARY}
- SCS_DOS_BINARY = 1;
- {$EXTERNALSYM SCS_DOS_BINARY}
- SCS_WOW_BINARY = 2;
- {$EXTERNALSYM SCS_WOW_BINARY}
- SCS_PIF_BINARY = 3;
- {$EXTERNALSYM SCS_PIF_BINARY}
- SCS_POSIX_BINARY = 4;
- {$EXTERNALSYM SCS_POSIX_BINARY}
- SCS_OS216_BINARY = 5;
- {$EXTERNALSYM SCS_OS216_BINARY}
- SCS_64BIT_BINARY = 6;
- {$EXTERNALSYM SCS_64BIT_BINARY}
- SCS_THIS_PLATFORM_BINARY = SCS_32BIT_BINARY;
- {$EXTERNALSYM SCS_THIS_PLATFORM_BINARY}
- function GetBinaryTypeA(lpApplicationName: LPCSTR; var lpBinaryType: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetBinaryTypeA}
- function GetBinaryTypeW(lpApplicationName: LPCWSTR; var lpBinaryType: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetBinaryTypeW}
- {$IFDEF UNICODE}
- function GetBinaryType(lpApplicationName: LPCWSTR; var lpBinaryType: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetBinaryType}
- {$ELSE}
- function GetBinaryType(lpApplicationName: LPCSTR; var lpBinaryType: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetBinaryType}
- {$ENDIF}
- function GetShortPathNameA(lpszLongPath: LPCSTR; lpszShortPath: LPSTR;
- cchBuffer: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetShortPathNameA}
- function GetShortPathNameW(lpszLongPath: LPCWSTR; lpszShortPath: LPWSTR;
- cchBuffer: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetShortPathNameW}
- {$IFDEF UNICODE}
- function GetShortPathName(lpszLongPath: LPCWSTR; lpszShortPath: LPWSTR;
- cchBuffer: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetShortPathName}
- {$ELSE}
- function GetShortPathName(lpszLongPath: LPCSTR; lpszShortPath: LPSTR;
- cchBuffer: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetShortPathName}
- {$ENDIF}
- function GetLongPathNameA(lpszShortPath: LPCSTR; lpszLongPath: LPSTR;
- cchBuffer: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetLongPathNameA}
- function GetLongPathNameW(lpszShortPath: LPCWSTR; lpszLongPath: LPWSTR;
- cchBuffer: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetLongPathNameW}
- {$IFDEF UNICODE}
- function GetLongPathName(lpszShortPath: LPCWSTR; lpszLongPath: LPWSTR;
- cchBuffer: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetLongPathName}
- {$ELSE}
- function GetLongPathName(lpszShortPath: LPCSTR; lpszLongPath: LPSTR;
- cchBuffer: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetLongPathName}
- {$ENDIF}
- function GetProcessAffinityMask(hProcess: HANDLE;
- var lpProcessAffinityMask, lpSystemAffinityMask: DWORD_PTR): BOOL; stdcall;
- {$EXTERNALSYM GetProcessAffinityMask}
- function SetProcessAffinityMask(hProcess: HANDLE;
- dwProcessAffinityMask: DWORD_PTR): BOOL; stdcall;
- {$EXTERNALSYM SetProcessAffinityMask}
- function GetProcessTimes(hProcess: HANDLE; var lpCreationTime, lpExitTime,
- lpKernelTime, lpUserTime: FILETIME): BOOL; stdcall;
- {$EXTERNALSYM GetProcessTimes}
- function GetProcessIoCounters(hProcess: HANDLE; var lpIoCounters: IO_COUNTERS): BOOL; stdcall;
- {$EXTERNALSYM GetProcessIoCounters}
- function GetProcessWorkingSetSize(hProcess: HANDLE;
- var lpMinimumWorkingSetSize, lpMaximumWorkingSetSize: SIZE_T): BOOL; stdcall;
- {$EXTERNALSYM GetProcessWorkingSetSize}
- function SetProcessWorkingSetSize(hProcess: HANDLE; dwMinimumWorkingSetSize,
- dwMaximumWorkingSetSize: SIZE_T): BOOL; stdcall;
- {$EXTERNALSYM SetProcessWorkingSetSize}
- function OpenProcess(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- dwProcessId: DWORD): HANDLE; stdcall;
- {$EXTERNALSYM OpenProcess}
- function GetCurrentProcess: HANDLE; stdcall;
- {$EXTERNALSYM GetCurrentProcess}
- function GetCurrentProcessId: DWORD; stdcall;
- {$EXTERNALSYM GetCurrentProcessId}
- procedure ExitProcess(uExitCode: UINT); stdcall;
- {$EXTERNALSYM ExitProcess}
- function TerminateProcess(hProcess: HANDLE; uExitCode: UINT): BOOL; stdcall;
- {$EXTERNALSYM TerminateProcess}
- function GetExitCodeProcess(hProcess: HANDLE; var lpExitCode: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetExitCodeProcess}
- procedure FatalExit(ExitCode: Integer); stdcall;
- {$EXTERNALSYM FatalExit}
- {$IFNDEF UNICODE}
- function GetEnvironmentStrings: LPSTR; stdcall;
- {$EXTERNALSYM GetEnvironmentStrings}
- {$ENDIF}
- function GetEnvironmentStringsW: LPWSTR; stdcall;
- {$EXTERNALSYM GetEnvironmentStringsW}
- {$IFDEF UNICODE}
- function GetEnvironmentStrings: LPWSTR; stdcall;
- {$EXTERNALSYM GetEnvironmentStrings}
- {$ELSE}
- function GetEnvironmentStringsA: LPSTR; stdcall;
- {$EXTERNALSYM GetEnvironmentStringsA}
- {$ENDIF}
- function FreeEnvironmentStringsA(pstr: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM FreeEnvironmentStringsA}
- function FreeEnvironmentStringsW(pstr: LPWSTR): BOOL; stdcall;
- {$EXTERNALSYM FreeEnvironmentStringsW}
- {$IFDEF UNICODE}
- function FreeEnvironmentStrings(pstr: LPWSTR): BOOL; stdcall;
- {$EXTERNALSYM FreeEnvironmentStrings}
- {$ELSE}
- function FreeEnvironmentStrings(pstr: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM FreeEnvironmentStrings}
- {$ENDIF}
- procedure RaiseException(dwExceptionCode: DWORD; dwExceptionFlags: DWORD;
- nNumberOfArguments: DWORD; lpArguments: PULONG_PTR); stdcall;
- {$EXTERNALSYM RaiseException}
- function UnhandledExceptionFilter(ExceptionInfo: PEXCEPTION_POINTERS): LONG; stdcall;
- {$EXTERNALSYM UnhandledExceptionFilter}
- type
- PTOP_LEVEL_EXCEPTION_FILTER = function (ExceptionInfo: PEXCEPTION_POINTERS): LONG; stdcall;
- {$EXTERNALSYM PTOP_LEVEL_EXCEPTION_FILTER}
- LPTOP_LEVEL_EXCEPTION_FILTER = PTOP_LEVEL_EXCEPTION_FILTER;
- {$EXTERNALSYM LPTOP_LEVEL_EXCEPTION_FILTER}
- TTopLevelExceptionFilter = PTOP_LEVEL_EXCEPTION_FILTER;
- function SetUnhandledExceptionFilter(lpTopLevelExceptionFilter: LPTOP_LEVEL_EXCEPTION_FILTER): LPTOP_LEVEL_EXCEPTION_FILTER; stdcall;
- {$EXTERNALSYM SetUnhandledExceptionFilter}
- //
- // Fiber creation flags
- //
- const
- FIBER_FLAG_FLOAT_SWITCH = $1; // context switch floating point
- {$EXTERNALSYM FIBER_FLAG_FLOAT_SWITCH}
- function CreateFiber(dwStackSize: DWORD; lpStartAddress: LPFIBER_START_ROUTINE;
- lpParameter: LPVOID): LPVOID; stdcall;
- {$EXTERNALSYM CreateFiber}
- function CreateFiberEx(dwStackCommitSize, dwStackReserveSize: SIZE_T; dwFlags: DWORD;
- lpStartAddress: LPFIBER_START_ROUTINE; lpParameter: LPVOID): LPVOID; stdcall;
- {$EXTERNALSYM CreateFiberEx}
- procedure DeleteFiber(lpFiber: LPVOID); stdcall;
- {$EXTERNALSYM DeleteFiber}
- function ConvertThreadToFiber(lpParameter: LPVOID): LPVOID; stdcall;
- {$EXTERNALSYM ConvertThreadToFiber}
- function ConvertThreadToFiberEx(lpParameter: LPVOID; dwFlags: DWORD): LPVOID; stdcall;
- {$EXTERNALSYM ConvertThreadToFiberEx}
- function ConvertFiberToThread: BOOL; stdcall;
- {$EXTERNALSYM ConvertFiberToThread}
- procedure SwitchToFiber(lpFiber: LPVOID); stdcall;
- {$EXTERNALSYM SwitchToFiber}
- function SwitchToThread: BOOL; stdcall;
- {$EXTERNALSYM SwitchToThread}
- function CreateThread(lpThreadAttributes: LPSECURITY_ATTRIBUTES;
- dwStackSize: DWORD; lpStartAddress: LPTHREAD_START_ROUTINE; lpParameter: LPVOID;
- dwCreationFlags: DWORD; lpThreadId: LPDWORD): HANDLE; stdcall;
- {$EXTERNALSYM CreateThread}
- function CreateRemoteThread(hProcess: HANDLE;
- lpThreadAttributes: LPSECURITY_ATTRIBUTES; dwStackSize: DWORD;
- lpStartAddress: LPTHREAD_START_ROUTINE; lpParameter: LPVOID;
- dwCreationFlags: DWORD; lpThreadId: LPDWORD): HANDLE; stdcall;
- {$EXTERNALSYM CreateRemoteThread}
- function GetCurrentThread: HANDLE; stdcall;
- {$EXTERNALSYM GetCurrentThread}
- function GetCurrentThreadId: DWORD; stdcall;
- {$EXTERNALSYM GetCurrentThreadId}
- function GetProcessIdOfThread(Thread: HANDLE): DWORD; stdcall;
- {$EXTERNALSYM GetProcessIdOfThread}
- function GetThreadId(Thread: HANDLE): DWORD; stdcall;
- {$EXTERNALSYM GetThreadId}
- function GetProcessId(Process: HANDLE): DWORD; stdcall;
- {$EXTERNALSYM GetProcessId}
- function GetCurrentProcessorNumber: DWORD; stdcall;
- {$EXTERNALSYM GetCurrentProcessorNumber}
- function SetThreadAffinityMask(hThread: HANDLE;
- dwThreadAffinityMask: DWORD_PTR): DWORD_PTR; stdcall;
- {$EXTERNALSYM SetThreadAffinityMask}
- function SetThreadIdealProcessor(hThread: HANDLE; dwIdealProcessor: DWORD): DWORD; stdcall;
- {$EXTERNALSYM SetThreadIdealProcessor}
- function SetProcessPriorityBoost(hProcess: HANDLE;
- bDisablePriorityBoost: BOOL): BOOL; stdcall;
- {$EXTERNALSYM SetProcessPriorityBoost}
- function GetProcessPriorityBoost(hProcess: HANDLE;
- var pDisablePriorityBoost: BOOL): BOOL; stdcall;
- {$EXTERNALSYM GetProcessPriorityBoost}
- function RequestWakeupLatency(latency: LATENCY_TIME): BOOL; stdcall;
- {$EXTERNALSYM RequestWakeupLatency}
- function IsSystemResumeAutomatic: BOOL; stdcall;
- {$EXTERNALSYM IsSystemResumeAutomatic}
- function OpenThread(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- dwThreadId: DWORD): HANDLE; stdcall;
- {$EXTERNALSYM OpenThread}
- function SetThreadPriority(hThread: HANDLE; nPriority: Integer): BOOL; stdcall;
- {$EXTERNALSYM SetThreadPriority}
- function SetThreadPriorityBoost(hThread: HANDLE; bDisablePriorityBoost: BOOL): BOOL; stdcall;
- {$EXTERNALSYM SetThreadPriorityBoost}
- function GetThreadPriorityBoost(hThread: HANDLE;
- var pDisablePriorityBoost: BOOL): BOOL; stdcall;
- {$EXTERNALSYM GetThreadPriorityBoost}
- function GetThreadPriority(hThread: HANDLE): Integer; stdcall;
- {$EXTERNALSYM GetThreadPriority}
- function GetThreadTimes(hThread: HANDLE; var lpCreationTime, lpExitTime,
- lpKernelTime, lpUserTime: FILETIME): BOOL; stdcall;
- {$EXTERNALSYM GetThreadTimes}
- procedure ExitThread(dwExitCode: DWORD); stdcall;
- {$EXTERNALSYM ExitThread}
- function TerminateThread(hThread: HANDLE; dwExitCode: DWORD): BOOL; stdcall;
- {$EXTERNALSYM TerminateThread}
- function GetExitCodeThread(hThread: HANDLE; var lpExitCode: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetExitCodeThread}
- function GetThreadSelectorEntry(hThread: HANDLE; dwSelector: DWORD;
- var lpSelectorEntry: LDT_ENTRY): BOOL; stdcall;
- {$EXTERNALSYM GetThreadSelectorEntry}
- function SetThreadExecutionState(esFlags: EXECUTION_STATE): EXECUTION_STATE; stdcall;
- {$EXTERNALSYM SetThreadExecutionState}
- function GetLastError: DWORD; stdcall;
- {$EXTERNALSYM GetLastError}
- procedure SetLastError(dwErrCode: DWORD); stdcall;
- {$EXTERNALSYM SetLastError}
- procedure RestoreLastError(dwErrCode: DWORD); stdcall;
- {$EXTERNALSYM RestoreLastError}
- type
- PRESTORE_LAST_ERROR = procedure (dwErrCode: DWORD); stdcall;
- {$EXTERNALSYM PRESTORE_LAST_ERROR}
- const
- RESTORE_LAST_ERROR_NAME_A = 'RestoreLastError';
- {$EXTERNALSYM RESTORE_LAST_ERROR_NAME_A}
- RESTORE_LAST_ERROR_NAME_W = WideString('RestoreLastError');
- {$EXTERNALSYM RESTORE_LAST_ERROR_NAME_W}
- RESTORE_LAST_ERROR_NAME = __TEXT('RestoreLastError');
- {$EXTERNALSYM RESTORE_LAST_ERROR_NAME}
- function HasOverlappedIoCompleted(const lpOverlapped: OVERLAPPED): BOOL;
- {$EXTERNALSYM HasOverlappedIoCompleted}
- function GetOverlappedResult(hFile: HANDLE; const lpOverlapped: OVERLAPPED;
- var lpNumberOfBytesTransferred: DWORD; bWait: BOOL): BOOL; stdcall;
- {$EXTERNALSYM GetOverlappedResult}
- function CreateIoCompletionPort(FileHandle: HANDLE; ExistingCompletionPort: HANDLE;
- CompletionKey: ULONG_PTR; NumberOfConcurrentThreads: DWORD): HANDLE; stdcall;
- {$EXTERNALSYM CreateIoCompletionPort}
- function GetQueuedCompletionStatus(CompletionPort: HANDLE;
- var lpNumberOfBytesTransferred: DWORD; var lpCompletionKey: ULONG_PTR;
- var lpOverlapped: LPOVERLAPPED; dwMilliseconds: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetQueuedCompletionStatus}
- function PostQueuedCompletionStatus(CompletionPort: HANDLE;
- dwNumberOfBytesTransferred: DWORD; dwCompletionKey: ULONG_PTR;
- lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM PostQueuedCompletionStatus}
- const
- SEM_FAILCRITICALERRORS = $0001;
- {$EXTERNALSYM SEM_FAILCRITICALERRORS}
- SEM_NOGPFAULTERRORBOX = $0002;
- {$EXTERNALSYM SEM_NOGPFAULTERRORBOX}
- SEM_NOALIGNMENTFAULTEXCEPT = $0004;
- {$EXTERNALSYM SEM_NOALIGNMENTFAULTEXCEPT}
- SEM_NOOPENFILEERRORBOX = $8000;
- {$EXTERNALSYM SEM_NOOPENFILEERRORBOX}
- function SetErrorMode(uMode: UINT): UINT; stdcall;
- {$EXTERNALSYM SetErrorMode}
- function ReadProcessMemory(hProcess: HANDLE; lpBaseAddress: LPCVOID;
- lpBuffer: LPVOID; nSize: DWORD; lpNumberOfBytesRead: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM ReadProcessMemory}
- function WriteProcessMemory(hProcess: HANDLE; lpBaseAddress: LPVOID;
- lpBuffer: LPVOID; nSize: DWORD; lpNumberOfBytesWritten: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM WriteProcessMemory}
- function GetThreadContext(hThread: HANDLE; var lpContext: CONTEXT): BOOL; stdcall;
- {$EXTERNALSYM GetThreadContext}
- function SetThreadContext(hThread: HANDLE; const lpContext: CONTEXT): BOOL; stdcall;
- {$EXTERNALSYM SetThreadContext}
- function SuspendThread(hThread: HANDLE): DWORD; stdcall;
- {$EXTERNALSYM SuspendThread}
- function ResumeThread(hThread: HANDLE): DWORD; stdcall;
- {$EXTERNALSYM ResumeThread}
- type
- PAPCFUNC = procedure (dwParam: ULONG_PTR); stdcall;
- {$EXTERNALSYM PAPCFUNC}
- TApcFunc = PAPCFUNC;
- function QueueUserAPC(pfnAPC: PAPCFUNC; hThread: HANDLE; dwData: ULONG_PTR): DWORD; stdcall;
- {$EXTERNALSYM QueueUserAPC}
- function IsDebuggerPresent: BOOL; stdcall;
- {$EXTERNALSYM IsDebuggerPresent}
- procedure DebugBreak; stdcall;
- {$EXTERNALSYM DebugBreak}
- function WaitForDebugEvent(var lpDebugEvent: DEBUG_EVENT; dwMilliseconds: DWORD): BOOL; stdcall;
- {$EXTERNALSYM WaitForDebugEvent}
- function ContinueDebugEvent(dwProcessId: DWORD; dwThreadId: DWORD;
- dwContinueStatus: DWORD): BOOL; stdcall;
- {$EXTERNALSYM ContinueDebugEvent}
- function DebugActiveProcess(dwProcessId: DWORD): BOOL; stdcall;
- {$EXTERNALSYM DebugActiveProcess}
- function DebugActiveProcessStop(dwProcessId: DWORD): BOOL; stdcall;
- {$EXTERNALSYM DebugActiveProcessStop}
- function DebugSetProcessKillOnExit(KillOnExit: BOOL): BOOL; stdcall;
- {$EXTERNALSYM DebugSetProcessKillOnExit}
- function DebugBreakProcess(Process: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM DebugBreakProcess}
- procedure InitializeCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
- {$EXTERNALSYM InitializeCriticalSection}
- procedure EnterCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
- {$EXTERNALSYM EnterCriticalSection}
- procedure LeaveCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
- {$EXTERNALSYM LeaveCriticalSection}
- function InitializeCriticalSectionAndSpinCount(var lpCriticalSection: CRITICAL_SECTION;
- dwSpinCount: DWORD): BOOL; stdcall;
- {$EXTERNALSYM InitializeCriticalSectionAndSpinCount}
- function SetCriticalSectionSpinCount(var lpCriticalSection: CRITICAL_SECTION;
- dwSpinCount: DWORD): DWORD; stdcall;
- {$EXTERNALSYM SetCriticalSectionSpinCount}
- function TryEnterCriticalSection(var lpCriticalSection: CRITICAL_SECTION): BOOL; stdcall;
- {$EXTERNALSYM TryEnterCriticalSection}
- procedure DeleteCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
- {$EXTERNALSYM DeleteCriticalSection}
- function SetEvent(hEvent: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM SetEvent}
- function ResetEvent(hEvent: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM ResetEvent}
- function PulseEvent(hEvent: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM PulseEvent}
- function ReleaseSemaphore(hSemaphore: HANDLE; lReleaseCount: LONG;
- lpPreviousCount: LPLONG): BOOL; stdcall;
- {$EXTERNALSYM ReleaseSemaphore}
- function ReleaseMutex(hMutex: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM ReleaseMutex}
- function WaitForSingleObject(hHandle: HANDLE; dwMilliseconds: DWORD): DWORD; stdcall;
- {$EXTERNALSYM WaitForSingleObject}
- function WaitForMultipleObjects(nCount: DWORD; lpHandles: PHANDLE; bWaitAll: BOOL;
- dwMilliseconds: DWORD): DWORD; stdcall;
- {$EXTERNALSYM WaitForMultipleObjects}
- procedure Sleep(dwMilliseconds: DWORD); stdcall;
- {$EXTERNALSYM Sleep}
- function LoadResource(hModule: HMODULE; hResInfo: HRSRC): HGLOBAL; stdcall;
- {$EXTERNALSYM LoadResource}
- function SizeofResource(hModule: HMODULE; hResInfo: HRSRC): DWORD; stdcall;
- {$EXTERNALSYM SizeofResource}
- function GlobalDeleteAtom(nAtom: ATOM): ATOM; stdcall;
- {$EXTERNALSYM GlobalDeleteAtom}
- function InitAtomTable(nSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM InitAtomTable}
- function DeleteAtom(nAtom: ATOM): ATOM; stdcall;
- {$EXTERNALSYM DeleteAtom}
- function SetHandleCount(uNumber: UINT): UINT; stdcall;
- {$EXTERNALSYM SetHandleCount}
- function GetLogicalDrives: DWORD; stdcall;
- {$EXTERNALSYM GetLogicalDrives}
- function LockFile(hFile: HANDLE; dwFileOffsetLow: DWORD; dwFileOffsetHigh: DWORD;
- nNumberOfBytesToLockLow: DWORD; nNumberOfBytesToLockHigh: DWORD): BOOL; stdcall;
- {$EXTERNALSYM LockFile}
- function UnlockFile(hFile: HANDLE; dwFileOffsetLow: DWORD; dwFileOffsetHigh: DWORD;
- nNumberOfBytesToUnlockLow: DWORD; nNumberOfBytesToUnlockHigh: DWORD): BOOL; stdcall;
- {$EXTERNALSYM UnlockFile}
- function LockFileEx(hFile: HANDLE; dwFlags: DWORD; dwReserved: DWORD;
- nNumberOfBytesToLockLow: DWORD; nNumberOfBytesToLockHigh: DWORD;
- const lpOverlapped: OVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM LockFileEx}
- const
- LOCKFILE_FAIL_IMMEDIATELY = $00000001;
- {$EXTERNALSYM LOCKFILE_FAIL_IMMEDIATELY}
- LOCKFILE_EXCLUSIVE_LOCK = $00000002;
- {$EXTERNALSYM LOCKFILE_EXCLUSIVE_LOCK}
- function UnlockFileEx(hFile: HANDLE; dwReserved: DWORD;
- nNumberOfBytesToUnlockLow: DWORD; nNumberOfBytesToUnlockHigh: DWORD;
- const lpOverlapped: OVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM UnlockFileEx}
- type
- PBY_HANDLE_FILE_INFORMATION = ^BY_HANDLE_FILE_INFORMATION;
- {$EXTERNALSYM PBY_HANDLE_FILE_INFORMATION}
- _BY_HANDLE_FILE_INFORMATION = record
- dwFileAttributes: DWORD;
- ftCreationTime: FILETIME;
- ftLastAccessTime: FILETIME;
- ftLastWriteTime: FILETIME;
- dwVolumeSerialNumber: DWORD;
- nFileSizeHigh: DWORD;
- nFileSizeLow: DWORD;
- nNumberOfLinks: DWORD;
- nFileIndexHigh: DWORD;
- nFileIndexLow: DWORD;
- end;
- {$EXTERNALSYM _BY_HANDLE_FILE_INFORMATION}
- BY_HANDLE_FILE_INFORMATION = _BY_HANDLE_FILE_INFORMATION;
- {$EXTERNALSYM BY_HANDLE_FILE_INFORMATION}
- LPBY_HANDLE_FILE_INFORMATION = ^BY_HANDLE_FILE_INFORMATION;
- {$EXTERNALSYM LPBY_HANDLE_FILE_INFORMATION}
- TByHandleFileInformation = BY_HANDLE_FILE_INFORMATION;
- PByHandleFileInformation = PBY_HANDLE_FILE_INFORMATION;
- function GetFileInformationByHandle(hFile: HANDLE;
- var lpFileInformation: BY_HANDLE_FILE_INFORMATION): BOOL; stdcall;
- {$EXTERNALSYM GetFileInformationByHandle}
- function GetFileType(hFile: HANDLE): DWORD; stdcall;
- {$EXTERNALSYM GetFileType}
- function GetFileSize(hFile: HANDLE; lpFileSizeHigh: LPDWORD): DWORD; stdcall;
- {$EXTERNALSYM GetFileSize}
- function GetFileSizeEx(hFile: HANDLE; var lpFileSize: LARGE_INTEGER): BOOL; stdcall;
- {$EXTERNALSYM GetFileSizeEx}
- function GetStdHandle(nStdHandle: DWORD): HANDLE; stdcall;
- {$EXTERNALSYM GetStdHandle}
- function SetStdHandle(nStdHandle: DWORD; hHandle: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM SetStdHandle}
- function WriteFile(hFile: HANDLE; lpBuffer: LPCVOID; nNumberOfBytesToWrite: DWORD;
- lpNumberOfBytesWritten: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM WriteFile}
- function ReadFile(hFile: HANDLE; lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
- lpNumberOfBytesRead: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM ReadFile}
- function FlushFileBuffers(hFile: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM FlushFileBuffers}
- function DeviceIoControl(hDevice: HANDLE; dwIoControlCode: DWORD;
- lpInBuffer: LPVOID; nInBufferSize: DWORD; lpOutBuffer: LPVOID;
- nOutBufferSize: DWORD; lpBytesReturned: LPDWORD;
- lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM DeviceIoControl}
- function RequestDeviceWakeup(hDevice: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM RequestDeviceWakeup}
- function CancelDeviceWakeupRequest(hDevice: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM CancelDeviceWakeupRequest}
- function GetDevicePowerState(hDevice: HANDLE; var pfOn: BOOL): BOOL; stdcall;
- {$EXTERNALSYM GetDevicePowerState}
- function SetMessageWaitingIndicator(hMsgIndicator: HANDLE; ulMsgCount: ULONG): BOOL; stdcall;
- {$EXTERNALSYM SetMessageWaitingIndicator}
- function SetEndOfFile(hFile: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM SetEndOfFile}
- function SetFilePointer(hFile: HANDLE; lDistanceToMove: LONG;
- lpDistanceToMoveHigh: PLONG; dwMoveMethod: DWORD): DWORD; stdcall;
- {$EXTERNALSYM SetFilePointer}
- function SetFilePointerEx(hFile: HANDLE; liDistanceToMove: LARGE_INTEGER;
- lpNewFilePointer: PLARGE_INTEGER; dwMoveMethod: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetFilePointerEx}
- function FindClose(hFindFile: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM FindClose}
- function GetFileTime(hFile: HANDLE; lpCreationTime, lpLastAccessTime,
- lpLastWriteTime: PFILETIME): BOOL; stdcall;
- {$EXTERNALSYM GetFileTime}
- function SetFileTime(hFile: HANDLE; lpCreationTime, lpLastAccessTime,
- lpLastWriteTime: PFILETIME): BOOL; stdcall;
- {$EXTERNALSYM SetFileTime}
- function SetFileValidData(hFile: HANDLE; ValidDataLength: LONGLONG): BOOL; stdcall;
- {$EXTERNALSYM SetFileValidData}
- function SetFileShortNameA(hFile: HANDLE; lpShortName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM SetFileShortNameA}
- function SetFileShortNameW(hFile: HANDLE; lpShortName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM SetFileShortNameW}
- {$IFDEF UNICODE}
- function SetFileShortName(hFile: HANDLE; lpShortName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM SetFileShortName}
- {$ELSE}
- function SetFileShortName(hFile: HANDLE; lpShortName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM SetFileShortName}
- {$ENDIF}
- function CloseHandle(hObject: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM CloseHandle}
- function DuplicateHandle(hSourceProcessHandle: HANDLE; hSourceHandle: HANDLE;
- hTargetProcessHandle: HANDLE; lpTargetHandle: LPHANDLE;
- dwDesiredAccess: DWORD; bInheritHandle: BOOL; dwOptions: DWORD): BOOL; stdcall;
- {$EXTERNALSYM DuplicateHandle}
- function GetHandleInformation(hObject: HANDLE; var lpdwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetHandleInformation}
- function SetHandleInformation(hObject: HANDLE; dwMask: DWORD; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetHandleInformation}
- const
- HANDLE_FLAG_INHERIT = $00000001;
- {$EXTERNALSYM HANDLE_FLAG_INHERIT}
- HANDLE_FLAG_PROTECT_FROM_CLOSE = $00000002;
- {$EXTERNALSYM HANDLE_FLAG_PROTECT_FROM_CLOSE}
- HINSTANCE_ERROR = 32;
- {$EXTERNALSYM HINSTANCE_ERROR}
- function LoadModule(lpModuleName: LPCSTR; lpParameterBlock: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM LoadModule}
- function WinExec(lpCmdLine: LPCSTR; uCmdShow: UINT): UINT; stdcall;
- {$EXTERNALSYM WinExec}
- function ClearCommBreak(hFile: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM ClearCommBreak}
- function ClearCommError(hFile: HANDLE; var lpErrors: DWORD;
- lpStat: LPCOMSTAT): BOOL; stdcall;
- {$EXTERNALSYM ClearCommError}
- function SetupComm(hFile: HANDLE; dwInQueue: DWORD; dwOutQueue: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetupComm}
- function EscapeCommFunction(hFile: HANDLE; dwFunc: DWORD): BOOL; stdcall;
- {$EXTERNALSYM EscapeCommFunction}
- function GetCommConfig(hCommDev: HANDLE; var lpCC: COMMCONFIG;
- var lpdwSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetCommConfig}
- function GetCommMask(hFile: HANDLE; var lpEvtMask: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetCommMask}
- function GetCommProperties(hFile: HANDLE; var lpCommProp: COMMPROP): BOOL; stdcall;
- {$EXTERNALSYM GetCommProperties}
- function GetCommModemStatus(hFile: HANDLE; var lpModemStat: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetCommModemStatus}
- function GetCommState(hFile: HANDLE; var lpDCB: DCB): BOOL; stdcall;
- {$EXTERNALSYM GetCommState}
- function GetCommTimeouts(hFile: HANDLE; var lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
- {$EXTERNALSYM GetCommTimeouts}
- function PurgeComm(hFile: HANDLE; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PurgeComm}
- function SetCommBreak(hFile: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM SetCommBreak}
- function SetCommConfig(hCommDev: HANDLE; const lpCC: COMMCONFIG; dwSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetCommConfig}
- function SetCommMask(hFile: HANDLE; dwEvtMask: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetCommMask}
- function SetCommState(hFile: HANDLE; const lpDCB: DCB): BOOL; stdcall;
- {$EXTERNALSYM SetCommState}
- function SetCommTimeouts(hFile: HANDLE; const lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
- {$EXTERNALSYM SetCommTimeouts}
- function TransmitCommChar(hFile: HANDLE; cChar: Char): BOOL; stdcall;
- {$EXTERNALSYM TransmitCommChar}
- function WaitCommEvent(hFile: HANDLE; var lpEvtMask: DWORD;
- lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM WaitCommEvent}
- function SetTapePosition(hDevice: HANDLE; dwPositionMethod, dwPartition,
- dwOffsetLow, dwOffsetHigh: DWORD; bImmediate: BOOL): DWORD; stdcall;
- {$EXTERNALSYM SetTapePosition}
- function GetTapePosition(hDevice: HANDLE; dwPositionType: DWORD;
- var lpdwPartition, lpdwOffsetLow: LPDWORD; lpdwOffsetHigh: LPDWORD): DWORD; stdcall;
- {$EXTERNALSYM GetTapePosition}
- function PrepareTape(hDevice: HANDLE; dwOperation: DWORD; bImmediate: BOOL): DWORD; stdcall;
- {$EXTERNALSYM PrepareTape}
- function EraseTape(hDevice: HANDLE; dwEraseType: DWORD; bImmediate: BOOL): DWORD; stdcall;
- {$EXTERNALSYM EraseTape}
- function CreateTapePartition(hDevice: HANDLE; dwPartitionMethod: DWORD;
- dwCount: DWORD; dwSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM CreateTapePartition}
- function WriteTapemark(hDevice: HANDLE; dwTapemarkType: DWORD;
- dwTapemarkCount: DWORD; bImmediate: BOOL): DWORD; stdcall;
- {$EXTERNALSYM WriteTapemark}
- function GetTapeStatus(hDevice: HANDLE): DWORD; stdcall;
- {$EXTERNALSYM GetTapeStatus}
- function GetTapeParameters(hDevice: HANDLE; dwOperation: DWORD;
- var lpdwSize: DWORD; lpTapeInformation: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM GetTapeParameters}
- const
- GET_TAPE_MEDIA_INFORMATION = 0;
- {$EXTERNALSYM GET_TAPE_MEDIA_INFORMATION}
- GET_TAPE_DRIVE_INFORMATION = 1;
- {$EXTERNALSYM GET_TAPE_DRIVE_INFORMATION}
- function SetTapeParameters(hDevice: HANDLE; dwOperation: DWORD; lpTapeInformation: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM SetTapeParameters}
- const
- SET_TAPE_MEDIA_INFORMATION = 0;
- {$EXTERNALSYM SET_TAPE_MEDIA_INFORMATION}
- SET_TAPE_DRIVE_INFORMATION = 1;
- {$EXTERNALSYM SET_TAPE_DRIVE_INFORMATION}
- function Beep(dwFreq: DWORD; dwDuration: DWORD): BOOL; stdcall;
- {$EXTERNALSYM Beep}
- function MulDiv(nNumber, nNumerator, nDenominator: Integer): Integer; stdcall;
- {$EXTERNALSYM MulDiv}
- procedure GetSystemTime(var lpSystemTime: SYSTEMTIME); stdcall;
- {$EXTERNALSYM GetSystemTime}
- procedure GetSystemTimeAsFileTime(var lpSystemTimeAsFileTime: FILETIME); stdcall;
- {$EXTERNALSYM GetSystemTimeAsFileTime}
- function SetSystemTime(var lpSystemTime: SYSTEMTIME): BOOL; stdcall;
- {$EXTERNALSYM SetSystemTime}
- procedure GetLocalTime(var lpSystemTime: SYSTEMTIME); stdcall;
- {$EXTERNALSYM GetLocalTime}
- function SetLocalTime(var lpSystemTime: SYSTEMTIME): BOOL; stdcall;
- {$EXTERNALSYM SetLocalTime}
- procedure GetSystemInfo(var lpSystemInfo: SYSTEM_INFO); stdcall;
- {$EXTERNALSYM GetSystemInfo}
- procedure GetNativeSystemInfo(lpSystemInfo: LPSYSTEM_INFO); stdcall;
- {$EXTERNALSYM GetNativeSystemInfo}
- function IsProcessorFeaturePresent(ProcessorFeature: DWORD): BOOL; stdcall;
- {$EXTERNALSYM IsProcessorFeaturePresent}
- type
- PTIME_ZONE_INFORMATION = ^TIME_ZONE_INFORMATION;
- {$EXTERNALSYM PTIME_ZONE_INFORMATION}
- _TIME_ZONE_INFORMATION = record
- Bias: LONG;
- StandardName: array [0..31] of WCHAR;
- StandardDate: SYSTEMTIME;
- StandardBias: LONG;
- DaylightName: array [0..31] of WCHAR;
- DaylightDate: SYSTEMTIME;
- DaylightBias: LONG;
- end;
- {$EXTERNALSYM _TIME_ZONE_INFORMATION}
- TIME_ZONE_INFORMATION = _TIME_ZONE_INFORMATION;
- {$EXTERNALSYM TIME_ZONE_INFORMATION}
- LPTIME_ZONE_INFORMATION = ^TIME_ZONE_INFORMATION;
- {$EXTERNALSYM LPTIME_ZONE_INFORMATION}
- TTimeZoneInformation = TIME_ZONE_INFORMATION;
- PTimeZoneInformation = PTIME_ZONE_INFORMATION;
- function SystemTimeToTzSpecificLocalTime(lpTimeZoneInformation: LPTIME_ZONE_INFORMATION;
- var lpUniversalTime, lpLocalTime: SYSTEMTIME): BOOL; stdcall;
- {$EXTERNALSYM SystemTimeToTzSpecificLocalTime}
- function TzSpecificLocalTimeToSystemTime(const lpTimeZoneInformation: TIME_ZONE_INFORMATION;
- const lpLocalTime: SYSTEMTIME; var lpUniversalTime: SYSTEMTIME): BOOL; stdcall;
- {$EXTERNALSYM TzSpecificLocalTimeToSystemTime}
- function GetTimeZoneInformation(var lpTimeZoneInformation: TIME_ZONE_INFORMATION): DWORD; stdcall;
- {$EXTERNALSYM GetTimeZoneInformation}
- function SetTimeZoneInformation(const lpTimeZoneInformation: TIME_ZONE_INFORMATION): BOOL; stdcall;
- {$EXTERNALSYM SetTimeZoneInformation}
- //
- // Routines to convert back and forth between system time and file time
- //
- function SystemTimeToFileTime(const lpSystemTime: SYSTEMTIME; var lpFileTime: FILETIME): BOOL; stdcall;
- {$EXTERNALSYM SystemTimeToFileTime}
- function FileTimeToLocalFileTime(const lpFileTime: FILETIME; var lpLocalFileTime: FILETIME): BOOL; stdcall;
- {$EXTERNALSYM FileTimeToLocalFileTime}
- function LocalFileTimeToFileTime(const lpLocalFileTime: FILETIME; var lpFileTime: FILETIME): BOOL; stdcall;
- {$EXTERNALSYM LocalFileTimeToFileTime}
- function FileTimeToSystemTime(const lpFileTime: FILETIME; var lpSystemTime: SYSTEMTIME): BOOL; stdcall;
- {$EXTERNALSYM FileTimeToSystemTime}
- function CompareFileTime(const lpFileTime1, lpFileTime2: FILETIME): LONG; stdcall;
- {$EXTERNALSYM CompareFileTime}
- function FileTimeToDosDateTime(const lpFileTime: FILETIME; var lpFatDate,
- lpFatTime: WORD): BOOL; stdcall;
- {$EXTERNALSYM FileTimeToDosDateTime}
- function DosDateTimeToFileTime(wFatDate, wFatTime: WORD; var lpFileTime: FILETIME): BOOL; stdcall;
- {$EXTERNALSYM DosDateTimeToFileTime}
- function GetTickCount: DWORD; stdcall;
- {$EXTERNALSYM GetTickCount}
- function SetSystemTimeAdjustment(dwTimeAdjustment: DWORD;
- bTimeAdjustmentDisabled: BOOL): BOOL; stdcall;
- {$EXTERNALSYM SetSystemTimeAdjustment}
- function GetSystemTimeAdjustment(var lpTimeAdjustment, lpTimeIncrement: DWORD;
- var lpTimeAdjustmentDisabled: BOOL): BOOL; stdcall;
- {$EXTERNALSYM GetSystemTimeAdjustment}
- function FormatMessageA(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
- dwLanguageId: DWORD; lpBuffer: LPSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
- {$EXTERNALSYM FormatMessageA}
- function FormatMessageW(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
- dwLanguageId: DWORD; lpBuffer: LPWSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
- {$EXTERNALSYM FormatMessageW}
- {$IFDEF UNICODE}
- function FormatMessage(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
- dwLanguageId: DWORD; lpBuffer: LPWSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
- {$EXTERNALSYM FormatMessage}
- {$ELSE}
- function FormatMessage(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
- dwLanguageId: DWORD; lpBuffer: LPSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
- {$EXTERNALSYM FormatMessage}
- {$ENDIF}
- const
- FORMAT_MESSAGE_ALLOCATE_BUFFER = $00000100;
- {$EXTERNALSYM FORMAT_MESSAGE_ALLOCATE_BUFFER}
- FORMAT_MESSAGE_IGNORE_INSERTS = $00000200;
- {$EXTERNALSYM FORMAT_MESSAGE_IGNORE_INSERTS}
- FORMAT_MESSAGE_FROM_STRING = $00000400;
- {$EXTERNALSYM FORMAT_MESSAGE_FROM_STRING}
- FORMAT_MESSAGE_FROM_HMODULE = $00000800;
- {$EXTERNALSYM FORMAT_MESSAGE_FROM_HMODULE}
- FORMAT_MESSAGE_FROM_SYSTEM = $00001000;
- {$EXTERNALSYM FORMAT_MESSAGE_FROM_SYSTEM}
- FORMAT_MESSAGE_ARGUMENT_ARRAY = $00002000;
- {$EXTERNALSYM FORMAT_MESSAGE_ARGUMENT_ARRAY}
- FORMAT_MESSAGE_MAX_WIDTH_MASK = $000000FF;
- {$EXTERNALSYM FORMAT_MESSAGE_MAX_WIDTH_MASK}
- function CreatePipe(var hReadPipe, hWritePipe: HANDLE;
- lpPipeAttributes: LPSECURITY_ATTRIBUTES; nSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM CreatePipe}
- function ConnectNamedPipe(hNamedPipe: HANDLE; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM ConnectNamedPipe}
- function DisconnectNamedPipe(hNamedPipe: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM DisconnectNamedPipe}
- function SetNamedPipeHandleState(hNamedPipe: HANDLE; var lpMode: DWORD;
- lpMaxCollectionCount: LPDWORD; lpCollectDataTimeout: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM SetNamedPipeHandleState}
- function GetNamedPipeInfo(hNamedPipe: HANDLE; lpFlags, lpOutBufferSize,
- lpInBufferSize, lpMaxInstances: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM GetNamedPipeInfo}
- function PeekNamedPipe(hNamedPipe: HANDLE; lpBuffer: LPVOID; nBufferSize: DWORD;
- lpBytesRead, lpTotalBytesAvail, lpBytesLeftThisMessage: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM PeekNamedPipe}
- function TransactNamedPipe(hNamedPipe: HANDLE; lpInBuffer: LPVOID;
- nInBufferSize: DWORD; lpOutBuffer: LPVOID; nOutBufferSize: DWORD;
- lpBytesRead: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM TransactNamedPipe}
- function CreateMailslotA(lpName: LPCSTR; nMaxMessageSize, lReadTimeout: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
- {$EXTERNALSYM CreateMailslotA}
- function CreateMailslotW(lpName: LPCWSTR; nMaxMessageSize, lReadTimeout: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
- {$EXTERNALSYM CreateMailslotW}
- {$IFDEF UNICODE}
- function CreateMailslot(lpName: LPCWSTR; nMaxMessageSize, lReadTimeout: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
- {$EXTERNALSYM CreateMailslot}
- {$ELSE}
- function CreateMailslot(lpName: LPCSTR; nMaxMessageSize, lReadTimeout: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
- {$EXTERNALSYM CreateMailslot}
- {$ENDIF}
- function GetMailslotInfo(hMailslot: HANDLE; lpMaxMessageSize, lpNextSize,
- lpMessageCount, lpReadTimeout: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM GetMailslotInfo}
- function SetMailslotInfo(hMailslot: HANDLE; lReadTimeout: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetMailslotInfo}
- function MapViewOfFile(hFileMappingObject: HANDLE; dwDesiredAccess: DWORD;
- dwFileOffsetHigh, dwFileOffsetLow: DWORD; dwNumberOfBytesToMap: SIZE_T): LPVOID; stdcall;
- {$EXTERNALSYM MapViewOfFile}
- function FlushViewOfFile(lpBaseAddress: LPCVOID; dwNumberOfBytesToFlush: SIZE_T): BOOL; stdcall;
- {$EXTERNALSYM FlushViewOfFile}
- function UnmapViewOfFile(lpBaseAddress: LPCVOID): BOOL; stdcall;
- {$EXTERNALSYM UnmapViewOfFile}
- //
- // File Encryption API
- //
- function EncryptFileA(lpFileName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM EncryptFileA}
- function EncryptFileW(lpFileName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM EncryptFileW}
- {$IFDEF UNICODE}
- function EncryptFile(lpFileName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM EncryptFile}
- {$ELSE}
- function EncryptFile(lpFileName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM EncryptFile}
- {$ENDIF}
- function DecryptFileA(lpFileName: LPCSTR; dwReserved: DWORD): BOOL; stdcall;
- {$EXTERNALSYM DecryptFileA}
- function DecryptFileW(lpFileName: LPCWSTR; dwReserved: DWORD): BOOL; stdcall;
- {$EXTERNALSYM DecryptFileW}
- {$IFDEF UNICODE}
- function DecryptFile(lpFileName: LPCWSTR; dwReserved: DWORD): BOOL; stdcall;
- {$EXTERNALSYM DecryptFile}
- {$ELSE}
- function DecryptFile(lpFileName: LPCSTR; dwReserved: DWORD): BOOL; stdcall;
- {$EXTERNALSYM DecryptFile}
- {$ENDIF}
- //
- // Encryption Status Value
- //
- const
- FILE_ENCRYPTABLE = 0;
- {$EXTERNALSYM FILE_ENCRYPTABLE}
- FILE_IS_ENCRYPTED = 1;
- {$EXTERNALSYM FILE_IS_ENCRYPTED}
- FILE_SYSTEM_ATTR = 2;
- {$EXTERNALSYM FILE_SYSTEM_ATTR}
- FILE_ROOT_DIR = 3;
- {$EXTERNALSYM FILE_ROOT_DIR}
- FILE_SYSTEM_DIR = 4;
- {$EXTERNALSYM FILE_SYSTEM_DIR}
- FILE_UNKNOWN = 5;
- {$EXTERNALSYM FILE_UNKNOWN}
- FILE_SYSTEM_NOT_SUPPORT = 6;
- {$EXTERNALSYM FILE_SYSTEM_NOT_SUPPORT}
- FILE_USER_DISALLOWED = 7;
- {$EXTERNALSYM FILE_USER_DISALLOWED}
- FILE_READ_ONLY = 8;
- {$EXTERNALSYM FILE_READ_ONLY}
- FILE_DIR_DISALLOWED = 9;
- {$EXTERNALSYM FILE_DIR_DISALLOWED}
- function FileEncryptionStatusA(lpFileName: LPCSTR; var lpStatus: DWORD): BOOL; stdcall;
- {$EXTERNALSYM FileEncryptionStatusA}
- function FileEncryptionStatusW(lpFileName: LPCWSTR; var lpStatus: DWORD): BOOL; stdcall;
- {$EXTERNALSYM FileEncryptionStatusW}
- {$IFDEF UNICODE}
- function FileEncryptionStatus(lpFileName: LPCWSTR; var lpStatus: DWORD): BOOL; stdcall;
- {$EXTERNALSYM FileEncryptionStatus}
- {$ELSE}
- function FileEncryptionStatus(lpFileName: LPCSTR; var lpStatus: DWORD): BOOL; stdcall;
- {$EXTERNALSYM FileEncryptionStatus}
- {$ENDIF}
- //
- // Currently defined recovery flags
- //
- const
- EFS_USE_RECOVERY_KEYS = ($1);
- {$EXTERNALSYM EFS_USE_RECOVERY_KEYS}
- type
- PFE_EXPORT_FUNC = function (pbData: PBYTE; pvCallbackContext: PVOID;
- ulLength: ULONG): DWORD; stdcall;
- {$EXTERNALSYM PFE_EXPORT_FUNC}
- PFE_IMPORT_FUNC = function (pbData: PBYTE; pvCallbackContext: PVOID;
- ulLength: PULONG): DWORD; stdcall;
- {$EXTERNALSYM PFE_IMPORT_FUNC}
- //
- // OpenRaw flag values
- //
- const
- CREATE_FOR_IMPORT = (1);
- {$EXTERNALSYM CREATE_FOR_IMPORT}
- CREATE_FOR_DIR = (2);
- {$EXTERNALSYM CREATE_FOR_DIR}
- OVERWRITE_HIDDEN = (4);
- {$EXTERNALSYM OVERWRITE_HIDDEN}
- function OpenEncryptedFileRawA(lpFileName: LPCSTR; ulFlags: ULONG;
- pvContext: PVOID): DWORD; stdcall;
- {$EXTERNALSYM OpenEncryptedFileRawA}
- function OpenEncryptedFileRawW(lpFileName: LPCWSTR; ulFlags: ULONG;
- pvContext: PVOID): DWORD; stdcall;
- {$EXTERNALSYM OpenEncryptedFileRawW}
- {$IFDEF UNICODE}
- function OpenEncryptedFileRaw(lpFileName: LPCWSTR; ulFlags: ULONG;
- pvContext: PVOID): DWORD; stdcall;
- {$EXTERNALSYM OpenEncryptedFileRaw}
- {$ELSE}
- function OpenEncryptedFileRaw(lpFileName: LPCSTR; ulFlags: ULONG;
- pvContext: PVOID): DWORD; stdcall;
- {$EXTERNALSYM OpenEncryptedFileRaw}
- {$ENDIF}
- function ReadEncryptedFileRaw(pfExportCallback: PFE_EXPORT_FUNC;
- pvCallbackContext: PVOID; pvContext: PVOID): DWORD; stdcall;
- {$EXTERNALSYM ReadEncryptedFileRaw}
- function WriteEncryptedFileRaw(pfImportCallback: PFE_IMPORT_FUNC;
- pvCallbackContext: PVOID; pvContext: PVOID): DWORD; stdcall;
- {$EXTERNALSYM WriteEncryptedFileRaw}
- procedure CloseEncryptedFileRaw(pvContext: PVOID); stdcall;
- {$EXTERNALSYM CloseEncryptedFileRaw}
- //
- // _l Compat Functions
- //
- function lstrcmpA(lpString1, lpString2: LPCSTR): Integer; stdcall;
- {$EXTERNALSYM lstrcmpA}
- function lstrcmpW(lpString1, lpString2: LPCWSTR): Integer; stdcall;
- {$EXTERNALSYM lstrcmpW}
- {$IFDEF UNICODE}
- function lstrcmp(lpString1, lpString2: LPCWSTR): Integer; stdcall;
- {$EXTERNALSYM lstrcmp}
- {$ELSE}
- function lstrcmp(lpString1, lpString2: LPCSTR): Integer; stdcall;
- {$EXTERNALSYM lstrcmp}
- {$ENDIF}
- function lstrcmpiA(lpString1, lpString2: LPCSTR): Integer; stdcall;
- {$EXTERNALSYM lstrcmpiA}
- function lstrcmpiW(lpString1, lpString2: LPCWSTR): Integer; stdcall;
- {$EXTERNALSYM lstrcmpiW}
- {$IFDEF UNICODE}
- function lstrcmpi(lpString1, lpString2: LPCWSTR): Integer; stdcall;
- {$EXTERNALSYM lstrcmpi}
- {$ELSE}
- function lstrcmpi(lpString1, lpString2: LPCSTR): Integer; stdcall;
- {$EXTERNALSYM lstrcmpi}
- {$ENDIF}
- function lstrcpynA(lpString1: LPSTR; lpString2: LPCSTR; iMaxLength: Integer): LPSTR; stdcall;
- {$EXTERNALSYM lstrcpynA}
- function lstrcpynW(lpString1: LPWSTR; lpString2: LPCWSTR; iMaxLength: Integer): LPWSTR; stdcall;
- {$EXTERNALSYM lstrcpynW}
- {$IFDEF UNICODE}
- function lstrcpyn(lpString1: LPWSTR; lpString2: LPCWSTR; iMaxLength: Integer): LPWSTR; stdcall;
- {$EXTERNALSYM lstrcpyn}
- {$ELSE}
- function lstrcpyn(lpString1: LPSTR; lpString2: LPCSTR; iMaxLength: Integer): LPSTR; stdcall;
- {$EXTERNALSYM lstrcpyn}
- {$ENDIF}
- function lstrcpyA(lpString1: LPSTR; lpString2: LPCSTR): LPSTR; stdcall;
- {$EXTERNALSYM lstrcpyA}
- function lstrcpyW(lpString1: LPWSTR; lpString2: LPCWSTR): LPWSTR; stdcall;
- {$EXTERNALSYM lstrcpyW}
- {$IFDEF UNICODE}
- function lstrcpy(lpString1: LPWSTR; lpString2: LPCWSTR): LPWSTR; stdcall;
- {$EXTERNALSYM lstrcpy}
- {$ELSE}
- function lstrcpy(lpString1: LPSTR; lpString2: LPCSTR): LPSTR; stdcall;
- {$EXTERNALSYM lstrcpy}
- {$ENDIF}
- function lstrcatA(lpString1: LPSTR; lpString2: LPCSTR): LPSTR; stdcall;
- {$EXTERNALSYM lstrcatA}
- function lstrcatW(lpString1: LPWSTR; lpString2: LPCWSTR): LPWSTR; stdcall;
- {$EXTERNALSYM lstrcatW}
- {$IFDEF UNICODE}
- function lstrcat(lpString1: LPWSTR; lpString2: LPCWSTR): LPWSTR; stdcall;
- {$EXTERNALSYM lstrcat}
- {$ELSE}
- function lstrcat(lpString1: LPSTR; lpString2: LPCSTR): LPSTR; stdcall;
- {$EXTERNALSYM lstrcat}
- {$ENDIF}
- function lstrlenA(lpString: LPCSTR): Integer; stdcall;
- {$EXTERNALSYM lstrlenA}
- function lstrlenW(lpString: LPCWSTR): Integer; stdcall;
- {$EXTERNALSYM lstrlenW}
- {$IFDEF UNICODE}
- function lstrlen(lpString: LPCWSTR): Integer; stdcall;
- {$EXTERNALSYM lstrlen}
- {$ELSE}
- function lstrlen(lpString: LPCSTR): Integer; stdcall;
- {$EXTERNALSYM lstrlen}
- {$ENDIF}
- function OpenFile(lpFileName: LPCSTR; var lpReOpenBuff: OFSTRUCT; uStyle: UINT): HFILE; stdcall;
- {$EXTERNALSYM OpenFile}
- function _lopen(lpPathName: LPCSTR; iReadWrite: Integer): HFILE; stdcall;
- {$EXTERNALSYM _lopen}
- function _lcreat(lpPathName: LPCSTR; iAttribute: Integer): HFILE; stdcall;
- {$EXTERNALSYM _lcreat}
- function _lread(hFile: HFILE; lpBuffer: LPVOID; uBytes: UINT): UINT; stdcall;
- {$EXTERNALSYM _lread}
- function _lwrite(hFile: HFILE; lpBuffer: LPCSTR; uBytes: UINT): UINT; stdcall;
- {$EXTERNALSYM _lwrite}
- function _hread(hFile: HFILE; lpBuffer: LPVOID; lBytes: Longint): Longint; stdcall;
- {$EXTERNALSYM _hread}
- function _hwrite(hFile: HFILE; lpBuffer: LPCSTR; lBytes: Longint): Longint; stdcall;
- {$EXTERNALSYM _hwrite}
- function _lclose(hFile: HFILE): HFILE; stdcall;
- {$EXTERNALSYM _lclose}
- function _llseek(hFile: HFILE; lOffset: LONG; iOrigin: Integer): LONG; stdcall;
- {$EXTERNALSYM _llseek}
- function IsTextUnicode(lpBuffer: LPVOID; cb: Integer; lpi: LPINT): BOOL; stdcall;
- {$EXTERNALSYM IsTextUnicode}
- type
- PFLS_CALLBACK_FUNCTION = procedure (lpFlsData: PVOID); stdcall;
- {$EXTERNALSYM PFLS_CALLBACK_FUNCTION}
- TFlsCallbackFunction = PFLS_CALLBACK_FUNCTION;
- const
- FLS_OUT_OF_INDEXES = DWORD($FFFFFFFF);
- {$EXTERNALSYM FLS_OUT_OF_INDEXES}
- function FlsAlloc(lpCallback: PFLS_CALLBACK_FUNCTION): DWORD; stdcall;
- {$EXTERNALSYM FlsAlloc}
- function FlsGetValue(dwFlsIndex: DWORD): DWORD; stdcall;
- {$EXTERNALSYM FlsGetValue}
- function FlsSetValue(dwFlsIndex: DWORD; lpFlsData: PVOID): DWORD; stdcall;
- {$EXTERNALSYM FlsSetValue}
- function FlsFree(dwFlsIndex: DWORD): DWORD; stdcall;
- {$EXTERNALSYM FlsFree}
- const
- TLS_OUT_OF_INDEXES = DWORD($FFFFFFFF);
- {$EXTERNALSYM TLS_OUT_OF_INDEXES}
- function TlsAlloc: DWORD; stdcall;
- {$EXTERNALSYM TlsAlloc}
- function TlsGetValue(dwTlsIndex: DWORD): LPVOID; stdcall;
- {$EXTERNALSYM TlsGetValue}
- function TlsSetValue(dwTlsIndex: DWORD; lpTlsValue: LPVOID): BOOL; stdcall;
- {$EXTERNALSYM TlsSetValue}
- function TlsFree(dwTlsIndex: DWORD): BOOL; stdcall;
- {$EXTERNALSYM TlsFree}
- type
- LPOVERLAPPED_COMPLETION_ROUTINE = procedure (dwErrorCode: DWORD;
- dwNumberOfBytesTransfered: DWORD; lpOverlapped: LPOVERLAPPED); stdcall;
- {$EXTERNALSYM LPOVERLAPPED_COMPLETION_ROUTINE}
- TOverlappedCompletionRoutine = LPOVERLAPPED_COMPLETION_ROUTINE;
- function SleepEx(dwMilliseconds: DWORD; bAlertable: BOOL): DWORD; stdcall;
- {$EXTERNALSYM SleepEx}
- function WaitForSingleObjectEx(hHandle: HANDLE; dwMilliseconds: DWORD;
- bAlertable: BOOL): DWORD; stdcall;
- {$EXTERNALSYM WaitForSingleObjectEx}
- function WaitForMultipleObjectsEx(nCount: DWORD; lpHandles: PHANDLE;
- bWaitAll: BOOL; dwMilliseconds: DWORD; bAlertable: BOOL): DWORD; stdcall;
- {$EXTERNALSYM WaitForMultipleObjectsEx}
- function SignalObjectAndWait(hObjectToSignal: HANDLE; hObjectToWaitOn: HANDLE;
- dwMilliseconds: DWORD; bAlertable: BOOL): DWORD; stdcall;
- {$EXTERNALSYM SignalObjectAndWait}
- function ReadFileEx(hFile: HANDLE; lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
- lpOverlapped: LPOVERLAPPED; lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE): BOOL; stdcall;
- {$EXTERNALSYM ReadFileEx}
- function WriteFileEx(hFile: HANDLE; lpBuffer: LPCVOID; nNumberOfBytesToWrite: DWORD;
- lpOverlapped: LPOVERLAPPED; lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE): BOOL; stdcall;
- {$EXTERNALSYM WriteFileEx}
- function BackupRead(hFile: HANDLE; lpBuffer: LPBYTE;
- nNumberOfBytesToRead: DWORD; var lpNumberOfBytesRead: DWORD;
- bAbort, bProcessSecurity: BOOL; var lpContext: LPVOID): BOOL; stdcall;
- {$EXTERNALSYM BackupRead}
- function BackupSeek(hFile: HANDLE; dwLowBytesToSeek, dwHighBytesToSeek: DWORD;
- var lpdwLowByteSeeked, lpdwHighByteSeeked: DWORD; var lpContext: LPVOID): BOOL; stdcall;
- {$EXTERNALSYM BackupSeek}
- function BackupWrite(hFile: HANDLE; lpBuffer: LPBYTE; nNumberOfBytesToWrite: DWORD;
- var lpNumberOfBytesWritten: DWORD; bAbort, bProcessSecurity: BOOL;
- var lpContext: LPVOID): BOOL; stdcall;
- {$EXTERNALSYM BackupWrite}
- //
- // Stream id structure
- //
- type
- LPWIN32_STREAM_ID = ^WIN32_STREAM_ID;
- {$EXTERNALSYM LPWIN32_STREAM_ID}
- _WIN32_STREAM_ID = record
- dwStreamId: DWORD;
- dwStreamAttributes: DWORD;
- Size: TLargeInteger;
- dwStreamNameSize: DWORD;
- cStreamName: array [0..ANYSIZE_ARRAY - 1] of WCHAR;
- end;
- {$EXTERNALSYM _WIN32_STREAM_ID}
- WIN32_STREAM_ID = _WIN32_STREAM_ID;
- {$EXTERNALSYM WIN32_STREAM_ID}
- TWin32StreamId = WIN32_STREAM_ID;
- PWin32StreamId = LPWIN32_STREAM_ID;
- //
- // Stream Ids
- //
- const
- BACKUP_INVALID = $00000000;
- {$EXTERNALSYM BACKUP_INVALID}
- BACKUP_DATA = $00000001;
- {$EXTERNALSYM BACKUP_DATA}
- BACKUP_EA_DATA = $00000002;
- {$EXTERNALSYM BACKUP_EA_DATA}
- BACKUP_SECURITY_DATA = $00000003;
- {$EXTERNALSYM BACKUP_SECURITY_DATA}
- BACKUP_ALTERNATE_DATA = $00000004;
- {$EXTERNALSYM BACKUP_ALTERNATE_DATA}
- BACKUP_LINK = $00000005;
- {$EXTERNALSYM BACKUP_LINK}
- BACKUP_PROPERTY_DATA = $00000006;
- {$EXTERNALSYM BACKUP_PROPERTY_DATA}
- BACKUP_OBJECT_ID = $00000007;
- {$EXTERNALSYM BACKUP_OBJECT_ID}
- BACKUP_REPARSE_DATA = $00000008;
- {$EXTERNALSYM BACKUP_REPARSE_DATA}
- BACKUP_SPARSE_BLOCK = $00000009;
- {$EXTERNALSYM BACKUP_SPARSE_BLOCK}
- //
- // Stream Attributes
- //
- const
- STREAM_NORMAL_ATTRIBUTE = $00000000;
- {$EXTERNALSYM STREAM_NORMAL_ATTRIBUTE}
- STREAM_MODIFIED_WHEN_READ = $00000001;
- {$EXTERNALSYM STREAM_MODIFIED_WHEN_READ}
- STREAM_CONTAINS_SECURITY = $00000002;
- {$EXTERNALSYM STREAM_CONTAINS_SECURITY}
- STREAM_CONTAINS_PROPERTIES = $00000004;
- {$EXTERNALSYM STREAM_CONTAINS_PROPERTIES}
- STREAM_SPARSE_ATTRIBUTE = $00000008;
- {$EXTERNALSYM STREAM_SPARSE_ATTRIBUTE}
- function ReadFileScatter(hFile: HANDLE; aSegmentArray: PFILE_SEGMENT_ELEMENT;
- nNumberOfBytesToRead: DWORD; lpReserved: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM ReadFileScatter}
- function WriteFileGather(hFile: HANDLE; aSegmentArray: PFILE_SEGMENT_ELEMENT;
- nNumberOfBytesToWrite: DWORD; lpReserved: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM WriteFileGather}
- //
- // Dual Mode API below this line. Dual Mode Structures also included.
- //
- const
- STARTF_USESHOWWINDOW = $00000001;
- {$EXTERNALSYM STARTF_USESHOWWINDOW}
- STARTF_USESIZE = $00000002;
- {$EXTERNALSYM STARTF_USESIZE}
- STARTF_USEPOSITION = $00000004;
- {$EXTERNALSYM STARTF_USEPOSITION}
- STARTF_USECOUNTCHARS = $00000008;
- {$EXTERNALSYM STARTF_USECOUNTCHARS}
- STARTF_USEFILLATTRIBUTE = $00000010;
- {$EXTERNALSYM STARTF_USEFILLATTRIBUTE}
- STARTF_RUNFULLSCREEN = $00000020; // ignored for non-x86 platforms
- {$EXTERNALSYM STARTF_RUNFULLSCREEN}
- STARTF_FORCEONFEEDBACK = $00000040;
- {$EXTERNALSYM STARTF_FORCEONFEEDBACK}
- STARTF_FORCEOFFFEEDBACK = $00000080;
- {$EXTERNALSYM STARTF_FORCEOFFFEEDBACK}
- STARTF_USESTDHANDLES = $00000100;
- {$EXTERNALSYM STARTF_USESTDHANDLES}
- STARTF_USEHOTKEY = $00000200;
- {$EXTERNALSYM STARTF_USEHOTKEY}
- type
- LPSTARTUPINFOA = ^STARTUPINFOA;
- {$EXTERNALSYM LPSTARTUPINFOA}
- _STARTUPINFOA = record
- cb: DWORD;
- lpReserved: LPSTR;
- lpDesktop: LPSTR;
- lpTitle: LPSTR;
- dwX: DWORD;
- dwY: DWORD;
- dwXSize: DWORD;
- dwYSize: DWORD;
- dwXCountChars: DWORD;
- dwYCountChars: DWORD;
- dwFillAttribute: DWORD;
- dwFlags: DWORD;
- wShowWindow: WORD;
- cbReserved2: WORD;
- lpReserved2: LPBYTE;
- hStdInput: HANDLE;
- hStdOutput: HANDLE;
- hStdError: HANDLE;
- end;
- {$EXTERNALSYM _STARTUPINFOA}
- STARTUPINFOA = _STARTUPINFOA;
- {$EXTERNALSYM STARTUPINFOA}
- TStartupInfoA = STARTUPINFOA;
- PStartupInfoA = LPSTARTUPINFOA;
- LPSTARTUPINFOW = ^STARTUPINFOW;
- {$EXTERNALSYM LPSTARTUPINFOW}
- _STARTUPINFOW = record
- cb: DWORD;
- lpReserved: LPWSTR;
- lpDesktop: LPWSTR;
- lpTitle: LPWSTR;
- dwX: DWORD;
- dwY: DWORD;
- dwXSize: DWORD;
- dwYSize: DWORD;
- dwXCountChars: DWORD;
- dwYCountChars: DWORD;
- dwFillAttribute: DWORD;
- dwFlags: DWORD;
- wShowWindow: WORD;
- cbReserved2: WORD;
- lpReserved2: LPBYTE;
- hStdInput: HANDLE;
- hStdOutput: HANDLE;
- hStdError: HANDLE;
- end;
- {$EXTERNALSYM _STARTUPINFOW}
- STARTUPINFOW = _STARTUPINFOW;
- {$EXTERNALSYM STARTUPINFOW}
- TStartupInfoW = STARTUPINFOW;
- PStartupInfoW = LPSTARTUPINFOW;
- {$IFDEF UNICODE}
- STARTUPINFO = STARTUPINFOW;
- {$EXTERNALSYM STARTUPINFO}
- LPSTARTUPINFO = LPSTARTUPINFOW;
- {$EXTERNALSYM LPSTARTUPINFO}
- TStartupInfo = TStartupInfoW;
- PStartupInfo = PStartupInfoW;
- {$ELSE}
- STARTUPINFO = STARTUPINFOA;
- {$EXTERNALSYM STARTUPINFO}
- LPSTARTUPINFO = LPSTARTUPINFOA;
- {$EXTERNALSYM LPSTARTUPINFO}
- TStartupInfo = TStartupInfoA;
- PStartupInfo = PStartupInfoA;
- {$ENDIF}
- const
- SHUTDOWN_NORETRY = $00000001;
- {$EXTERNALSYM SHUTDOWN_NORETRY}
- type
- PWIN32_FIND_DATAA = ^WIN32_FIND_DATAA;
- {$EXTERNALSYM PWIN32_FIND_DATAA}
- _WIN32_FIND_DATAA = record
- dwFileAttributes: DWORD;
- ftCreationTime: FILETIME;
- ftLastAccessTime: FILETIME;
- ftLastWriteTime: FILETIME;
- nFileSizeHigh: DWORD;
- nFileSizeLow: DWORD;
- dwReserved0: DWORD;
- dwReserved1: DWORD;
- cFileName: array [0..MAX_PATH - 1] of CHAR;
- cAlternateFileName: array [0..13] of CHAR;
- end;
- {$EXTERNALSYM _WIN32_FIND_DATAA}
- WIN32_FIND_DATAA = _WIN32_FIND_DATAA;
- {$EXTERNALSYM WIN32_FIND_DATAA}
- LPWIN32_FIND_DATAA = ^WIN32_FIND_DATAA;
- {$EXTERNALSYM LPWIN32_FIND_DATAA}
- TWin32FindDataA = WIN32_FIND_DATAA;
- PWin32FindDataA = PWIN32_FIND_DATAA;
- PWIN32_FIND_DATAW = ^WIN32_FIND_DATAW;
- {$EXTERNALSYM PWIN32_FIND_DATAW}
- _WIN32_FIND_DATAW = record
- dwFileAttributes: DWORD;
- ftCreationTime: FILETIME;
- ftLastAccessTime: FILETIME;
- ftLastWriteTime: FILETIME;
- nFileSizeHigh: DWORD;
- nFileSizeLow: DWORD;
- dwReserved0: DWORD;
- dwReserved1: DWORD;
- cFileName: array [0..MAX_PATH - 1] of WCHAR;
- cAlternateFileName: array [0..13] of WCHAR;
- end;
- {$EXTERNALSYM _WIN32_FIND_DATAW}
- WIN32_FIND_DATAW = _WIN32_FIND_DATAW;
- {$EXTERNALSYM WIN32_FIND_DATAW}
- LPWIN32_FIND_DATAW = ^WIN32_FIND_DATAW;
- {$EXTERNALSYM LPWIN32_FIND_DATAW}
- TWin32FindDataW = WIN32_FIND_DATAW;
- PWin32FindDataW = PWIN32_FIND_DATAW;
- {$IFDEF UNICODE}
- WIN32_FIND_DATA = WIN32_FIND_DATAW;
- {$EXTERNALSYM WIN32_FIND_DATA}
- PWIN32_FIND_DATA = PWIN32_FIND_DATAW;
- {$EXTERNALSYM PWIN32_FIND_DATA}
- LPWIN32_FIND_DATA = LPWIN32_FIND_DATAW;
- {$EXTERNALSYM LPWIN32_FIND_DATA}
- TWin32FindData = TWin32FindDataW;
- PWin32FindData = PWin32FindDataW;
- {$ELSE}
- WIN32_FIND_DATA = WIN32_FIND_DATAA;
- {$EXTERNALSYM WIN32_FIND_DATA}
- PWIN32_FIND_DATA = PWIN32_FIND_DATAA;
- {$EXTERNALSYM PWIN32_FIND_DATA}
- LPWIN32_FIND_DATA = LPWIN32_FIND_DATAA;
- {$EXTERNALSYM LPWIN32_FIND_DATA}
- TWin32FindData = TWin32FindDataA;
- PWin32FindData = PWin32FindDataA;
- {$ENDIF}
- LPWIN32_FILE_ATTRIBUTE_DATA = ^WIN32_FILE_ATTRIBUTE_DATA;
- {$EXTERNALSYM LPWIN32_FILE_ATTRIBUTE_DATA}
- _WIN32_FILE_ATTRIBUTE_DATA = record
- dwFileAttributes: DWORD;
- ftCreationTime: FILETIME;
- ftLastAccessTime: FILETIME;
- ftLastWriteTime: FILETIME;
- nFileSizeHigh: DWORD;
- nFileSizeLow: DWORD;
- end;
- {$EXTERNALSYM _WIN32_FILE_ATTRIBUTE_DATA}
- WIN32_FILE_ATTRIBUTE_DATA = _WIN32_FILE_ATTRIBUTE_DATA;
- {$EXTERNALSYM WIN32_FILE_ATTRIBUTE_DATA}
- TWin32FileAttributeData = WIN32_FILE_ATTRIBUTE_DATA;
- PWin32FileAttributeData = LPWIN32_FILE_ATTRIBUTE_DATA;
- function CreateMutexA(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
- {$EXTERNALSYM CreateMutexA}
- function CreateMutexW(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
- {$EXTERNALSYM CreateMutexW}
- {$IFDEF UNICODE}
- function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES;
- bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
- {$EXTERNALSYM CreateMutex}
- {$ELSE}
- function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES;
- bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
- {$EXTERNALSYM CreateMutex}
- {$ENDIF}
- function OpenMutexA(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenMutexA}
- function OpenMutexW(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenMutexW}
- {$IFDEF UNICODE}
- function OpenMutex(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenMutex}
- {$ELSE}
- function OpenMutex(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenMutex}
- {$ENDIF}
- function CreateEventA(lpEventAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset, bInitialState: BOOL; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateEventA}
- function CreateEventW(lpEventAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset, bInitialState: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateEventW}
- {$IFDEF UNICODE}
- function CreateEvent(lpEventAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset, bInitialState: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateEvent}
- {$ELSE}
- function CreateEvent(lpEventAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset, bInitialState: BOOL; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateEvent}
- {$ENDIF}
- function OpenEventA(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenEventA}
- function OpenEventW(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenEventW}
- {$IFDEF UNICODE}
- function OpenEvent(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenEvent}
- {$ELSE}
- function OpenEvent(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenEvent}
- {$ENDIF}
- function CreateSemaphoreA(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
- lInitialCount, lMaximumCount: LONG; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateSemaphoreA}
- function CreateSemaphoreW(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
- lInitialCount, lMaximumCount: LONG; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateSemaphoreW}
- {$IFDEF UNICODE}
- function CreateSemaphore(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
- lInitialCount, lMaximumCount: LONG; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateSemaphore}
- {$ELSE}
- function CreateSemaphore(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
- lInitialCount, lMaximumCount: LONG; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateSemaphore}
- {$ENDIF}
- function OpenSemaphoreA(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenSemaphoreA}
- function OpenSemaphoreW(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenSemaphoreW}
- {$IFDEF UNICODE}
- function OpenSemaphore(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenSemaphore}
- {$ELSE}
- function OpenSemaphore(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenSemaphore}
- {$ENDIF}
- type
- PTIMERAPCROUTINE = procedure (lpArgToCompletionRoutine: LPVOID;
- dwTimerLowValue, dwTimerHighValue: DWORD); stdcall;
- {$EXTERNALSYM PTIMERAPCROUTINE}
- TTimerApcRoutine = PTIMERAPCROUTINE;
- function CreateWaitableTimerA(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset: BOOL; lpTimerName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateWaitableTimerA}
- function CreateWaitableTimerW(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset: BOOL; lpTimerName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateWaitableTimerW}
- {$IFDEF UNICODE}
- function CreateWaitableTimer(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset: BOOL; lpTimerName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateWaitableTimer}
- {$ELSE}
- function CreateWaitableTimer(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset: BOOL; lpTimerName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateWaitableTimer}
- {$ENDIF}
- function OpenWaitableTimerA(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpTimerName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenWaitableTimerA}
- function OpenWaitableTimerW(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpTimerName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenWaitableTimerW}
- {$IFDEF UNICODE}
- function OpenWaitableTimer(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpTimerName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenWaitableTimer}
- {$ELSE}
- function OpenWaitableTimer(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpTimerName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenWaitableTimer}
- {$ENDIF}
- function SetWaitableTimer(hTimer: HANDLE; var lpDueTime: LARGE_INTEGER;
- lPeriod: LONG; pfnCompletionRoutine: PTIMERAPCROUTINE;
- lpArgToCompletionRoutine: LPVOID; fResume: BOOL): BOOL; stdcall;
- {$EXTERNALSYM SetWaitableTimer}
- function CancelWaitableTimer(hTimer: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM CancelWaitableTimer}
- function CreateFileMappingA(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
- flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateFileMappingA}
- function CreateFileMappingW(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
- flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateFileMappingW}
- {$IFDEF UNICODE}
- function CreateFileMapping(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
- flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateFileMapping}
- {$ELSE}
- function CreateFileMapping(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
- flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM CreateFileMapping}
- {$ENDIF}
- function OpenFileMappingA(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenFileMappingA}
- function OpenFileMappingW(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenFileMappingW}
- {$IFDEF UNICODE}
- function OpenFileMapping(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCWSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenFileMapping}
- {$ELSE}
- function OpenFileMapping(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCSTR): HANDLE; stdcall;
- {$EXTERNALSYM OpenFileMapping}
- {$ENDIF}
- function GetLogicalDriveStringsA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
- {$EXTERNALSYM GetLogicalDriveStringsA}
- function GetLogicalDriveStringsW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetLogicalDriveStringsW}
- {$IFDEF UNICODE}
- function GetLogicalDriveStrings(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetLogicalDriveStrings}
- {$ELSE}
- function GetLogicalDriveStrings(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
- {$EXTERNALSYM GetLogicalDriveStrings}
- {$ENDIF}
- type
- _MEMORY_RESOURCE_NOTIFICATION_TYPE = (
- LowMemoryResourceNotification,
- HighMemoryResourceNotification);
- {$EXTERNALSYM _MEMORY_RESOURCE_NOTIFICATION_TYPE}
- MEMORY_RESOURCE_NOTIFICATION_TYPE = _MEMORY_RESOURCE_NOTIFICATION_TYPE;
- {$EXTERNALSYM MEMORY_RESOURCE_NOTIFICATION_TYPE}
- TMemoryResourceNotification = MEMORY_RESOURCE_NOTIFICATION_TYPE;
- function CreateMemoryResourceNotification(NotificationType: MEMORY_RESOURCE_NOTIFICATION_TYPE): HANDLE; stdcall;
- {$EXTERNALSYM CreateMemoryResourceNotification}
- function QueryMemoryResourceNotification(ResourceNotificationHandle: HANDLE;
- ResourceState: BOOL): BOOL; stdcall;
- {$EXTERNALSYM QueryMemoryResourceNotification}
- function LoadLibraryA(lpLibFileName: LPCSTR): HMODULE; stdcall;
- {$EXTERNALSYM LoadLibraryA}
- function LoadLibraryW(lpLibFileName: LPCWSTR): HMODULE; stdcall;
- {$EXTERNALSYM LoadLibraryW}
- {$IFDEF UNICODE}
- function LoadLibrary(lpLibFileName: LPCWSTR): HMODULE; stdcall;
- {$EXTERNALSYM LoadLibrary}
- {$ELSE}
- function LoadLibrary(lpLibFileName: LPCSTR): HMODULE; stdcall;
- {$EXTERNALSYM LoadLibrary}
- {$ENDIF}
- function LoadLibraryExA(lpLibFileName: LPCSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
- {$EXTERNALSYM LoadLibraryExA}
- function LoadLibraryExW(lpLibFileName: LPCWSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
- {$EXTERNALSYM LoadLibraryExW}
- {$IFDEF UNICODE}
- function LoadLibraryEx(lpLibFileName: LPCWSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
- {$EXTERNALSYM LoadLibraryEx}
- {$ELSE}
- function LoadLibraryEx(lpLibFileName: LPCSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
- {$EXTERNALSYM LoadLibraryEx}
- {$ENDIF}
- const
- DONT_RESOLVE_DLL_REFERENCES = $00000001;
- {$EXTERNALSYM DONT_RESOLVE_DLL_REFERENCES}
- LOAD_LIBRARY_AS_DATAFILE = $00000002;
- {$EXTERNALSYM LOAD_LIBRARY_AS_DATAFILE}
- LOAD_WITH_ALTERED_SEARCH_PATH = $00000008;
- {$EXTERNALSYM LOAD_WITH_ALTERED_SEARCH_PATH}
- LOAD_IGNORE_CODE_AUTHZ_LEVEL = $00000010;
- {$EXTERNALSYM LOAD_IGNORE_CODE_AUTHZ_LEVEL}
- function GetModuleFileNameA(hModule: HMODULE; lpFilename: LPSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetModuleFileNameA}
- function GetModuleFileNameW(hModule: HMODULE; lpFilename: LPWSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetModuleFileNameW}
- {$IFDEF UNICODE}
- function GetModuleFileName(hModule: HMODULE; lpFilename: LPWSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetModuleFileName}
- {$ELSE}
- function GetModuleFileName(hModule: HMODULE; lpFilename: LPSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetModuleFileName}
- {$ENDIF}
- function GetModuleHandleA(lpModuleName: LPCSTR): HMODULE; stdcall;
- {$EXTERNALSYM GetModuleHandleA}
- function GetModuleHandleW(lpModuleName: LPCWSTR): HMODULE; stdcall;
- {$EXTERNALSYM GetModuleHandleW}
- {$IFDEF UNICODE}
- function GetModuleHandle(lpModuleName: LPCWSTR): HMODULE; stdcall;
- {$EXTERNALSYM GetModuleHandle}
- {$ELSE}
- function GetModuleHandle(lpModuleName: LPCSTR): HMODULE; stdcall;
- {$EXTERNALSYM GetModuleHandle}
- {$ENDIF}
- const
- GET_MODULE_HANDLE_EX_FLAG_PIN = ($00000001);
- {$EXTERNALSYM GET_MODULE_HANDLE_EX_FLAG_PIN}
- GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = ($00000002);
- {$EXTERNALSYM GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT}
- GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = ($00000004);
- {$EXTERNALSYM GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS}
- type
- PGET_MODULE_HANDLE_EXA = function (dwFlags: DWORD; lpModuleName: LPCSTR; var phModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM PGET_MODULE_HANDLE_EXA}
- PGET_MODULE_HANDLE_EXW = function (dwFlags: DWORD; lpModuleName: LPCWSTR; var phModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM PGET_MODULE_HANDLE_EXW}
- {$IFDEF UNICODE}
- PGET_MODULE_HANDLE_EX = PGET_MODULE_HANDLE_EXW;
- {$EXTERNALSYM PGET_MODULE_HANDLE_EX}
- {$ELSE}
- PGET_MODULE_HANDLE_EX = PGET_MODULE_HANDLE_EXA;
- {$EXTERNALSYM PGET_MODULE_HANDLE_EX}
- {$ENDIF}
- function GetModuleHandleExA(dwFlags: DWORD; lpModuleName: LPCSTR; var phModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM GetModuleHandleExA}
- function GetModuleHandleExW(dwFlags: DWORD; lpModuleName: LPCWSTR; var phModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM GetModuleHandleExW}
- {$IFDEF UNICODE}
- function GetModuleHandleEx(dwFlags: DWORD; lpModuleName: LPCWSTR; var phModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM GetModuleHandleEx}
- {$ELSE}
- function GetModuleHandleEx(dwFlags: DWORD; lpModuleName: LPCSTR; var phModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM GetModuleHandleEx}
- {$ENDIF}
- function CreateProcessA(lpApplicationName: LPCSTR; lpCommandLine: LPSTR;
- lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
- bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
- lpCurrentDirectory: LPCSTR; const lpStartupInfo: STARTUPINFOA;
- var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
- {$EXTERNALSYM CreateProcessA}
- function CreateProcessW(lpApplicationName: LPCWSTR; lpCommandLine: LPWSTR;
- lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
- bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
- lpCurrentDirectory: LPCWSTR; const lpStartupInfo: STARTUPINFOW;
- var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
- {$EXTERNALSYM CreateProcessW}
- {$IFDEF UNICODE}
- function CreateProcess(lpApplicationName: LPCWSTR; lpCommandLine: LPWSTR;
- lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
- bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
- lpCurrentDirectory: LPCWSTR; const lpStartupInfo: STARTUPINFOW;
- var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
- {$EXTERNALSYM CreateProcess}
- {$ELSE}
- function CreateProcess(lpApplicationName: LPCSTR; lpCommandLine: LPSTR;
- lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
- bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
- lpCurrentDirectory: LPCSTR; const lpStartupInfo: STARTUPINFOA;
- var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
- {$EXTERNALSYM CreateProcess}
- {$ENDIF}
- function SetProcessShutdownParameters(dwLevel, dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetProcessShutdownParameters}
- function GetProcessShutdownParameters(var lpdwLevel, lpdwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetProcessShutdownParameters}
- function GetProcessVersion(ProcessId: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetProcessVersion}
- procedure FatalAppExitA(uAction: UINT; lpMessageText: LPCSTR); stdcall;
- {$EXTERNALSYM FatalAppExitA}
- procedure FatalAppExitW(uAction: UINT; lpMessageText: LPCWSTR); stdcall;
- {$EXTERNALSYM FatalAppExitW}
- {$IFDEF UNICODE}
- procedure FatalAppExit(uAction: UINT; lpMessageText: LPCWSTR); stdcall;
- {$EXTERNALSYM FatalAppExit}
- {$ELSE}
- procedure FatalAppExit(uAction: UINT; lpMessageText: LPCSTR); stdcall;
- {$EXTERNALSYM FatalAppExit}
- {$ENDIF}
- procedure GetStartupInfoA(var lpStartupInfo: STARTUPINFOA); stdcall;
- {$EXTERNALSYM GetStartupInfoA}
- procedure GetStartupInfoW(var lpStartupInfo: STARTUPINFOW); stdcall;
- {$EXTERNALSYM GetStartupInfoW}
- {$IFDEF UNICODE}
- procedure GetStartupInfo(var lpStartupInfo: STARTUPINFOW); stdcall;
- {$EXTERNALSYM GetStartupInfo}
- {$ELSE}
- procedure GetStartupInfo(var lpStartupInfo: STARTUPINFOA); stdcall;
- {$EXTERNALSYM GetStartupInfo}
- {$ENDIF}
- function GetCommandLineA: LPSTR; stdcall;
- {$EXTERNALSYM GetCommandLineA}
- function GetCommandLineW: LPWSTR; stdcall;
- {$EXTERNALSYM GetCommandLineW}
- {$IFDEF UNICODE}
- function GetCommandLine: LPWSTR; stdcall;
- {$EXTERNALSYM GetCommandLine}
- {$ELSE}
- function GetCommandLine: LPSTR; stdcall;
- {$EXTERNALSYM GetCommandLine}
- {$ENDIF}
- function GetEnvironmentVariableA(lpName: LPCSTR; lpBuffer: LPSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetEnvironmentVariableA}
- function GetEnvironmentVariableW(lpName: LPCWSTR; lpBuffer: LPWSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetEnvironmentVariableW}
- {$IFDEF UNICODE}
- function GetEnvironmentVariable(lpName: LPCWSTR; lpBuffer: LPWSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetEnvironmentVariable}
- {$ELSE}
- function GetEnvironmentVariable(lpName: LPCSTR; lpBuffer: LPSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetEnvironmentVariable}
- {$ENDIF}
- function SetEnvironmentVariableA(lpName, lpValue: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM SetEnvironmentVariableA}
- function SetEnvironmentVariableW(lpName, lpValue: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM SetEnvironmentVariableW}
- {$IFDEF UNICODE}
- function SetEnvironmentVariable(lpName, lpValue: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM SetEnvironmentVariable}
- {$ELSE}
- function SetEnvironmentVariable(lpName, lpValue: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM SetEnvironmentVariable}
- {$ENDIF}
- function ExpandEnvironmentStringsA(lpSrc: LPCSTR; lpDst: LPSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM ExpandEnvironmentStringsA}
- function ExpandEnvironmentStringsW(lpSrc: LPCWSTR; lpDst: LPWSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM ExpandEnvironmentStringsW}
- {$IFDEF UNICODE}
- function ExpandEnvironmentStrings(lpSrc: LPCWSTR; lpDst: LPWSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM ExpandEnvironmentStrings}
- {$ELSE}
- function ExpandEnvironmentStrings(lpSrc: LPCSTR; lpDst: LPSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM ExpandEnvironmentStrings}
- {$ENDIF}
- function GetFirmwareEnvironmentVariableA(lpName, lpGuid: LPCSTR; pBuffer: PVOID;
- nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetFirmwareEnvironmentVariableA}
- function GetFirmwareEnvironmentVariableW(lpName, lpGuid: LPCWSTR; pBuffer: PVOID;
- nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetFirmwareEnvironmentVariableW}
- {$IFDEF UNICODE}
- function GetFirmwareEnvironmentVariable(lpName, lpGuid: LPCWSTR; pBuffer: PVOID;
- nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetFirmwareEnvironmentVariable}
- {$ELSE}
- function GetFirmwareEnvironmentVariable(lpName, lpGuid: LPCSTR; pBuffer: PVOID;
- nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetFirmwareEnvironmentVariable}
- {$ENDIF}
- function SetFirmwareEnvironmentVariableA(lpName, lpGuid: LPCSTR; pValue: PVOID;
- nSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetFirmwareEnvironmentVariableA}
- function SetFirmwareEnvironmentVariableW(lpName, lpGuid: LPCWSTR; pValue: PVOID;
- nSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetFirmwareEnvironmentVariableW}
- {$IFDEF UNICODE}
- function SetFirmwareEnvironmentVariable(lpName, lpGuid: LPCWSTR; pValue: PVOID;
- nSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetFirmwareEnvironmentVariable}
- {$ELSE}
- function SetFirmwareEnvironmentVariable(lpName, lpGuid: LPCSTR; pValue: PVOID;
- nSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SetFirmwareEnvironmentVariable}
- {$ENDIF}
- procedure OutputDebugStringA(lpOutputString: LPCSTR); stdcall;
- {$EXTERNALSYM OutputDebugStringA}
- procedure OutputDebugStringW(lpOutputString: LPCWSTR); stdcall;
- {$EXTERNALSYM OutputDebugStringW}
- {$IFDEF UNICODE}
- procedure OutputDebugString(lpOutputString: LPCWSTR); stdcall;
- {$EXTERNALSYM OutputDebugString}
- {$ELSE}
- procedure OutputDebugString(lpOutputString: LPCSTR); stdcall;
- {$EXTERNALSYM OutputDebugString}
- {$ENDIF}
- function FindResourceA(hModule: HMODULE; lpName, lpType: LPCSTR): HRSRC; stdcall;
- {$EXTERNALSYM FindResourceA}
- function FindResourceW(hModule: HMODULE; lpName, lpType: LPCWSTR): HRSRC; stdcall;
- {$EXTERNALSYM FindResourceW}
- {$IFDEF UNICODE}
- function FindResource(hModule: HMODULE; lpName, lpType: LPCWSTR): HRSRC; stdcall;
- {$EXTERNALSYM FindResource}
- {$ELSE}
- function FindResource(hModule: HMODULE; lpName, lpType: LPCSTR): HRSRC; stdcall;
- {$EXTERNALSYM FindResource}
- {$ENDIF}
- function FindResourceExA(hModule: HMODULE; lpType, lpName: LPCSTR; wLanguage: WORD): HRSRC; stdcall;
- {$EXTERNALSYM FindResourceExA}
- function FindResourceExW(hModule: HMODULE; lpType, lpName: LPCWSTR; wLanguage: WORD): HRSRC; stdcall;
- {$EXTERNALSYM FindResourceExW}
- {$IFDEF UNICODE}
- function FindResourceEx(hModule: HMODULE; lpType, lpName: LPCWSTR; wLanguage: WORD): HRSRC; stdcall;
- {$EXTERNALSYM FindResourceEx}
- {$ELSE}
- function FindResourceEx(hModule: HMODULE; lpType, lpName: LPCSTR; wLanguage: WORD): HRSRC; stdcall;
- {$EXTERNALSYM FindResourceEx}
- {$ENDIF}
- type
- ENUMRESTYPEPROCA = function (hModule: HMODULE; lpType: LPSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESTYPEPROCA}
- ENUMRESTYPEPROCW = function (hModule: HMODULE; lpType: LPWSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESTYPEPROCW}
- TEnumResTypeProcA = ENUMRESTYPEPROCA;
- TEnumResTypeProcW = ENUMRESTYPEPROCW;
- {$IFDEF UNICODE}
- ENUMRESTYPEPROC = function (hModule: HMODULE; lpType: LPWSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESTYPEPROC}
- TEnumResTypeProc = ENUMRESTYPEPROCW;
- {$ELSE}
- ENUMRESTYPEPROC = function (hModule: HMODULE; lpType: LPSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESTYPEPROC}
- TEnumResTypeProc = ENUMRESTYPEPROCA;
- {$ENDIF}
- ENUMRESNAMEPROCA = function (hModule: HMODULE; lpType: LPCSTR; lpName: LPSTR;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESNAMEPROCA}
- ENUMRESNAMEPROCW = function (hModule: HMODULE; lpType: LPCWSTR; lpName: LPWSTR;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESNAMEPROCW}
- TEnumResNameProcA = ENUMRESNAMEPROCA;
- TEnumResNameProcW = ENUMRESNAMEPROCW;
- {$IFDEF UNICODE}
- ENUMRESNAMEPROC = function (hModule: HMODULE; lpType: LPCWSTR; lpName: LPWSTR;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESNAMEPROC}
- TEnumResNameProc = ENUMRESNAMEPROCW;
- {$ELSE}
- ENUMRESNAMEPROC = function (hModule: HMODULE; lpType: LPCSTR; lpName: LPSTR;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESNAMEPROC}
- TEnumResNameProc = ENUMRESNAMEPROCA;
- {$ENDIF}
- ENUMRESLANGPROCA = function (hModule: HMODULE; lpType, lpName: LPCSTR;
- wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESLANGPROCA}
- ENUMRESLANGPROCW = function (hModule: HMODULE; lpType, lpName: LPCWSTR;
- wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESLANGPROCW}
- TEnumResLangProcA = ENUMRESLANGPROCA;
- TEnumResLangProcW = ENUMRESLANGPROCW;
- {$IFDEF UNICODE}
- ENUMRESLANGPROC = function (hModule: HMODULE; lpType, lpName: LPCWSTR;
- wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESLANGPROC}
- TEnumResLangProc = ENUMRESLANGPROCW;
- {$ELSE}
- ENUMRESLANGPROC = function (hModule: HMODULE; lpType, lpName: LPCSTR;
- wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESLANGPROC}
- TEnumResLangProc = ENUMRESLANGPROCA;
- {$ENDIF}
- function EnumResourceTypesA(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROCA;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceTypesA}
- function EnumResourceTypesW(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROCW;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceTypesW}
- {$IFDEF UNICODE}
- function EnumResourceTypes(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROCW;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceTypes}
- {$ELSE}
- function EnumResourceTypes(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROCA;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceTypes}
- {$ENDIF}
- function EnumResourceNamesA(hModule: HMODULE; lpType: LPCSTR;
- lpEnumFunc: ENUMRESNAMEPROCA; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceNamesA}
- function EnumResourceNamesW(hModule: HMODULE; lpType: LPCWSTR;
- lpEnumFunc: ENUMRESNAMEPROCW; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceNamesW}
- {$IFDEF UNICODE}
- function EnumResourceNames(hModule: HMODULE; lpType: LPCWSTR;
- lpEnumFunc: ENUMRESNAMEPROCW; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceNames}
- {$ELSE}
- function EnumResourceNames(hModule: HMODULE; lpType: LPCSTR;
- lpEnumFunc: ENUMRESNAMEPROCA; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceNames}
- {$ENDIF}
- function EnumResourceLanguagesA(hModule: HMODULE; lpType, lpName: LPCSTR;
- lpEnumFunc: ENUMRESLANGPROCA; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceLanguagesA}
- function EnumResourceLanguagesW(hModule: HMODULE; lpType, lpName: LPCWSTR;
- lpEnumFunc: ENUMRESLANGPROCW; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceLanguagesW}
- {$IFDEF UNICODE}
- function EnumResourceLanguages(hModule: HMODULE; lpType, lpName: LPCWSTR;
- lpEnumFunc: ENUMRESLANGPROCW; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceLanguages}
- {$ELSE}
- function EnumResourceLanguages(hModule: HMODULE; lpType, lpName: LPCSTR;
- lpEnumFunc: ENUMRESLANGPROCA; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM EnumResourceLanguages}
- {$ENDIF}
- function BeginUpdateResourceA(pFileName: LPCSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
- {$EXTERNALSYM BeginUpdateResourceA}
- function BeginUpdateResourceW(pFileName: LPCWSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
- {$EXTERNALSYM BeginUpdateResourceW}
- {$IFDEF UNICODE}
- function BeginUpdateResource(pFileName: LPCWSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
- {$EXTERNALSYM BeginUpdateResource}
- {$ELSE}
- function BeginUpdateResource(pFileName: LPCSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
- {$EXTERNALSYM BeginUpdateResource}
- {$ENDIF}
- function UpdateResourceA(hUpdate: HANDLE; lpType, lpName: LPCSTR;
- wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
- {$EXTERNALSYM UpdateResourceA}
- function UpdateResourceW(hUpdate: HANDLE; lpType, lpName: LPCWSTR;
- wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
- {$EXTERNALSYM UpdateResourceW}
- {$IFDEF UNICODE}
- function UpdateResource(hUpdate: HANDLE; lpType, lpName: LPCWSTR;
- wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
- {$EXTERNALSYM UpdateResource}
- {$ELSE}
- function UpdateResource(hUpdate: HANDLE; lpType, lpName: LPCSTR;
- wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
- {$EXTERNALSYM UpdateResource}
- {$ENDIF}
- function EndUpdateResourceA(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
- {$EXTERNALSYM EndUpdateResourceA}
- function EndUpdateResourceW(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
- {$EXTERNALSYM EndUpdateResourceW}
- {$IFDEF UNICODE}
- function EndUpdateResource(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
- {$EXTERNALSYM EndUpdateResource}
- {$ELSE}
- function EndUpdateResource(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
- {$EXTERNALSYM EndUpdateResource}
- {$ENDIF}
- function GlobalAddAtomA(lpString: LPCSTR): ATOM; stdcall;
- {$EXTERNALSYM GlobalAddAtomA}
- function GlobalAddAtomW(lpString: LPCWSTR): ATOM; stdcall;
- {$EXTERNALSYM GlobalAddAtomW}
- {$IFDEF UNICODE}
- function GlobalAddAtom(lpString: LPCWSTR): ATOM; stdcall;
- {$EXTERNALSYM GlobalAddAtom}
- {$ELSE}
- function GlobalAddAtom(lpString: LPCSTR): ATOM; stdcall;
- {$EXTERNALSYM GlobalAddAtom}
- {$ENDIF}
- function GlobalFindAtomA(lpString: LPCSTR): ATOM; stdcall;
- {$EXTERNALSYM GlobalFindAtomA}
- function GlobalFindAtomW(lpString: LPCWSTR): ATOM; stdcall;
- {$EXTERNALSYM GlobalFindAtomW}
- {$IFDEF UNICODE}
- function GlobalFindAtom(lpString: LPCWSTR): ATOM; stdcall;
- {$EXTERNALSYM GlobalFindAtom}
- {$ELSE}
- function GlobalFindAtom(lpString: LPCSTR): ATOM; stdcall;
- {$EXTERNALSYM GlobalFindAtom}
- {$ENDIF}
- function GlobalGetAtomNameA(nAtom: ATOM; lpBuffer: LPSTR; nSize: Integer): UINT; stdcall;
- {$EXTERNALSYM GlobalGetAtomNameA}
- function GlobalGetAtomNameW(nAtom: ATOM; lpBuffer: LPWSTR; nSize: Integer): UINT; stdcall;
- {$EXTERNALSYM GlobalGetAtomNameW}
- {$IFDEF UNICODE}
- function GlobalGetAtomName(nAtom: ATOM; lpBuffer: LPWSTR; nSize: Integer): UINT; stdcall;
- {$EXTERNALSYM GlobalGetAtomName}
- {$ELSE}
- function GlobalGetAtomName(nAtom: ATOM; lpBuffer: LPSTR; nSize: Integer): UINT; stdcall;
- {$EXTERNALSYM GlobalGetAtomName}
- {$ENDIF}
- function AddAtomA(lpString: LPCSTR): ATOM; stdcall;
- {$EXTERNALSYM AddAtomA}
- function AddAtomW(lpString: LPCWSTR): ATOM; stdcall;
- {$EXTERNALSYM AddAtomW}
- {$IFDEF UNICODE}
- function AddAtom(lpString: LPCWSTR): ATOM; stdcall;
- {$EXTERNALSYM AddAtom}
- {$ELSE}
- function AddAtom(lpString: LPCSTR): ATOM; stdcall;
- {$EXTERNALSYM AddAtom}
- {$ENDIF}
- function FindAtomA(lpString: LPCSTR): ATOM; stdcall;
- {$EXTERNALSYM FindAtomA}
- function FindAtomW(lpString: LPCWSTR): ATOM; stdcall;
- {$EXTERNALSYM FindAtomW}
- {$IFDEF UNICODE}
- function FindAtom(lpString: LPCWSTR): ATOM; stdcall;
- {$EXTERNALSYM FindAtom}
- {$ELSE}
- function FindAtom(lpString: LPCSTR): ATOM; stdcall;
- {$EXTERNALSYM FindAtom}
- {$ENDIF}
- function GetAtomNameA(nAtom: ATOM; lpBuffer: LPSTR; nSize: Integer): UINT; stdcall;
- {$EXTERNALSYM GetAtomNameA}
- function GetAtomNameW(nAtom: ATOM; lpBuffer: LPWSTR; nSize: Integer): UINT; stdcall;
- {$EXTERNALSYM GetAtomNameW}
- {$IFDEF UNICODE}
- function GetAtomName(nAtom: ATOM; lpBuffer: LPWSTR; nSize: Integer): UINT; stdcall;
- {$EXTERNALSYM GetAtomName}
- {$ELSE}
- function GetAtomName(nAtom: ATOM; lpBuffer: LPSTR; nSize: Integer): UINT; stdcall;
- {$EXTERNALSYM GetAtomName}
- {$ENDIF}
- function GetProfileIntA(lpAppName, lpKeyName: LPCSTR; nDefault: Integer): UINT; stdcall;
- {$EXTERNALSYM GetProfileIntA}
- function GetProfileIntW(lpAppName, lpKeyName: LPCWSTR; nDefault: Integer): UINT; stdcall;
- {$EXTERNALSYM GetProfileIntW}
- {$IFDEF UNICODE}
- function GetProfileInt(lpAppName, lpKeyName: LPCWSTR; nDefault: Integer): UINT; stdcall;
- {$EXTERNALSYM GetProfileInt}
- {$ELSE}
- function GetProfileInt(lpAppName, lpKeyName: LPCSTR; nDefault: Integer): UINT; stdcall;
- {$EXTERNALSYM GetProfileInt}
- {$ENDIF}
- function GetProfileStringA(lpAppName, lpKeyName, lpDefault: LPCSTR;
- lpReturnedString: LPSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetProfileStringA}
- function GetProfileStringW(lpAppName, lpKeyName, lpDefault: LPCWSTR;
- lpReturnedString: LPWSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetProfileStringW}
- {$IFDEF UNICODE}
- function GetProfileString(lpAppName, lpKeyName, lpDefault: LPCWSTR;
- lpReturnedString: LPWSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetProfileString}
- {$ELSE}
- function GetProfileString(lpAppName, lpKeyName, lpDefault: LPCSTR;
- lpReturnedString: LPSTR; nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetProfileString}
- {$ENDIF}
- function WriteProfileStringA(lpAppName, lpKeyName, lpString: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WriteProfileStringA}
- function WriteProfileStringW(lpAppName, lpKeyName, lpString: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WriteProfileStringW}
- {$IFDEF UNICODE}
- function WriteProfileString(lpAppName, lpKeyName, lpString: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WriteProfileString}
- {$ELSE}
- function WriteProfileString(lpAppName, lpKeyName, lpString: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WriteProfileString}
- {$ENDIF}
- function GetProfileSectionA(lpAppName: LPCSTR; lpReturnedString: LPSTR;
- nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetProfileSectionA}
- function GetProfileSectionW(lpAppName: LPCWSTR; lpReturnedString: LPWSTR;
- nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetProfileSectionW}
- {$IFDEF UNICODE}
- function GetProfileSection(lpAppName: LPCWSTR; lpReturnedString: LPWSTR;
- nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetProfileSection}
- {$ELSE}
- function GetProfileSection(lpAppName: LPCSTR; lpReturnedString: LPSTR;
- nSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetProfileSection}
- {$ENDIF}
- function WriteProfileSectionA(lpAppName, lpString: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WriteProfileSectionA}
- function WriteProfileSectionW(lpAppName, lpString: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WriteProfileSectionW}
- {$IFDEF UNICODE}
- function WriteProfileSection(lpAppName, lpString: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WriteProfileSection}
- {$ELSE}
- function WriteProfileSection(lpAppName, lpString: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WriteProfileSection}
- {$ENDIF}
- function GetPrivateProfileIntA(lpAppName, lpKeyName: LPCSTR; nDefault: Integer;
- lpFileName: LPCSTR): UINT; stdcall;
- {$EXTERNALSYM GetPrivateProfileIntA}
- function GetPrivateProfileIntW(lpAppName, lpKeyName: LPCWSTR; nDefault: Integer;
- lpFileName: LPCWSTR): UINT; stdcall;
- {$EXTERNALSYM GetPrivateProfileIntW}
- {$IFDEF UNICODE}
- function GetPrivateProfileInt(lpAppName, lpKeyName: LPCWSTR; nDefault: Integer;
- lpFileName: LPCWSTR): UINT; stdcall;
- {$EXTERNALSYM GetPrivateProfileInt}
- {$ELSE}
- function GetPrivateProfileInt(lpAppName, lpKeyName: LPCSTR; nDefault: Integer;
- lpFileName: LPCSTR): UINT; stdcall;
- {$EXTERNALSYM GetPrivateProfileInt}
- {$ENDIF}
- function GetPrivateProfileStringA(lpAppName, lpKeyName, lpDefault: LPCSTR;
- lpReturnedString: LPSTR; nSize: DWORD; lpFileName: LPCSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileStringA}
- function GetPrivateProfileStringW(lpAppName, lpKeyName, lpDefault: LPCWSTR;
- lpReturnedString: LPWSTR; nSize: DWORD; lpFileName: LPCWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileStringW}
- {$IFDEF UNICODE}
- function GetPrivateProfileString(lpAppName, lpKeyName, lpDefault: LPCWSTR;
- lpReturnedString: LPWSTR; nSize: DWORD; lpFileName: LPCWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileString}
- {$ELSE}
- function GetPrivateProfileString(lpAppName, lpKeyName, lpDefault: LPCSTR;
- lpReturnedString: LPSTR; nSize: DWORD; lpFileName: LPCSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileString}
- {$ENDIF}
- function WritePrivateProfileStringA(lpAppName, lpKeyName, lpString,
- lpFileName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileStringA}
- function WritePrivateProfileStringW(lpAppName, lpKeyName, lpString,
- lpFileName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileStringW}
- {$IFDEF UNICODE}
- function WritePrivateProfileString(lpAppName, lpKeyName, lpString,
- lpFileName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileString}
- {$ELSE}
- function WritePrivateProfileString(lpAppName, lpKeyName, lpString,
- lpFileName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileString}
- {$ENDIF}
- function GetPrivateProfileSectionA(lpAppName: LPCSTR; lpReturnedString: LPSTR;
- nSize: DWORD; lpFileName: LPCSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileSectionA}
- function GetPrivateProfileSectionW(lpAppName: LPCWSTR; lpReturnedString: LPWSTR;
- nSize: DWORD; lpFileName: LPCWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileSectionW}
- {$IFDEF UNICODE}
- function GetPrivateProfileSection(lpAppName: LPCWSTR; lpReturnedString: LPWSTR;
- nSize: DWORD; lpFileName: LPCWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileSection}
- {$ELSE}
- function GetPrivateProfileSection(lpAppName: LPCSTR; lpReturnedString: LPSTR;
- nSize: DWORD; lpFileName: LPCSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileSection}
- {$ENDIF}
- function WritePrivateProfileSectionA(lpAppName, lpString, lpFileName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileSectionA}
- function WritePrivateProfileSectionW(lpAppName, lpString, lpFileName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileSectionW}
- {$IFDEF UNICODE}
- function WritePrivateProfileSection(lpAppName, lpString, lpFileName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileSection}
- {$ELSE}
- function WritePrivateProfileSection(lpAppName, lpString, lpFileName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileSection}
- {$ENDIF}
- function GetPrivateProfileSectionNamesA(lpszReturnBuffer: LPSTR; nSize: DWORD;
- lpFileName: LPCSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileSectionNamesA}
- function GetPrivateProfileSectionNamesW(lpszReturnBuffer: LPWSTR; nSize: DWORD;
- lpFileName: LPCWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileSectionNamesW}
- {$IFDEF UNICODE}
- function GetPrivateProfileSectionNames(lpszReturnBuffer: LPWSTR; nSize: DWORD;
- lpFileName: LPCWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileSectionNames}
- {$ELSE}
- function GetPrivateProfileSectionNames(lpszReturnBuffer: LPSTR; nSize: DWORD;
- lpFileName: LPCSTR): DWORD; stdcall;
- {$EXTERNALSYM GetPrivateProfileSectionNames}
- {$ENDIF}
- function GetPrivateProfileStructA(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM GetPrivateProfileStructA}
- function GetPrivateProfileStructW(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM GetPrivateProfileStructW}
- {$IFDEF UNICODE}
- function GetPrivateProfileStruct(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM GetPrivateProfileStruct}
- {$ELSE}
- function GetPrivateProfileStruct(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM GetPrivateProfileStruct}
- {$ENDIF}
- function WritePrivateProfileStructA(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileStructA}
- function WritePrivateProfileStructW(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileStructW}
- {$IFDEF UNICODE}
- function WritePrivateProfileStruct(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileStruct}
- {$ELSE}
- function WritePrivateProfileStruct(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM WritePrivateProfileStruct}
- {$ENDIF}
- function GetDriveTypeA(lpRootPathName: LPCSTR): UINT; stdcall;
- {$EXTERNALSYM GetDriveTypeA}
- function GetDriveTypeW(lpRootPathName: LPCWSTR): UINT; stdcall;
- {$EXTERNALSYM GetDriveTypeW}
- {$IFDEF UNICODE}
- function GetDriveType(lpRootPathName: LPCWSTR): UINT; stdcall;
- {$EXTERNALSYM GetDriveType}
- {$ELSE}
- function GetDriveType(lpRootPathName: LPCSTR): UINT; stdcall;
- {$EXTERNALSYM GetDriveType}
- {$ENDIF}
- function GetSystemDirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemDirectoryA}
- function GetSystemDirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemDirectoryW}
- {$IFDEF UNICODE}
- function GetSystemDirectory(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemDirectory}
- {$ELSE}
- function GetSystemDirectory(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemDirectory}
- {$ENDIF}
- function GetTempPathA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
- {$EXTERNALSYM GetTempPathA}
- function GetTempPathW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetTempPathW}
- {$IFDEF UNICODE}
- function GetTempPath(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetTempPath}
- {$ELSE}
- function GetTempPath(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
- {$EXTERNALSYM GetTempPath}
- {$ENDIF}
- function GetTempFileNameA(lpPathName, lpPrefixString: LPCSTR; uUnique: UINT;
- lpTempFileName: LPSTR): UINT; stdcall;
- {$EXTERNALSYM GetTempFileNameA}
- function GetTempFileNameW(lpPathName, lpPrefixString: LPCWSTR; uUnique: UINT;
- lpTempFileName: LPWSTR): UINT; stdcall;
- {$EXTERNALSYM GetTempFileNameW}
- {$IFDEF UNICODE}
- function GetTempFileName(lpPathName, lpPrefixString: LPCWSTR; uUnique: UINT;
- lpTempFileName: LPWSTR): UINT; stdcall;
- {$EXTERNALSYM GetTempFileName}
- {$ELSE}
- function GetTempFileName(lpPathName, lpPrefixString: LPCSTR; uUnique: UINT;
- lpTempFileName: LPSTR): UINT; stdcall;
- {$EXTERNALSYM GetTempFileName}
- {$ENDIF}
- function GetWindowsDirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetWindowsDirectoryA}
- function GetWindowsDirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetWindowsDirectoryW}
- {$IFDEF UNICODE}
- function GetWindowsDirectory(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetWindowsDirectory}
- {$ELSE}
- function GetWindowsDirectory(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetWindowsDirectory}
- {$ENDIF}
- function GetSystemWindowsDirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemWindowsDirectoryA}
- function GetSystemWindowsDirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemWindowsDirectoryW}
- {$IFDEF UNICODE}
- function GetSystemWindowsDirectory(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemWindowsDirectory}
- {$ELSE}
- function GetSystemWindowsDirectory(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemWindowsDirectory}
- {$ENDIF}
- function GetSystemWow64DirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemWow64DirectoryA}
- function GetSystemWow64DirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemWow64DirectoryW}
- {$IFDEF UNICODE}
- function GetSystemWow64Directory(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemWow64Directory}
- {$ELSE}
- function GetSystemWow64Directory(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetSystemWow64Directory}
- {$ENDIF}
- //
- // for GetProcAddress
- //
- type
- PGET_SYSTEM_WOW64_DIRECTORY_A = function (lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM PGET_SYSTEM_WOW64_DIRECTORY_A}
- PGET_SYSTEM_WOW64_DIRECTORY_W = function (lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM PGET_SYSTEM_WOW64_DIRECTORY_W}
- //
- // GetProcAddress only accepts GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A,
- // GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A, GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A.
- // The others are if you want to use the strings in some other way.
- //
- const
- GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A = 'GetSystemWow64DirectoryA';
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W = WideString('GetSystemWow64DirectoryA');
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T = __TEXT('GetSystemWow64DirectoryA');
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A = 'GetSystemWow64DirectoryW';
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W = WideString('GetSystemWow64DirectoryW');
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T = __TEXT('GetSystemWow64DirectoryW');
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T}
- {$IFDEF UNICODE}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A = GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W = GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T = GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T}
- {$ELSE}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A = GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W = GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T = GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T}
- {$ENDIF}
- function SetCurrentDirectoryA(lpPathName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM SetCurrentDirectoryA}
- function SetCurrentDirectoryW(lpPathName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM SetCurrentDirectoryW}
- {$IFDEF UNICODE}
- function SetCurrentDirectory(lpPathName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM SetCurrentDirectory}
- {$ELSE}
- function SetCurrentDirectory(lpPathName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM SetCurrentDirectory}
- {$ENDIF}
- function GetCurrentDirectoryA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
- {$EXTERNALSYM GetCurrentDirectoryA}
- function GetCurrentDirectoryW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetCurrentDirectoryW}
- {$IFDEF UNICODE}
- function GetCurrentDirectory(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetCurrentDirectory}
- {$ELSE}
- function GetCurrentDirectory(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
- {$EXTERNALSYM GetCurrentDirectory}
- {$ENDIF}
- //#if _WIN32_WINNT >= 0x0502
- function SetDllDirectoryA(lpPathName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM SetDllDirectoryA}
- function SetDllDirectoryW(lpPathName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM SetDllDirectoryW}
- {$IFDEF UNICODE}
- function SetDllDirectory(lpPathName: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM SetDllDirectory}
- {$ELSE}
- function SetDllDirectory(lpPathName: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM SetDllDirectory}
- {$ENDIF}
- function GetDllDirectoryA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
- {$EXTERNALSYM GetDllDirectoryA}
- function GetDllDirectoryW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetDllDirectoryW}
- {$IFDEF UNICODE}
- function GetDllDirectory(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM GetDllDirectory}
- {$ELSE}
- function GetDllDirectory(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
- {$EXTERNALSYM GetDllDirectory}
- {$ENDIF}
- //#endif // _WIN32_WINNT >= 0x0502
- function GetDiskFreeSpaceA(lpRootPathName: LPCSTR; var lpSectorsPerCluster,
- lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetDiskFreeSpaceA}
- function GetDiskFreeSpaceW(lpRootPathName: LPCWSTR; var lpSectorsPerCluster,
- lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetDiskFreeSpaceW}
- {$IFDEF UNICODE}
- function GetDiskFreeSpace(lpRootPathName: LPCWSTR; var lpSectorsPerCluster,
- lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetDiskFreeSpace}
- {$ELSE}
- function GetDiskFreeSpace(lpRootPathName: LPCSTR; lpSectorsPerCluster,
- lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
- {$EXTERNALSYM GetDiskFreeSpace}
- {$ENDIF}
- function GetDiskFreeSpaceExA(lpDirectoryName: LPCSTR; var lpFreeBytesAvailableToCaller,
- lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
- {$EXTERNALSYM GetDiskFreeSpaceExA}
- function GetDiskFreeSpaceExW(lpDirectoryName: LPCWSTR; var lpFreeBytesAvailableToCaller,
- lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
- {$EXTERNALSYM GetDiskFreeSpaceExW}
- {$IFDEF UNICODE}
- function GetDiskFreeSpaceEx(lpDirectoryName: LPCWSTR; var lpFreeBytesAvailableToCaller,
- lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
- {$EXTERNALSYM GetDiskFreeSpaceEx}
- {$ELSE}
- function GetDiskFreeSpaceEx(lpDirectoryName: LPCSTR; var lpFreeBytesAvailableToCaller,
- lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
- {$EXTERNALSYM GetDiskFreeSpaceEx}
- {$ENDIF}
- function CreateDirectoryA(lpPathName: LPCSTR; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
- {$EXTERNALSYM CreateDirectoryA}
- function CreateDirectoryW(lpPathName: LPCWSTR; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
- {$EXTERNALSYM CreateDirectoryW}
- {$IFDEF UNICODE}
- function CreateDirectory(lpPathName: LPCWSTR; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
- {$EXTERNALSYM CreateDirectory}
- {$ELSE}