JwaWinBase.pas
资源名称:win32api.zip [点击查看]
上传用户:davidchvip
上传日期:2009-07-28
资源大小:1749k
文件大小:683k
源码类别:
Windows编程
开发平台:
Delphi
- end;
- end;
- {$ELSE}
- function CreateFiber; external kernel32 name 'CreateFiber';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateFiberEx: Pointer;
- function CreateFiberEx;
- begin
- GetProcedureAddress(_CreateFiberEx, kernel32, 'CreateFiberEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateFiberEx]
- end;
- end;
- {$ELSE}
- function CreateFiberEx; external kernel32 name 'CreateFiberEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DeleteFiber: Pointer;
- procedure DeleteFiber;
- begin
- GetProcedureAddress(_DeleteFiber, kernel32, 'DeleteFiber');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DeleteFiber]
- end;
- end;
- {$ELSE}
- procedure DeleteFiber; external kernel32 name 'DeleteFiber';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ConvertThreadToFiber: Pointer;
- function ConvertThreadToFiber;
- begin
- GetProcedureAddress(_ConvertThreadToFiber, kernel32, 'ConvertThreadToFiber');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ConvertThreadToFiber]
- end;
- end;
- {$ELSE}
- function ConvertThreadToFiber; external kernel32 name 'ConvertThreadToFiber';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ConvertThreadToFiberEx: Pointer;
- function ConvertThreadToFiberEx;
- begin
- GetProcedureAddress(_ConvertThreadToFiberEx, kernel32, 'ConvertThreadToFiberEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ConvertThreadToFiberEx]
- end;
- end;
- {$ELSE}
- function ConvertThreadToFiberEx; external kernel32 name 'ConvertThreadToFiberEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ConvertFiberToThread: Pointer;
- function ConvertFiberToThread;
- begin
- GetProcedureAddress(_ConvertFiberToThread, kernel32, 'ConvertFiberToThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ConvertFiberToThread]
- end;
- end;
- {$ELSE}
- function ConvertFiberToThread; external kernel32 name 'ConvertFiberToThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SwitchToFiber: Pointer;
- procedure SwitchToFiber;
- begin
- GetProcedureAddress(_SwitchToFiber, kernel32, 'SwitchToFiber');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SwitchToFiber]
- end;
- end;
- {$ELSE}
- procedure SwitchToFiber; external kernel32 name 'SwitchToFiber';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SwitchToThread: Pointer;
- function SwitchToThread;
- begin
- GetProcedureAddress(_SwitchToThread, kernel32, 'SwitchToThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SwitchToThread]
- end;
- end;
- {$ELSE}
- function SwitchToThread; external kernel32 name 'SwitchToThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateThread: Pointer;
- function CreateThread;
- begin
- GetProcedureAddress(_CreateThread, kernel32, 'CreateThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateThread]
- end;
- end;
- {$ELSE}
- function CreateThread; external kernel32 name 'CreateThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateRemoteThread: Pointer;
- function CreateRemoteThread;
- begin
- GetProcedureAddress(_CreateRemoteThread, kernel32, 'CreateRemoteThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateRemoteThread]
- end;
- end;
- {$ELSE}
- function CreateRemoteThread; external kernel32 name 'CreateRemoteThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetCurrentThread: Pointer;
- function GetCurrentThread;
- begin
- GetProcedureAddress(_GetCurrentThread, kernel32, 'GetCurrentThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetCurrentThread]
- end;
- end;
- {$ELSE}
- function GetCurrentThread; external kernel32 name 'GetCurrentThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetCurrentThreadId: Pointer;
- function GetCurrentThreadId;
- begin
- GetProcedureAddress(_GetCurrentThreadId, kernel32, 'GetCurrentThreadId');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetCurrentThreadId]
- end;
- end;
- {$ELSE}
- function GetCurrentThreadId; external kernel32 name 'GetCurrentThreadId';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetProcessIdOfThread: Pointer;
- function GetProcessIdOfThread;
- begin
- GetProcedureAddress(_GetProcessIdOfThread, kernel32, 'GetProcessIdOfThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetProcessIdOfThread]
- end;
- end;
- {$ELSE}
- function GetProcessIdOfThread; external kernel32 name 'GetProcessIdOfThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetThreadId: Pointer;
- function GetThreadId;
- begin
- GetProcedureAddress(_GetThreadId, kernel32, 'GetThreadId');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetThreadId]
- end;
- end;
- {$ELSE}
- function GetThreadId; external kernel32 name 'GetThreadId';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetProcessId: Pointer;
- function GetProcessId;
- begin
- GetProcedureAddress(_GetProcessId, kernel32, 'GetProcessId');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetProcessId]
- end;
- end;
- {$ELSE}
- function GetProcessId; external kernel32 name 'GetProcessId';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetCurrentProcessorNumber: Pointer;
- function GetCurrentProcessorNumber;
- begin
- GetProcedureAddress(_GetCurrentProcessorNumber, kernel32, 'GetCurrentProcessorNumber');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetCurrentProcessorNumber]
- end;
- end;
- {$ELSE}
- function GetCurrentProcessorNumber; external kernel32 name 'GetCurrentProcessorNumber';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetThreadAffinityMask: Pointer;
- function SetThreadAffinityMask;
- begin
- GetProcedureAddress(_SetThreadAffinityMask, kernel32, 'SetThreadAffinityMask');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetThreadAffinityMask]
- end;
- end;
- {$ELSE}
- function SetThreadAffinityMask; external kernel32 name 'SetThreadAffinityMask';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetThreadIdealProcessor: Pointer;
- function SetThreadIdealProcessor;
- begin
- GetProcedureAddress(_SetThreadIdealProcessor, kernel32, 'SetThreadIdealProcessor');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetThreadIdealProcessor]
- end;
- end;
- {$ELSE}
- function SetThreadIdealProcessor; external kernel32 name 'SetThreadIdealProcessor';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetProcessPriorityBoost: Pointer;
- function SetProcessPriorityBoost;
- begin
- GetProcedureAddress(_SetProcessPriorityBoost, kernel32, 'SetProcessPriorityBoost');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetProcessPriorityBoost]
- end;
- end;
- {$ELSE}
- function SetProcessPriorityBoost; external kernel32 name 'SetProcessPriorityBoost';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetProcessPriorityBoost: Pointer;
- function GetProcessPriorityBoost;
- begin
- GetProcedureAddress(_GetProcessPriorityBoost, kernel32, 'GetProcessPriorityBoost');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetProcessPriorityBoost]
- end;
- end;
- {$ELSE}
- function GetProcessPriorityBoost; external kernel32 name 'GetProcessPriorityBoost';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _RequestWakeupLatency: Pointer;
- function RequestWakeupLatency;
- begin
- GetProcedureAddress(_RequestWakeupLatency, kernel32, 'RequestWakeupLatency');
- asm
- mov esp, ebp
- pop ebp
- jmp [_RequestWakeupLatency]
- end;
- end;
- {$ELSE}
- function RequestWakeupLatency; external kernel32 name 'RequestWakeupLatency';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _IsSystemResumeAutomatic: Pointer;
- function IsSystemResumeAutomatic;
- begin
- GetProcedureAddress(_IsSystemResumeAutomatic, kernel32, 'IsSystemResumeAutomatic');
- asm
- mov esp, ebp
- pop ebp
- jmp [_IsSystemResumeAutomatic]
- end;
- end;
- {$ELSE}
- function IsSystemResumeAutomatic; external kernel32 name 'IsSystemResumeAutomatic';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenThread: Pointer;
- function OpenThread;
- begin
- GetProcedureAddress(_OpenThread, kernel32, 'OpenThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenThread]
- end;
- end;
- {$ELSE}
- function OpenThread; external kernel32 name 'OpenThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetThreadPriority: Pointer;
- function SetThreadPriority;
- begin
- GetProcedureAddress(_SetThreadPriority, kernel32, 'SetThreadPriority');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetThreadPriority]
- end;
- end;
- {$ELSE}
- function SetThreadPriority; external kernel32 name 'SetThreadPriority';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetThreadPriorityBoost: Pointer;
- function SetThreadPriorityBoost;
- begin
- GetProcedureAddress(_SetThreadPriorityBoost, kernel32, 'SetThreadPriorityBoost');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetThreadPriorityBoost]
- end;
- end;
- {$ELSE}
- function SetThreadPriorityBoost; external kernel32 name 'SetThreadPriorityBoost';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetThreadPriorityBoost: Pointer;
- function GetThreadPriorityBoost;
- begin
- GetProcedureAddress(_GetThreadPriorityBoost, kernel32, 'GetThreadPriorityBoost');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetThreadPriorityBoost]
- end;
- end;
- {$ELSE}
- function GetThreadPriorityBoost; external kernel32 name 'GetThreadPriorityBoost';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetThreadPriority: Pointer;
- function GetThreadPriority;
- begin
- GetProcedureAddress(_GetThreadPriority, kernel32, 'GetThreadPriority');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetThreadPriority]
- end;
- end;
- {$ELSE}
- function GetThreadPriority; external kernel32 name 'GetThreadPriority';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetThreadTimes: Pointer;
- function GetThreadTimes;
- begin
- GetProcedureAddress(_GetThreadTimes, kernel32, 'GetThreadTimes');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetThreadTimes]
- end;
- end;
- {$ELSE}
- function GetThreadTimes; external kernel32 name 'GetThreadTimes';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ExitThread: Pointer;
- procedure ExitThread;
- begin
- GetProcedureAddress(_ExitThread, kernel32, 'ExitThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ExitThread]
- end;
- end;
- {$ELSE}
- procedure ExitThread; external kernel32 name 'ExitThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _TerminateThread: Pointer;
- function TerminateThread;
- begin
- GetProcedureAddress(_TerminateThread, kernel32, 'TerminateThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_TerminateThread]
- end;
- end;
- {$ELSE}
- function TerminateThread; external kernel32 name 'TerminateThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetExitCodeThread: Pointer;
- function GetExitCodeThread;
- begin
- GetProcedureAddress(_GetExitCodeThread, kernel32, 'GetExitCodeThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetExitCodeThread]
- end;
- end;
- {$ELSE}
- function GetExitCodeThread; external kernel32 name 'GetExitCodeThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetThreadSelectorEntry: Pointer;
- function GetThreadSelectorEntry;
- begin
- GetProcedureAddress(_GetThreadSelectorEntry, kernel32, 'GetThreadSelectorEntry');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetThreadSelectorEntry]
- end;
- end;
- {$ELSE}
- function GetThreadSelectorEntry; external kernel32 name 'GetThreadSelectorEntry';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetThreadExecutionState: Pointer;
- function SetThreadExecutionState;
- begin
- GetProcedureAddress(_SetThreadExecutionState, kernel32, 'SetThreadExecutionState');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetThreadExecutionState]
- end;
- end;
- {$ELSE}
- function SetThreadExecutionState; external kernel32 name 'SetThreadExecutionState';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetLastError: Pointer;
- function GetLastError;
- begin
- GetProcedureAddress(_GetLastError, kernel32, 'GetLastError');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetLastError]
- end;
- end;
- {$ELSE}
- function GetLastError; external kernel32 name 'GetLastError';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetLastError: Pointer;
- procedure SetLastError;
- begin
- GetProcedureAddress(_SetLastError, kernel32, 'SetLastError');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetLastError]
- end;
- end;
- {$ELSE}
- procedure SetLastError; external kernel32 name 'SetLastError';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _RestoreLastError: Pointer;
- procedure RestoreLastError;
- begin
- GetProcedureAddress(_RestoreLastError, kernel32, 'RestoreLastError');
- asm
- mov esp, ebp
- pop ebp
- jmp [_RestoreLastError]
- end;
- end;
- {$ELSE}
- procedure RestoreLastError; external kernel32 name 'RestoreLastError';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetOverlappedResult: Pointer;
- function GetOverlappedResult;
- begin
- GetProcedureAddress(_GetOverlappedResult, kernel32, 'GetOverlappedResult');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetOverlappedResult]
- end;
- end;
- {$ELSE}
- function GetOverlappedResult; external kernel32 name 'GetOverlappedResult';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateIoCompletionPort: Pointer;
- function CreateIoCompletionPort;
- begin
- GetProcedureAddress(_CreateIoCompletionPort, kernel32, 'CreateIoCompletionPort');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateIoCompletionPort]
- end;
- end;
- {$ELSE}
- function CreateIoCompletionPort; external kernel32 name 'CreateIoCompletionPort';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetQueuedCompletionStatus: Pointer;
- function GetQueuedCompletionStatus;
- begin
- GetProcedureAddress(_GetQueuedCompletionStatus, kernel32, 'GetQueuedCompletionStatus');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetQueuedCompletionStatus]
- end;
- end;
- {$ELSE}
- function GetQueuedCompletionStatus; external kernel32 name 'GetQueuedCompletionStatus';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _PostQueuedCompletionStatus: Pointer;
- function PostQueuedCompletionStatus;
- begin
- GetProcedureAddress(_PostQueuedCompletionStatus, kernel32, 'PostQueuedCompletionStatus');
- asm
- mov esp, ebp
- pop ebp
- jmp [_PostQueuedCompletionStatus]
- end;
- end;
- {$ELSE}
- function PostQueuedCompletionStatus; external kernel32 name 'PostQueuedCompletionStatus';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetErrorMode: Pointer;
- function SetErrorMode;
- begin
- GetProcedureAddress(_SetErrorMode, kernel32, 'SetErrorMode');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetErrorMode]
- end;
- end;
- {$ELSE}
- function SetErrorMode; external kernel32 name 'SetErrorMode';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ReadProcessMemory: Pointer;
- function ReadProcessMemory;
- begin
- GetProcedureAddress(_ReadProcessMemory, kernel32, 'ReadProcessMemory');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ReadProcessMemory]
- end;
- end;
- {$ELSE}
- function ReadProcessMemory; external kernel32 name 'ReadProcessMemory';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WriteProcessMemory: Pointer;
- function WriteProcessMemory;
- begin
- GetProcedureAddress(_WriteProcessMemory, kernel32, 'WriteProcessMemory');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WriteProcessMemory]
- end;
- end;
- {$ELSE}
- function WriteProcessMemory; external kernel32 name 'WriteProcessMemory';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetThreadContext: Pointer;
- function GetThreadContext;
- begin
- GetProcedureAddress(_GetThreadContext, kernel32, 'GetThreadContext');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetThreadContext]
- end;
- end;
- {$ELSE}
- function GetThreadContext; external kernel32 name 'GetThreadContext';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetThreadContext: Pointer;
- function SetThreadContext;
- begin
- GetProcedureAddress(_SetThreadContext, kernel32, 'SetThreadContext');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetThreadContext]
- end;
- end;
- {$ELSE}
- function SetThreadContext; external kernel32 name 'SetThreadContext';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SuspendThread: Pointer;
- function SuspendThread;
- begin
- GetProcedureAddress(_SuspendThread, kernel32, 'SuspendThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SuspendThread]
- end;
- end;
- {$ELSE}
- function SuspendThread; external kernel32 name 'SuspendThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ResumeThread: Pointer;
- function ResumeThread;
- begin
- GetProcedureAddress(_ResumeThread, kernel32, 'ResumeThread');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ResumeThread]
- end;
- end;
- {$ELSE}
- function ResumeThread; external kernel32 name 'ResumeThread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _QueueUserAPC: Pointer;
- function QueueUserAPC;
- begin
- GetProcedureAddress(_QueueUserAPC, kernel32, 'QueueUserAPC');
- asm
- mov esp, ebp
- pop ebp
- jmp [_QueueUserAPC]
- end;
- end;
- {$ELSE}
- function QueueUserAPC; external kernel32 name 'QueueUserAPC';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _IsDebuggerPresent: Pointer;
- function IsDebuggerPresent;
- begin
- GetProcedureAddress(_IsDebuggerPresent, kernel32, 'IsDebuggerPresent');
- asm
- mov esp, ebp
- pop ebp
- jmp [_IsDebuggerPresent]
- end;
- end;
- {$ELSE}
- function IsDebuggerPresent; external kernel32 name 'IsDebuggerPresent';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DebugBreak: Pointer;
- procedure DebugBreak;
- begin
- GetProcedureAddress(_DebugBreak, kernel32, 'DebugBreak');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DebugBreak]
- end;
- end;
- {$ELSE}
- procedure DebugBreak; external kernel32 name 'DebugBreak';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WaitForDebugEvent: Pointer;
- function WaitForDebugEvent;
- begin
- GetProcedureAddress(_WaitForDebugEvent, kernel32, 'WaitForDebugEvent');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WaitForDebugEvent]
- end;
- end;
- {$ELSE}
- function WaitForDebugEvent; external kernel32 name 'WaitForDebugEvent';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ContinueDebugEvent: Pointer;
- function ContinueDebugEvent;
- begin
- GetProcedureAddress(_ContinueDebugEvent, kernel32, 'ContinueDebugEvent');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ContinueDebugEvent]
- end;
- end;
- {$ELSE}
- function ContinueDebugEvent; external kernel32 name 'ContinueDebugEvent';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DebugActiveProcess: Pointer;
- function DebugActiveProcess;
- begin
- GetProcedureAddress(_DebugActiveProcess, kernel32, 'DebugActiveProcess');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DebugActiveProcess]
- end;
- end;
- {$ELSE}
- function DebugActiveProcess; external kernel32 name 'DebugActiveProcess';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DebugActiveProcessStop: Pointer;
- function DebugActiveProcessStop;
- begin
- GetProcedureAddress(_DebugActiveProcessStop, kernel32, 'DebugActiveProcessStop');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DebugActiveProcessStop]
- end;
- end;
- {$ELSE}
- function DebugActiveProcessStop; external kernel32 name 'DebugActiveProcessStop';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DebugSetProcessKillOnExit: Pointer;
- function DebugSetProcessKillOnExit;
- begin
- GetProcedureAddress(_DebugSetProcessKillOnExit, kernel32, 'DebugSetProcessKillOnExit');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DebugSetProcessKillOnExit]
- end;
- end;
- {$ELSE}
- function DebugSetProcessKillOnExit; external kernel32 name 'DebugSetProcessKillOnExit';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DebugBreakProcess: Pointer;
- function DebugBreakProcess;
- begin
- GetProcedureAddress(_DebugBreakProcess, kernel32, 'DebugBreakProcess');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DebugBreakProcess]
- end;
- end;
- {$ELSE}
- function DebugBreakProcess; external kernel32 name 'DebugBreakProcess';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _InitializeCriticalSection: Pointer;
- procedure InitializeCriticalSection;
- begin
- GetProcedureAddress(_InitializeCriticalSection, kernel32, 'InitializeCriticalSection');
- asm
- mov esp, ebp
- pop ebp
- jmp [_InitializeCriticalSection]
- end;
- end;
- {$ELSE}
- procedure InitializeCriticalSection; external kernel32 name 'InitializeCriticalSection';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnterCriticalSection: Pointer;
- procedure EnterCriticalSection;
- begin
- GetProcedureAddress(_EnterCriticalSection, kernel32, 'EnterCriticalSection');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EnterCriticalSection]
- end;
- end;
- {$ELSE}
- procedure EnterCriticalSection; external kernel32 name 'EnterCriticalSection';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _LeaveCriticalSection: Pointer;
- procedure LeaveCriticalSection;
- begin
- GetProcedureAddress(_LeaveCriticalSection, kernel32, 'LeaveCriticalSection');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LeaveCriticalSection]
- end;
- end;
- {$ELSE}
- procedure LeaveCriticalSection; external kernel32 name 'LeaveCriticalSection';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _InitCritSectAndSpinCount: Pointer;
- function InitializeCriticalSectionAndSpinCount;
- begin
- GetProcedureAddress(_InitCritSectAndSpinCount, kernel32, 'InitializeCriticalSectionAndSpinCount');
- asm
- mov esp, ebp
- pop ebp
- jmp [_InitCritSectAndSpinCount]
- end;
- end;
- {$ELSE}
- function InitializeCriticalSectionAndSpinCount; external kernel32 name 'InitializeCriticalSectionAndSpinCount';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetCriticalSectionSpinCount: Pointer;
- function SetCriticalSectionSpinCount;
- begin
- GetProcedureAddress(_SetCriticalSectionSpinCount, kernel32, 'SetCriticalSectionSpinCount');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetCriticalSectionSpinCount]
- end;
- end;
- {$ELSE}
- function SetCriticalSectionSpinCount; external kernel32 name 'SetCriticalSectionSpinCount';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _TryEnterCriticalSection: Pointer;
- function TryEnterCriticalSection;
- begin
- GetProcedureAddress(_TryEnterCriticalSection, kernel32, 'TryEnterCriticalSection');
- asm
- mov esp, ebp
- pop ebp
- jmp [_TryEnterCriticalSection]
- end;
- end;
- {$ELSE}
- function TryEnterCriticalSection; external kernel32 name 'TryEnterCriticalSection';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DeleteCriticalSection: Pointer;
- procedure DeleteCriticalSection;
- begin
- GetProcedureAddress(_DeleteCriticalSection, kernel32, 'DeleteCriticalSection');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DeleteCriticalSection]
- end;
- end;
- {$ELSE}
- procedure DeleteCriticalSection; external kernel32 name 'DeleteCriticalSection';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetEvent: Pointer;
- function SetEvent;
- begin
- GetProcedureAddress(_SetEvent, kernel32, 'SetEvent');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetEvent]
- end;
- end;
- {$ELSE}
- function SetEvent; external kernel32 name 'SetEvent';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ResetEvent: Pointer;
- function ResetEvent;
- begin
- GetProcedureAddress(_ResetEvent, kernel32, 'ResetEvent');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ResetEvent]
- end;
- end;
- {$ELSE}
- function ResetEvent; external kernel32 name 'ResetEvent';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _PulseEvent: Pointer;
- function PulseEvent;
- begin
- GetProcedureAddress(_PulseEvent, kernel32, 'PulseEvent');
- asm
- mov esp, ebp
- pop ebp
- jmp [_PulseEvent]
- end;
- end;
- {$ELSE}
- function PulseEvent; external kernel32 name 'PulseEvent';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ReleaseSemaphore: Pointer;
- function ReleaseSemaphore;
- begin
- GetProcedureAddress(_ReleaseSemaphore, kernel32, 'ReleaseSemaphore');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ReleaseSemaphore]
- end;
- end;
- {$ELSE}
- function ReleaseSemaphore; external kernel32 name 'ReleaseSemaphore';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ReleaseMutex: Pointer;
- function ReleaseMutex;
- begin
- GetProcedureAddress(_ReleaseMutex, kernel32, 'ReleaseMutex');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ReleaseMutex]
- end;
- end;
- {$ELSE}
- function ReleaseMutex; external kernel32 name 'ReleaseMutex';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WaitForSingleObject: Pointer;
- function WaitForSingleObject;
- begin
- GetProcedureAddress(_WaitForSingleObject, kernel32, 'WaitForSingleObject');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WaitForSingleObject]
- end;
- end;
- {$ELSE}
- function WaitForSingleObject; external kernel32 name 'WaitForSingleObject';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WaitForMultipleObjects: Pointer;
- function WaitForMultipleObjects;
- begin
- GetProcedureAddress(_WaitForMultipleObjects, kernel32, 'WaitForMultipleObjects');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WaitForMultipleObjects]
- end;
- end;
- {$ELSE}
- function WaitForMultipleObjects; external kernel32 name 'WaitForMultipleObjects';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _Sleep: Pointer;
- procedure Sleep;
- begin
- GetProcedureAddress(_Sleep, kernel32, 'Sleep');
- asm
- mov esp, ebp
- pop ebp
- jmp [_Sleep]
- end;
- end;
- {$ELSE}
- procedure Sleep; external kernel32 name 'Sleep';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _LoadResource: Pointer;
- function LoadResource;
- begin
- GetProcedureAddress(_LoadResource, kernel32, 'LoadResource');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LoadResource]
- end;
- end;
- {$ELSE}
- function LoadResource; external kernel32 name 'LoadResource';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SizeofResource: Pointer;
- function SizeofResource;
- begin
- GetProcedureAddress(_SizeofResource, kernel32, 'SizeofResource');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SizeofResource]
- end;
- end;
- {$ELSE}
- function SizeofResource; external kernel32 name 'SizeofResource';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GlobalDeleteAtom: Pointer;
- function GlobalDeleteAtom;
- begin
- GetProcedureAddress(_GlobalDeleteAtom, kernel32, 'GlobalDeleteAtom');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GlobalDeleteAtom]
- end;
- end;
- {$ELSE}
- function GlobalDeleteAtom; external kernel32 name 'GlobalDeleteAtom';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _InitAtomTable: Pointer;
- function InitAtomTable;
- begin
- GetProcedureAddress(_InitAtomTable, kernel32, 'InitAtomTable');
- asm
- mov esp, ebp
- pop ebp
- jmp [_InitAtomTable]
- end;
- end;
- {$ELSE}
- function InitAtomTable; external kernel32 name 'InitAtomTable';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DeleteAtom: Pointer;
- function DeleteAtom;
- begin
- GetProcedureAddress(_DeleteAtom, kernel32, 'DeleteAtom');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DeleteAtom]
- end;
- end;
- {$ELSE}
- function DeleteAtom; external kernel32 name 'DeleteAtom';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetHandleCount: Pointer;
- function SetHandleCount;
- begin
- GetProcedureAddress(_SetHandleCount, kernel32, 'SetHandleCount');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetHandleCount]
- end;
- end;
- {$ELSE}
- function SetHandleCount; external kernel32 name 'SetHandleCount';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetLogicalDrives: Pointer;
- function GetLogicalDrives;
- begin
- GetProcedureAddress(_GetLogicalDrives, kernel32, 'GetLogicalDrives');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetLogicalDrives]
- end;
- end;
- {$ELSE}
- function GetLogicalDrives; external kernel32 name 'GetLogicalDrives';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _LockFile: Pointer;
- function LockFile;
- begin
- GetProcedureAddress(_LockFile, kernel32, 'LockFile');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LockFile]
- end;
- end;
- {$ELSE}
- function LockFile; external kernel32 name 'LockFile';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _UnlockFile: Pointer;
- function UnlockFile;
- begin
- GetProcedureAddress(_UnlockFile, kernel32, 'UnlockFile');
- asm
- mov esp, ebp
- pop ebp
- jmp [_UnlockFile]
- end;
- end;
- {$ELSE}
- function UnlockFile; external kernel32 name 'UnlockFile';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _LockFileEx: Pointer;
- function LockFileEx;
- begin
- GetProcedureAddress(_LockFileEx, kernel32, 'LockFileEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LockFileEx]
- end;
- end;
- {$ELSE}
- function LockFileEx; external kernel32 name 'LockFileEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _UnlockFileEx: Pointer;
- function UnlockFileEx;
- begin
- GetProcedureAddress(_UnlockFileEx, kernel32, 'UnlockFileEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_UnlockFileEx]
- end;
- end;
- {$ELSE}
- function UnlockFileEx; external kernel32 name 'UnlockFileEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetFileInformationByHandle: Pointer;
- function GetFileInformationByHandle;
- begin
- GetProcedureAddress(_GetFileInformationByHandle, kernel32, 'GetFileInformationByHandle');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetFileInformationByHandle]
- end;
- end;
- {$ELSE}
- function GetFileInformationByHandle; external kernel32 name 'GetFileInformationByHandle';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetFileType: Pointer;
- function GetFileType;
- begin
- GetProcedureAddress(_GetFileType, kernel32, 'GetFileType');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetFileType]
- end;
- end;
- {$ELSE}
- function GetFileType; external kernel32 name 'GetFileType';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetFileSize: Pointer;
- function GetFileSize;
- begin
- GetProcedureAddress(_GetFileSize, kernel32, 'GetFileSize');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetFileSize]
- end;
- end;
- {$ELSE}
- function GetFileSize; external kernel32 name 'GetFileSize';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetFileSizeEx: Pointer;
- function GetFileSizeEx;
- begin
- GetProcedureAddress(_GetFileSizeEx, kernel32, 'GetFileSizeEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetFileSizeEx]
- end;
- end;
- {$ELSE}
- function GetFileSizeEx; external kernel32 name 'GetFileSizeEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetStdHandle: Pointer;
- function GetStdHandle;
- begin
- GetProcedureAddress(_GetStdHandle, kernel32, 'GetStdHandle');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetStdHandle]
- end;
- end;
- {$ELSE}
- function GetStdHandle; external kernel32 name 'GetStdHandle';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetStdHandle: Pointer;
- function SetStdHandle;
- begin
- GetProcedureAddress(_SetStdHandle, kernel32, 'SetStdHandle');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetStdHandle]
- end;
- end;
- {$ELSE}
- function SetStdHandle; external kernel32 name 'SetStdHandle';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WriteFile: Pointer;
- function WriteFile;
- begin
- GetProcedureAddress(_WriteFile, kernel32, 'WriteFile');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WriteFile]
- end;
- end;
- {$ELSE}
- function WriteFile; external kernel32 name 'WriteFile';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ReadFile: Pointer;
- function ReadFile;
- begin
- GetProcedureAddress(_ReadFile, kernel32, 'ReadFile');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ReadFile]
- end;
- end;
- {$ELSE}
- function ReadFile; external kernel32 name 'ReadFile';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FlushFileBuffers: Pointer;
- function FlushFileBuffers;
- begin
- GetProcedureAddress(_FlushFileBuffers, kernel32, 'FlushFileBuffers');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FlushFileBuffers]
- end;
- end;
- {$ELSE}
- function FlushFileBuffers; external kernel32 name 'FlushFileBuffers';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DeviceIoControl: Pointer;
- function DeviceIoControl;
- begin
- GetProcedureAddress(_DeviceIoControl, kernel32, 'DeviceIoControl');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DeviceIoControl]
- end;
- end;
- {$ELSE}
- function DeviceIoControl; external kernel32 name 'DeviceIoControl';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _RequestDeviceWakeup: Pointer;
- function RequestDeviceWakeup;
- begin
- GetProcedureAddress(_RequestDeviceWakeup, kernel32, 'RequestDeviceWakeup');
- asm
- mov esp, ebp
- pop ebp
- jmp [_RequestDeviceWakeup]
- end;
- end;
- {$ELSE}
- function RequestDeviceWakeup; external kernel32 name 'RequestDeviceWakeup';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CancelDeviceWakeupRequest: Pointer;
- function CancelDeviceWakeupRequest;
- begin
- GetProcedureAddress(_CancelDeviceWakeupRequest, kernel32, 'CancelDeviceWakeupRequest');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CancelDeviceWakeupRequest]
- end;
- end;
- {$ELSE}
- function CancelDeviceWakeupRequest; external kernel32 name 'CancelDeviceWakeupRequest';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetDevicePowerState: Pointer;
- function GetDevicePowerState;
- begin
- GetProcedureAddress(_GetDevicePowerState, kernel32, 'GetDevicePowerState');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetDevicePowerState]
- end;
- end;
- {$ELSE}
- function GetDevicePowerState; external kernel32 name 'GetDevicePowerState';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetMessageWaitingIndicator: Pointer;
- function SetMessageWaitingIndicator;
- begin
- GetProcedureAddress(_SetMessageWaitingIndicator, kernel32, 'SetMessageWaitingIndicator');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetMessageWaitingIndicator]
- end;
- end;
- {$ELSE}
- function SetMessageWaitingIndicator; external kernel32 name 'SetMessageWaitingIndicator';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetEndOfFile: Pointer;
- function SetEndOfFile;
- begin
- GetProcedureAddress(_SetEndOfFile, kernel32, 'SetEndOfFile');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetEndOfFile]
- end;
- end;
- {$ELSE}
- function SetEndOfFile; external kernel32 name 'SetEndOfFile';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetFilePointer: Pointer;
- function SetFilePointer;
- begin
- GetProcedureAddress(_SetFilePointer, kernel32, 'SetFilePointer');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetFilePointer]
- end;
- end;
- {$ELSE}
- function SetFilePointer; external kernel32 name 'SetFilePointer';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetFilePointerEx: Pointer;
- function SetFilePointerEx;
- begin
- GetProcedureAddress(_SetFilePointerEx, kernel32, 'SetFilePointerEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetFilePointerEx]
- end;
- end;
- {$ELSE}
- function SetFilePointerEx; external kernel32 name 'SetFilePointerEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FindClose: Pointer;
- function FindClose;
- begin
- GetProcedureAddress(_FindClose, kernel32, 'FindClose');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FindClose]
- end;
- end;
- {$ELSE}
- function FindClose; external kernel32 name 'FindClose';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetFileTime: Pointer;
- function GetFileTime;
- begin
- GetProcedureAddress(_GetFileTime, kernel32, 'GetFileTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetFileTime]
- end;
- end;
- {$ELSE}
- function GetFileTime; external kernel32 name 'GetFileTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetFileTime: Pointer;
- function SetFileTime;
- begin
- GetProcedureAddress(_SetFileTime, kernel32, 'SetFileTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetFileTime]
- end;
- end;
- {$ELSE}
- function SetFileTime; external kernel32 name 'SetFileTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetFileValidData: Pointer;
- function SetFileValidData;
- begin
- GetProcedureAddress(_SetFileValidData, kernel32, 'SetFileValidData');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetFileValidData]
- end;
- end;
- {$ELSE}
- function SetFileValidData; external kernel32 name 'SetFileValidData';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetFileShortNameA: Pointer;
- function SetFileShortNameA;
- begin
- GetProcedureAddress(_SetFileShortNameA, kernel32, 'SetFileShortNameA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetFileShortNameA]
- end;
- end;
- {$ELSE}
- function SetFileShortNameA; external kernel32 name 'SetFileShortNameA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetFileShortNameW: Pointer;
- function SetFileShortNameW;
- begin
- GetProcedureAddress(_SetFileShortNameW, kernel32, 'SetFileShortNameW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetFileShortNameW]
- end;
- end;
- {$ELSE}
- function SetFileShortNameW; external kernel32 name 'SetFileShortNameW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetFileShortName: Pointer;
- function SetFileShortName;
- begin
- GetProcedureAddress(_SetFileShortName, kernel32, 'SetFileShortNameW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetFileShortName]
- end;
- end;
- {$ELSE}
- function SetFileShortName; external kernel32 name 'SetFileShortNameW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetFileShortName: Pointer;
- function SetFileShortName;
- begin
- GetProcedureAddress(_SetFileShortName, kernel32, 'SetFileShortNameA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetFileShortName]
- end;
- end;
- {$ELSE}
- function SetFileShortName; external kernel32 name 'SetFileShortNameA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _CloseHandle: Pointer;
- function CloseHandle;
- begin
- GetProcedureAddress(_CloseHandle, kernel32, 'CloseHandle');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CloseHandle]
- end;
- end;
- {$ELSE}
- function CloseHandle; external kernel32 name 'CloseHandle';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DuplicateHandle: Pointer;
- function DuplicateHandle;
- begin
- GetProcedureAddress(_DuplicateHandle, kernel32, 'DuplicateHandle');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DuplicateHandle]
- end;
- end;
- {$ELSE}
- function DuplicateHandle; external kernel32 name 'DuplicateHandle';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetHandleInformation: Pointer;
- function GetHandleInformation;
- begin
- GetProcedureAddress(_GetHandleInformation, kernel32, 'GetHandleInformation');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetHandleInformation]
- end;
- end;
- {$ELSE}
- function GetHandleInformation; external kernel32 name 'GetHandleInformation';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetHandleInformation: Pointer;
- function SetHandleInformation;
- begin
- GetProcedureAddress(_SetHandleInformation, kernel32, 'SetHandleInformation');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetHandleInformation]
- end;
- end;
- {$ELSE}
- function SetHandleInformation; external kernel32 name 'SetHandleInformation';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _LoadModule: Pointer;
- function LoadModule;
- begin
- GetProcedureAddress(_LoadModule, kernel32, 'LoadModule');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LoadModule]
- end;
- end;
- {$ELSE}
- function LoadModule; external kernel32 name 'LoadModule';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WinExec: Pointer;
- function WinExec;
- begin
- GetProcedureAddress(_WinExec, kernel32, 'WinExec');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WinExec]
- end;
- end;
- {$ELSE}
- function WinExec; external kernel32 name 'WinExec';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ClearCommBreak: Pointer;
- function ClearCommBreak;
- begin
- GetProcedureAddress(_ClearCommBreak, kernel32, 'ClearCommBreak');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ClearCommBreak]
- end;
- end;
- {$ELSE}
- function ClearCommBreak; external kernel32 name 'ClearCommBreak';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ClearCommError: Pointer;
- function ClearCommError;
- begin
- GetProcedureAddress(_ClearCommError, kernel32, 'ClearCommError');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ClearCommError]
- end;
- end;
- {$ELSE}
- function ClearCommError; external kernel32 name 'ClearCommError';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetupComm: Pointer;
- function SetupComm;
- begin
- GetProcedureAddress(_SetupComm, kernel32, 'SetupComm');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetupComm]
- end;
- end;
- {$ELSE}
- function SetupComm; external kernel32 name 'SetupComm';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _EscapeCommFunction: Pointer;
- function EscapeCommFunction;
- begin
- GetProcedureAddress(_EscapeCommFunction, kernel32, 'EscapeCommFunction');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EscapeCommFunction]
- end;
- end;
- {$ELSE}
- function EscapeCommFunction; external kernel32 name 'EscapeCommFunction';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetCommConfig: Pointer;
- function GetCommConfig;
- begin
- GetProcedureAddress(_GetCommConfig, kernel32, 'GetCommConfig');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetCommConfig]
- end;
- end;
- {$ELSE}
- function GetCommConfig; external kernel32 name 'GetCommConfig';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetCommMask: Pointer;
- function GetCommMask;
- begin
- GetProcedureAddress(_GetCommMask, kernel32, 'GetCommMask');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetCommMask]
- end;
- end;
- {$ELSE}
- function GetCommMask; external kernel32 name 'GetCommMask';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetCommProperties: Pointer;
- function GetCommProperties;
- begin
- GetProcedureAddress(_GetCommProperties, kernel32, 'GetCommProperties');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetCommProperties]
- end;
- end;
- {$ELSE}
- function GetCommProperties; external kernel32 name 'GetCommProperties';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetCommModemStatus: Pointer;
- function GetCommModemStatus;
- begin
- GetProcedureAddress(_GetCommModemStatus, kernel32, 'GetCommModemStatus');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetCommModemStatus]
- end;
- end;
- {$ELSE}
- function GetCommModemStatus; external kernel32 name 'GetCommModemStatus';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetCommState: Pointer;
- function GetCommState;
- begin
- GetProcedureAddress(_GetCommState, kernel32, 'GetCommState');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetCommState]
- end;
- end;
- {$ELSE}
- function GetCommState; external kernel32 name 'GetCommState';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetCommTimeouts: Pointer;
- function GetCommTimeouts;
- begin
- GetProcedureAddress(_GetCommTimeouts, kernel32, 'GetCommTimeouts');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetCommTimeouts]
- end;
- end;
- {$ELSE}
- function GetCommTimeouts; external kernel32 name 'GetCommTimeouts';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _PurgeComm: Pointer;
- function PurgeComm;
- begin
- GetProcedureAddress(_PurgeComm, kernel32, 'PurgeComm');
- asm
- mov esp, ebp
- pop ebp
- jmp [_PurgeComm]
- end;
- end;
- {$ELSE}
- function PurgeComm; external kernel32 name 'PurgeComm';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetCommBreak: Pointer;
- function SetCommBreak;
- begin
- GetProcedureAddress(_SetCommBreak, kernel32, 'SetCommBreak');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetCommBreak]
- end;
- end;
- {$ELSE}
- function SetCommBreak; external kernel32 name 'SetCommBreak';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetCommConfig: Pointer;
- function SetCommConfig;
- begin
- GetProcedureAddress(_SetCommConfig, kernel32, 'SetCommConfig');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetCommConfig]
- end;
- end;
- {$ELSE}
- function SetCommConfig; external kernel32 name 'SetCommConfig';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetCommMask: Pointer;
- function SetCommMask;
- begin
- GetProcedureAddress(_SetCommMask, kernel32, 'SetCommMask');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetCommMask]
- end;
- end;
- {$ELSE}
- function SetCommMask; external kernel32 name 'SetCommMask';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetCommState: Pointer;
- function SetCommState;
- begin
- GetProcedureAddress(_SetCommState, kernel32, 'SetCommState');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetCommState]
- end;
- end;
- {$ELSE}
- function SetCommState; external kernel32 name 'SetCommState';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetCommTimeouts: Pointer;
- function SetCommTimeouts;
- begin
- GetProcedureAddress(_SetCommTimeouts, kernel32, 'SetCommTimeouts');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetCommTimeouts]
- end;
- end;
- {$ELSE}
- function SetCommTimeouts; external kernel32 name 'SetCommTimeouts';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _TransmitCommChar: Pointer;
- function TransmitCommChar;
- begin
- GetProcedureAddress(_TransmitCommChar, kernel32, 'TransmitCommChar');
- asm
- mov esp, ebp
- pop ebp
- jmp [_TransmitCommChar]
- end;
- end;
- {$ELSE}
- function TransmitCommChar; external kernel32 name 'TransmitCommChar';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WaitCommEvent: Pointer;
- function WaitCommEvent;
- begin
- GetProcedureAddress(_WaitCommEvent, kernel32, 'WaitCommEvent');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WaitCommEvent]
- end;
- end;
- {$ELSE}
- function WaitCommEvent; external kernel32 name 'WaitCommEvent';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetTapePosition: Pointer;
- function SetTapePosition;
- begin
- GetProcedureAddress(_SetTapePosition, kernel32, 'SetTapePosition');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetTapePosition]
- end;
- end;
- {$ELSE}
- function SetTapePosition; external kernel32 name 'SetTapePosition';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetTapePosition: Pointer;
- function GetTapePosition;
- begin
- GetProcedureAddress(_GetTapePosition, kernel32, 'GetTapePosition');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetTapePosition]
- end;
- end;
- {$ELSE}
- function GetTapePosition; external kernel32 name 'GetTapePosition';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _PrepareTape: Pointer;
- function PrepareTape;
- begin
- GetProcedureAddress(_PrepareTape, kernel32, 'PrepareTape');
- asm
- mov esp, ebp
- pop ebp
- jmp [_PrepareTape]
- end;
- end;
- {$ELSE}
- function PrepareTape; external kernel32 name 'PrepareTape';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _EraseTape: Pointer;
- function EraseTape;
- begin
- GetProcedureAddress(_EraseTape, kernel32, 'EraseTape');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EraseTape]
- end;
- end;
- {$ELSE}
- function EraseTape; external kernel32 name 'EraseTape';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateTapePartition: Pointer;
- function CreateTapePartition;
- begin
- GetProcedureAddress(_CreateTapePartition, kernel32, 'CreateTapePartition');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateTapePartition]
- end;
- end;
- {$ELSE}
- function CreateTapePartition; external kernel32 name 'CreateTapePartition';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WriteTapemark: Pointer;
- function WriteTapemark;
- begin
- GetProcedureAddress(_WriteTapemark, kernel32, 'WriteTapemark');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WriteTapemark]
- end;
- end;
- {$ELSE}
- function WriteTapemark; external kernel32 name 'WriteTapemark';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetTapeStatus: Pointer;
- function GetTapeStatus;
- begin
- GetProcedureAddress(_GetTapeStatus, kernel32, 'GetTapeStatus');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetTapeStatus]
- end;
- end;
- {$ELSE}
- function GetTapeStatus; external kernel32 name 'GetTapeStatus';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetTapeParameters: Pointer;
- function GetTapeParameters;
- begin
- GetProcedureAddress(_GetTapeParameters, kernel32, 'GetTapeParameters');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetTapeParameters]
- end;
- end;
- {$ELSE}
- function GetTapeParameters; external kernel32 name 'GetTapeParameters';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetTapeParameters: Pointer;
- function SetTapeParameters;
- begin
- GetProcedureAddress(_SetTapeParameters, kernel32, 'SetTapeParameters');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetTapeParameters]
- end;
- end;
- {$ELSE}
- function SetTapeParameters; external kernel32 name 'SetTapeParameters';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _Beep: Pointer;
- function Beep;
- begin
- GetProcedureAddress(_Beep, kernel32, 'Beep');
- asm
- mov esp, ebp
- pop ebp
- jmp [_Beep]
- end;
- end;
- {$ELSE}
- function Beep; external kernel32 name 'Beep';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _MulDiv: Pointer;
- function MulDiv;
- begin
- GetProcedureAddress(_MulDiv, kernel32, 'MulDiv');
- asm
- mov esp, ebp
- pop ebp
- jmp [_MulDiv]
- end;
- end;
- {$ELSE}
- function MulDiv; external kernel32 name 'MulDiv';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetSystemTime: Pointer;
- procedure GetSystemTime;
- begin
- GetProcedureAddress(_GetSystemTime, kernel32, 'GetSystemTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetSystemTime]
- end;
- end;
- {$ELSE}
- procedure GetSystemTime; external kernel32 name 'GetSystemTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetSystemTimeAsFileTime: Pointer;
- procedure GetSystemTimeAsFileTime;
- begin
- GetProcedureAddress(_GetSystemTimeAsFileTime, kernel32, 'GetSystemTimeAsFileTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetSystemTimeAsFileTime]
- end;
- end;
- {$ELSE}
- procedure GetSystemTimeAsFileTime; external kernel32 name 'GetSystemTimeAsFileTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetSystemTime: Pointer;
- function SetSystemTime;
- begin
- GetProcedureAddress(_SetSystemTime, kernel32, 'SetSystemTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetSystemTime]
- end;
- end;
- {$ELSE}
- function SetSystemTime; external kernel32 name 'SetSystemTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetLocalTime: Pointer;
- procedure GetLocalTime;
- begin
- GetProcedureAddress(_GetLocalTime, kernel32, 'GetLocalTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetLocalTime]
- end;
- end;
- {$ELSE}
- procedure GetLocalTime; external kernel32 name 'GetLocalTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetLocalTime: Pointer;
- function SetLocalTime;
- begin
- GetProcedureAddress(_SetLocalTime, kernel32, 'SetLocalTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetLocalTime]
- end;
- end;
- {$ELSE}
- function SetLocalTime; external kernel32 name 'SetLocalTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetSystemInfo: Pointer;
- procedure GetSystemInfo;
- begin
- GetProcedureAddress(_GetSystemInfo, kernel32, 'GetSystemInfo');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetSystemInfo]
- end;
- end;
- {$ELSE}
- procedure GetSystemInfo; external kernel32 name 'GetSystemInfo';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetNativeSystemInfo: Pointer;
- procedure GetNativeSystemInfo;
- begin
- GetProcedureAddress(_GetNativeSystemInfo, kernel32, 'GetNativeSystemInfo');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetNativeSystemInfo]
- end;
- end;
- {$ELSE}
- procedure GetNativeSystemInfo; external kernel32 name 'GetNativeSystemInfo';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _IsProcessorFeaturePresent: Pointer;
- function IsProcessorFeaturePresent;
- begin
- GetProcedureAddress(_IsProcessorFeaturePresent, kernel32, 'IsProcessorFeaturePresent');
- asm
- mov esp, ebp
- pop ebp
- jmp [_IsProcessorFeaturePresent]
- end;
- end;
- {$ELSE}
- function IsProcessorFeaturePresent; external kernel32 name 'IsProcessorFeaturePresent';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SystemTimeToTzSpecificLocalTime: Pointer;
- function SystemTimeToTzSpecificLocalTime;
- begin
- GetProcedureAddress(_SystemTimeToTzSpecificLocalTime, kernel32, 'SystemTimeToTzSpecificLocalTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SystemTimeToTzSpecificLocalTime]
- end;
- end;
- {$ELSE}
- function SystemTimeToTzSpecificLocalTime; external kernel32 name 'SystemTimeToTzSpecificLocalTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _TzSpecificLocalTimeToSystemTime: Pointer;
- function TzSpecificLocalTimeToSystemTime;
- begin
- GetProcedureAddress(_TzSpecificLocalTimeToSystemTime, kernel32, 'TzSpecificLocalTimeToSystemTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_TzSpecificLocalTimeToSystemTime]
- end;
- end;
- {$ELSE}
- function TzSpecificLocalTimeToSystemTime; external kernel32 name 'TzSpecificLocalTimeToSystemTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetTimeZoneInformation: Pointer;
- function GetTimeZoneInformation;
- begin
- GetProcedureAddress(_GetTimeZoneInformation, kernel32, 'GetTimeZoneInformation');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetTimeZoneInformation]
- end;
- end;
- {$ELSE}
- function GetTimeZoneInformation; external kernel32 name 'GetTimeZoneInformation';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetTimeZoneInformation: Pointer;
- function SetTimeZoneInformation;
- begin
- GetProcedureAddress(_SetTimeZoneInformation, kernel32, 'SetTimeZoneInformation');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetTimeZoneInformation]
- end;
- end;
- {$ELSE}
- function SetTimeZoneInformation; external kernel32 name 'SetTimeZoneInformation';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SystemTimeToFileTime: Pointer;
- function SystemTimeToFileTime;
- begin
- GetProcedureAddress(_SystemTimeToFileTime, kernel32, 'SystemTimeToFileTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SystemTimeToFileTime]
- end;
- end;
- {$ELSE}
- function SystemTimeToFileTime; external kernel32 name 'SystemTimeToFileTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FileTimeToLocalFileTime: Pointer;
- function FileTimeToLocalFileTime;
- begin
- GetProcedureAddress(_FileTimeToLocalFileTime, kernel32, 'FileTimeToLocalFileTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FileTimeToLocalFileTime]
- end;
- end;
- {$ELSE}
- function FileTimeToLocalFileTime; external kernel32 name 'FileTimeToLocalFileTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _LocalFileTimeToFileTime: Pointer;
- function LocalFileTimeToFileTime;
- begin
- GetProcedureAddress(_LocalFileTimeToFileTime, kernel32, 'LocalFileTimeToFileTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LocalFileTimeToFileTime]
- end;
- end;
- {$ELSE}
- function LocalFileTimeToFileTime; external kernel32 name 'LocalFileTimeToFileTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FileTimeToSystemTime: Pointer;
- function FileTimeToSystemTime;
- begin
- GetProcedureAddress(_FileTimeToSystemTime, kernel32, 'FileTimeToSystemTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FileTimeToSystemTime]
- end;
- end;
- {$ELSE}
- function FileTimeToSystemTime; external kernel32 name 'FileTimeToSystemTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CompareFileTime: Pointer;
- function CompareFileTime;
- begin
- GetProcedureAddress(_CompareFileTime, kernel32, 'CompareFileTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CompareFileTime]
- end;
- end;
- {$ELSE}
- function CompareFileTime; external kernel32 name 'CompareFileTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FileTimeToDosDateTime: Pointer;
- function FileTimeToDosDateTime;
- begin
- GetProcedureAddress(_FileTimeToDosDateTime, kernel32, 'FileTimeToDosDateTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FileTimeToDosDateTime]
- end;
- end;
- {$ELSE}
- function FileTimeToDosDateTime; external kernel32 name 'FileTimeToDosDateTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DosDateTimeToFileTime: Pointer;
- function DosDateTimeToFileTime;
- begin
- GetProcedureAddress(_DosDateTimeToFileTime, kernel32, 'DosDateTimeToFileTime');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DosDateTimeToFileTime]
- end;
- end;
- {$ELSE}
- function DosDateTimeToFileTime; external kernel32 name 'DosDateTimeToFileTime';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetTickCount: Pointer;
- function GetTickCount;
- begin
- GetProcedureAddress(_GetTickCount, kernel32, 'GetTickCount');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetTickCount]
- end;
- end;
- {$ELSE}
- function GetTickCount; external kernel32 name 'GetTickCount';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetSystemTimeAdjustment: Pointer;
- function SetSystemTimeAdjustment;
- begin
- GetProcedureAddress(_SetSystemTimeAdjustment, kernel32, 'SetSystemTimeAdjustment');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetSystemTimeAdjustment]
- end;
- end;
- {$ELSE}
- function SetSystemTimeAdjustment; external kernel32 name 'SetSystemTimeAdjustment';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetSystemTimeAdjustment: Pointer;
- function GetSystemTimeAdjustment;
- begin
- GetProcedureAddress(_GetSystemTimeAdjustment, kernel32, 'GetSystemTimeAdjustment');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetSystemTimeAdjustment]
- end;
- end;
- {$ELSE}
- function GetSystemTimeAdjustment; external kernel32 name 'GetSystemTimeAdjustment';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FormatMessageA: Pointer;
- function FormatMessageA;
- begin
- GetProcedureAddress(_FormatMessageA, kernel32, 'FormatMessageA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FormatMessageA]
- end;
- end;
- {$ELSE}
- function FormatMessageA; external kernel32 name 'FormatMessageA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FormatMessageW: Pointer;
- function FormatMessageW;
- begin
- GetProcedureAddress(_FormatMessageW, kernel32, 'FormatMessageW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FormatMessageW]
- end;
- end;
- {$ELSE}
- function FormatMessageW; external kernel32 name 'FormatMessageW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _FormatMessage: Pointer;
- function FormatMessage;
- begin
- GetProcedureAddress(_FormatMessage, kernel32, 'FormatMessageW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FormatMessage]
- end;
- end;
- {$ELSE}
- function FormatMessage; external kernel32 name 'FormatMessageW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _FormatMessage: Pointer;
- function FormatMessage;
- begin
- GetProcedureAddress(_FormatMessage, kernel32, 'FormatMessageA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FormatMessage]
- end;
- end;
- {$ELSE}
- function FormatMessage; external kernel32 name 'FormatMessageA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreatePipe: Pointer;
- function CreatePipe;
- begin
- GetProcedureAddress(_CreatePipe, kernel32, 'CreatePipe');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreatePipe]
- end;
- end;
- {$ELSE}
- function CreatePipe; external kernel32 name 'CreatePipe';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ConnectNamedPipe: Pointer;
- function ConnectNamedPipe;
- begin
- GetProcedureAddress(_ConnectNamedPipe, kernel32, 'ConnectNamedPipe');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ConnectNamedPipe]
- end;
- end;
- {$ELSE}
- function ConnectNamedPipe; external kernel32 name 'ConnectNamedPipe';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DisconnectNamedPipe: Pointer;
- function DisconnectNamedPipe;
- begin
- GetProcedureAddress(_DisconnectNamedPipe, kernel32, 'DisconnectNamedPipe');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DisconnectNamedPipe]
- end;
- end;
- {$ELSE}
- function DisconnectNamedPipe; external kernel32 name 'DisconnectNamedPipe';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetNamedPipeHandleState: Pointer;
- function SetNamedPipeHandleState;
- begin
- GetProcedureAddress(_SetNamedPipeHandleState, kernel32, 'SetNamedPipeHandleState');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetNamedPipeHandleState]
- end;
- end;
- {$ELSE}
- function SetNamedPipeHandleState; external kernel32 name 'SetNamedPipeHandleState';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetNamedPipeInfo: Pointer;
- function GetNamedPipeInfo;
- begin
- GetProcedureAddress(_GetNamedPipeInfo, kernel32, 'GetNamedPipeInfo');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetNamedPipeInfo]
- end;
- end;
- {$ELSE}
- function GetNamedPipeInfo; external kernel32 name 'GetNamedPipeInfo';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _PeekNamedPipe: Pointer;
- function PeekNamedPipe;
- begin
- GetProcedureAddress(_PeekNamedPipe, kernel32, 'PeekNamedPipe');
- asm
- mov esp, ebp
- pop ebp
- jmp [_PeekNamedPipe]
- end;
- end;
- {$ELSE}
- function PeekNamedPipe; external kernel32 name 'PeekNamedPipe';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _TransactNamedPipe: Pointer;
- function TransactNamedPipe;
- begin
- GetProcedureAddress(_TransactNamedPipe, kernel32, 'TransactNamedPipe');
- asm
- mov esp, ebp
- pop ebp
- jmp [_TransactNamedPipe]
- end;
- end;
- {$ELSE}
- function TransactNamedPipe; external kernel32 name 'TransactNamedPipe';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateMailslotA: Pointer;
- function CreateMailslotA;
- begin
- GetProcedureAddress(_CreateMailslotA, kernel32, 'CreateMailslotA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateMailslotA]
- end;
- end;
- {$ELSE}
- function CreateMailslotA; external kernel32 name 'CreateMailslotA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateMailslotW: Pointer;
- function CreateMailslotW;
- begin
- GetProcedureAddress(_CreateMailslotW, kernel32, 'CreateMailslotW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateMailslotW]
- end;
- end;
- {$ELSE}
- function CreateMailslotW; external kernel32 name 'CreateMailslotW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateMailslot: Pointer;
- function CreateMailslot;
- begin
- GetProcedureAddress(_CreateMailslot, kernel32, 'CreateMailslotW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateMailslot]
- end;
- end;
- {$ELSE}
- function CreateMailslot; external kernel32 name 'CreateMailslotW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateMailslot: Pointer;
- function CreateMailslot;
- begin
- GetProcedureAddress(_CreateMailslot, kernel32, 'CreateMailslotA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateMailslot]
- end;
- end;
- {$ELSE}
- function CreateMailslot; external kernel32 name 'CreateMailslotA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetMailslotInfo: Pointer;
- function GetMailslotInfo;
- begin
- GetProcedureAddress(_GetMailslotInfo, kernel32, 'GetMailslotInfo');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetMailslotInfo]
- end;
- end;
- {$ELSE}
- function GetMailslotInfo; external kernel32 name 'GetMailslotInfo';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetMailslotInfo: Pointer;
- function SetMailslotInfo;
- begin
- GetProcedureAddress(_SetMailslotInfo, kernel32, 'SetMailslotInfo');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetMailslotInfo]
- end;
- end;
- {$ELSE}
- function SetMailslotInfo; external kernel32 name 'SetMailslotInfo';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _MapViewOfFile: Pointer;
- function MapViewOfFile;
- begin
- GetProcedureAddress(_MapViewOfFile, kernel32, 'MapViewOfFile');
- asm
- mov esp, ebp
- pop ebp
- jmp [_MapViewOfFile]
- end;
- end;
- {$ELSE}
- function MapViewOfFile; external kernel32 name 'MapViewOfFile';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FlushViewOfFile: Pointer;
- function FlushViewOfFile;
- begin
- GetProcedureAddress(_FlushViewOfFile, kernel32, 'FlushViewOfFile');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FlushViewOfFile]
- end;
- end;
- {$ELSE}
- function FlushViewOfFile; external kernel32 name 'FlushViewOfFile';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _UnmapViewOfFile: Pointer;
- function UnmapViewOfFile;
- begin
- GetProcedureAddress(_UnmapViewOfFile, kernel32, 'UnmapViewOfFile');
- asm
- mov esp, ebp
- pop ebp
- jmp [_UnmapViewOfFile]
- end;
- end;
- {$ELSE}
- function UnmapViewOfFile; external kernel32 name 'UnmapViewOfFile';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _EncryptFileA: Pointer;
- function EncryptFileA;
- begin
- GetProcedureAddress(_EncryptFileA, advapi32, 'EncryptFileA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EncryptFileA]
- end;
- end;
- {$ELSE}
- function EncryptFileA; external advapi32 name 'EncryptFileA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _EncryptFileW: Pointer;
- function EncryptFileW;
- begin
- GetProcedureAddress(_EncryptFileW, advapi32, 'EncryptFileW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EncryptFileW]
- end;
- end;
- {$ELSE}
- function EncryptFileW; external advapi32 name 'EncryptFileW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _EncryptFile: Pointer;
- function EncryptFile;
- begin
- GetProcedureAddress(_EncryptFile, advapi32, 'EncryptFileW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EncryptFile]
- end;
- end;
- {$ELSE}
- function EncryptFile; external advapi32 name 'EncryptFileW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _EncryptFile: Pointer;
- function EncryptFile;
- begin
- GetProcedureAddress(_EncryptFile, advapi32, 'EncryptFileA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EncryptFile]
- end;
- end;
- {$ELSE}
- function EncryptFile; external advapi32 name 'EncryptFileA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _DecryptFileA: Pointer;
- function DecryptFileA;
- begin
- GetProcedureAddress(_DecryptFileA, advapi32, 'DecryptFileA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DecryptFileA]
- end;
- end;
- {$ELSE}
- function DecryptFileA; external advapi32 name 'DecryptFileA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _DecryptFileW: Pointer;
- function DecryptFileW;
- begin
- GetProcedureAddress(_DecryptFileW, advapi32, 'DecryptFileW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DecryptFileW]
- end;
- end;
- {$ELSE}
- function DecryptFileW; external advapi32 name 'DecryptFileW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _DecryptFile: Pointer;
- function DecryptFile;
- begin
- GetProcedureAddress(_DecryptFile, advapi32, 'DecryptFileW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DecryptFile]
- end;
- end;
- {$ELSE}
- function DecryptFile; external advapi32 name 'DecryptFileW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _DecryptFile: Pointer;
- function DecryptFile;
- begin
- GetProcedureAddress(_DecryptFile, advapi32, 'DecryptFileA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_DecryptFile]
- end;
- end;
- {$ELSE}
- function DecryptFile; external advapi32 name 'DecryptFileA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _FileEncryptionStatusA: Pointer;
- function FileEncryptionStatusA;
- begin
- GetProcedureAddress(_FileEncryptionStatusA, advapi32, 'FileEncryptionStatusA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FileEncryptionStatusA]
- end;
- end;
- {$ELSE}
- function FileEncryptionStatusA; external advapi32 name 'FileEncryptionStatusA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FileEncryptionStatusW: Pointer;
- function FileEncryptionStatusW;
- begin
- GetProcedureAddress(_FileEncryptionStatusW, advapi32, 'FileEncryptionStatusW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FileEncryptionStatusW]
- end;
- end;
- {$ELSE}
- function FileEncryptionStatusW; external advapi32 name 'FileEncryptionStatusW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _FileEncryptionStatus: Pointer;
- function FileEncryptionStatus;
- begin
- GetProcedureAddress(_FileEncryptionStatus, advapi32, 'FileEncryptionStatusW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FileEncryptionStatus]
- end;
- end;
- {$ELSE}
- function FileEncryptionStatus; external advapi32 name 'FileEncryptionStatusW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _FileEncryptionStatus: Pointer;
- function FileEncryptionStatus;
- begin
- GetProcedureAddress(_FileEncryptionStatus, advapi32, 'FileEncryptionStatusA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FileEncryptionStatus]
- end;
- end;
- {$ELSE}
- function FileEncryptionStatus; external advapi32 name 'FileEncryptionStatusA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenEncryptedFileRawA: Pointer;
- function OpenEncryptedFileRawA;
- begin
- GetProcedureAddress(_OpenEncryptedFileRawA, advapi32, 'OpenEncryptedFileRawA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenEncryptedFileRawA]
- end;
- end;
- {$ELSE}
- function OpenEncryptedFileRawA; external advapi32 name 'OpenEncryptedFileRawA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenEncryptedFileRawW: Pointer;
- function OpenEncryptedFileRawW;
- begin
- GetProcedureAddress(_OpenEncryptedFileRawW, advapi32, 'OpenEncryptedFileRawW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenEncryptedFileRawW]
- end;
- end;
- {$ELSE}
- function OpenEncryptedFileRawW; external advapi32 name 'OpenEncryptedFileRawW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenEncryptedFileRaw: Pointer;
- function OpenEncryptedFileRaw;
- begin
- GetProcedureAddress(_OpenEncryptedFileRaw, advapi32, 'OpenEncryptedFileRawW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenEncryptedFileRaw]
- end;
- end;
- {$ELSE}
- function OpenEncryptedFileRaw; external advapi32 name 'OpenEncryptedFileRawW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenEncryptedFileRaw: Pointer;
- function OpenEncryptedFileRaw;
- begin
- GetProcedureAddress(_OpenEncryptedFileRaw, advapi32, 'OpenEncryptedFileRawA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenEncryptedFileRaw]
- end;
- end;
- {$ELSE}
- function OpenEncryptedFileRaw; external advapi32 name 'OpenEncryptedFileRawA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _ReadEncryptedFileRaw: Pointer;
- function ReadEncryptedFileRaw;
- begin
- GetProcedureAddress(_ReadEncryptedFileRaw, advapi32, 'ReadEncryptedFileRaw');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ReadEncryptedFileRaw]
- end;
- end;
- {$ELSE}
- function ReadEncryptedFileRaw; external advapi32 name 'ReadEncryptedFileRaw';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WriteEncryptedFileRaw: Pointer;
- function WriteEncryptedFileRaw;
- begin
- GetProcedureAddress(_WriteEncryptedFileRaw, advapi32, 'WriteEncryptedFileRaw');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WriteEncryptedFileRaw]
- end;
- end;
- {$ELSE}
- function WriteEncryptedFileRaw; external advapi32 name 'WriteEncryptedFileRaw';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CloseEncryptedFileRaw: Pointer;
- procedure CloseEncryptedFileRaw;
- begin
- GetProcedureAddress(_CloseEncryptedFileRaw, advapi32, 'CloseEncryptedFileRaw');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CloseEncryptedFileRaw]
- end;
- end;
- {$ELSE}
- procedure CloseEncryptedFileRaw; external advapi32 name 'CloseEncryptedFileRaw';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcmpA: Pointer;
- function lstrcmpA;
- begin
- GetProcedureAddress(_lstrcmpA, kernel32, 'lstrcmpA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcmpA]
- end;
- end;
- {$ELSE}
- function lstrcmpA; external kernel32 name 'lstrcmpA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcmpW: Pointer;
- function lstrcmpW;
- begin
- GetProcedureAddress(_lstrcmpW, kernel32, 'lstrcmpW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcmpW]
- end;
- end;
- {$ELSE}
- function lstrcmpW; external kernel32 name 'lstrcmpW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcmp: Pointer;
- function lstrcmp;
- begin
- GetProcedureAddress(_lstrcmp, kernel32, 'lstrcmpW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcmp]
- end;
- end;
- {$ELSE}
- function lstrcmp; external kernel32 name 'lstrcmpW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcmp: Pointer;
- function lstrcmp;
- begin
- GetProcedureAddress(_lstrcmp, kernel32, 'lstrcmpA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcmp]
- end;
- end;
- {$ELSE}
- function lstrcmp; external kernel32 name 'lstrcmpA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcmpiA: Pointer;
- function lstrcmpiA;
- begin
- GetProcedureAddress(_lstrcmpiA, kernel32, 'lstrcmpiA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcmpiA]
- end;
- end;
- {$ELSE}
- function lstrcmpiA; external kernel32 name 'lstrcmpiA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcmpiW: Pointer;
- function lstrcmpiW;
- begin
- GetProcedureAddress(_lstrcmpiW, kernel32, 'lstrcmpiW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcmpiW]
- end;
- end;
- {$ELSE}
- function lstrcmpiW; external kernel32 name 'lstrcmpiW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcmpi: Pointer;
- function lstrcmpi;
- begin
- GetProcedureAddress(_lstrcmpi, kernel32, 'lstrcmpiW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcmpi]
- end;
- end;
- {$ELSE}
- function lstrcmpi; external kernel32 name 'lstrcmpiW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcmpi: Pointer;
- function lstrcmpi;
- begin
- GetProcedureAddress(_lstrcmpi, kernel32, 'lstrcmpiA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcmpi]
- end;
- end;
- {$ELSE}
- function lstrcmpi; external kernel32 name 'lstrcmpiA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcpynA: Pointer;
- function lstrcpynA;
- begin
- GetProcedureAddress(_lstrcpynA, kernel32, 'lstrcpynA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcpynA]
- end;
- end;
- {$ELSE}
- function lstrcpynA; external kernel32 name 'lstrcpynA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcpynW: Pointer;
- function lstrcpynW;
- begin
- GetProcedureAddress(_lstrcpynW, kernel32, 'lstrcpynW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcpynW]
- end;
- end;
- {$ELSE}
- function lstrcpynW; external kernel32 name 'lstrcpynW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcpyn: Pointer;
- function lstrcpyn;
- begin
- GetProcedureAddress(_lstrcpyn, kernel32, 'lstrcpynW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcpyn]
- end;
- end;
- {$ELSE}
- function lstrcpyn; external kernel32 name 'lstrcpynW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcpyn: Pointer;
- function lstrcpyn;
- begin
- GetProcedureAddress(_lstrcpyn, kernel32, 'lstrcpynA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcpyn]
- end;
- end;
- {$ELSE}
- function lstrcpyn; external kernel32 name 'lstrcpynA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcpyA: Pointer;
- function lstrcpyA;
- begin
- GetProcedureAddress(_lstrcpyA, kernel32, 'lstrcpyA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcpyA]
- end;
- end;
- {$ELSE}
- function lstrcpyA; external kernel32 name 'lstrcpyA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcpyW: Pointer;
- function lstrcpyW;
- begin
- GetProcedureAddress(_lstrcpyW, kernel32, 'lstrcpyW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcpyW]
- end;
- end;
- {$ELSE}
- function lstrcpyW; external kernel32 name 'lstrcpyW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcpy: Pointer;
- function lstrcpy;
- begin
- GetProcedureAddress(_lstrcpy, kernel32, 'lstrcpyW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcpy]
- end;
- end;
- {$ELSE}
- function lstrcpy; external kernel32 name 'lstrcpyW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcpy: Pointer;
- function lstrcpy;
- begin
- GetProcedureAddress(_lstrcpy, kernel32, 'lstrcpyA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcpy]
- end;
- end;
- {$ELSE}
- function lstrcpy; external kernel32 name 'lstrcpyA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcatA: Pointer;
- function lstrcatA;
- begin
- GetProcedureAddress(_lstrcatA, kernel32, 'lstrcatA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcatA]
- end;
- end;
- {$ELSE}
- function lstrcatA; external kernel32 name 'lstrcatA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcatW: Pointer;
- function lstrcatW;
- begin
- GetProcedureAddress(_lstrcatW, kernel32, 'lstrcatW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcatW]
- end;
- end;
- {$ELSE}
- function lstrcatW; external kernel32 name 'lstrcatW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcat: Pointer;
- function lstrcat;
- begin
- GetProcedureAddress(_lstrcat, kernel32, 'lstrcatW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcat]
- end;
- end;
- {$ELSE}
- function lstrcat; external kernel32 name 'lstrcatW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrcat: Pointer;
- function lstrcat;
- begin
- GetProcedureAddress(_lstrcat, kernel32, 'lstrcatA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrcat]
- end;
- end;
- {$ELSE}
- function lstrcat; external kernel32 name 'lstrcatA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrlenA: Pointer;
- function lstrlenA;
- begin
- GetProcedureAddress(_lstrlenA, kernel32, 'lstrlenA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrlenA]
- end;
- end;
- {$ELSE}
- function lstrlenA; external kernel32 name 'lstrlenA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrlenW: Pointer;
- function lstrlenW;
- begin
- GetProcedureAddress(_lstrlenW, kernel32, 'lstrlenW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrlenW]
- end;
- end;
- {$ELSE}
- function lstrlenW; external kernel32 name 'lstrlenW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrlen: Pointer;
- function lstrlen;
- begin
- GetProcedureAddress(_lstrlen, kernel32, 'lstrlenW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrlen]
- end;
- end;
- {$ELSE}
- function lstrlen; external kernel32 name 'lstrlenW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _lstrlen: Pointer;
- function lstrlen;
- begin
- GetProcedureAddress(_lstrlen, kernel32, 'lstrlenA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_lstrlen]
- end;
- end;
- {$ELSE}
- function lstrlen; external kernel32 name 'lstrlenA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenFile: Pointer;
- function OpenFile;
- begin
- GetProcedureAddress(_OpenFile, kernel32, 'OpenFile');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenFile]
- end;
- end;
- {$ELSE}
- function OpenFile; external kernel32 name 'OpenFile';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- __lopen: Pointer;
- function _lopen;
- begin
- GetProcedureAddress(__lopen, kernel32, '_lopen');
- asm
- mov esp, ebp
- pop ebp
- jmp [__lopen]
- end;
- end;
- {$ELSE}
- function _lopen; external kernel32 name '_lopen';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- __lcreat: Pointer;
- function _lcreat;
- begin
- GetProcedureAddress(__lcreat, kernel32, '_lcreat');
- asm
- mov esp, ebp
- pop ebp
- jmp [__lcreat]
- end;
- end;
- {$ELSE}
- function _lcreat; external kernel32 name '_lcreat';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- __lread: Pointer;
- function _lread;
- begin
- GetProcedureAddress(__lread, kernel32, '_lread');
- asm
- mov esp, ebp
- pop ebp
- jmp [__lread]
- end;
- end;
- {$ELSE}
- function _lread; external kernel32 name '_lread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- __lwrite: Pointer;
- function _lwrite;
- begin
- GetProcedureAddress(__lwrite, kernel32, '_lwrite');
- asm
- mov esp, ebp
- pop ebp
- jmp [__lwrite]
- end;
- end;
- {$ELSE}
- function _lwrite; external kernel32 name '_lwrite';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- __hread: Pointer;
- function _hread;
- begin
- GetProcedureAddress(__hread, kernel32, '_hread');
- asm
- mov esp, ebp
- pop ebp
- jmp [__hread]
- end;
- end;
- {$ELSE}
- function _hread; external kernel32 name '_hread';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- __hwrite: Pointer;
- function _hwrite;
- begin
- GetProcedureAddress(__hwrite, kernel32, '_hwrite');
- asm
- mov esp, ebp
- pop ebp
- jmp [__hwrite]
- end;
- end;
- {$ELSE}
- function _hwrite; external kernel32 name '_hwrite';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- __lclose: Pointer;
- function _lclose;
- begin
- GetProcedureAddress(__lclose, kernel32, '_lclose');
- asm
- mov esp, ebp
- pop ebp
- jmp [__lclose]
- end;
- end;
- {$ELSE}
- function _lclose; external kernel32 name '_lclose';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- __llseek: Pointer;
- function _llseek;
- begin
- GetProcedureAddress(__llseek, kernel32, '_llseek');
- asm
- mov esp, ebp
- pop ebp
- jmp [__llseek]
- end;
- end;
- {$ELSE}
- function _llseek; external kernel32 name '_llseek';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _IsTextUnicode: Pointer;
- function IsTextUnicode;
- begin
- GetProcedureAddress(_IsTextUnicode, advapi32, 'IsTextUnicode');
- asm
- mov esp, ebp
- pop ebp
- jmp [_IsTextUnicode]
- end;
- end;
- {$ELSE}
- function IsTextUnicode; external advapi32 name 'IsTextUnicode';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FlsAlloc: Pointer;
- function FlsAlloc;
- begin
- GetProcedureAddress(_FlsAlloc, kernel32, 'FlsAlloc');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FlsAlloc]
- end;
- end;
- {$ELSE}
- function FlsAlloc; external kernel32 name 'FlsAlloc';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FlsGetValue: Pointer;
- function FlsGetValue;
- begin
- GetProcedureAddress(_FlsGetValue, kernel32, 'FlsGetValue');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FlsGetValue]
- end;
- end;
- {$ELSE}
- function FlsGetValue; external kernel32 name 'FlsGetValue';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FlsSetValue: Pointer;
- function FlsSetValue;
- begin
- GetProcedureAddress(_FlsSetValue, kernel32, 'FlsSetValue');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FlsSetValue]
- end;
- end;
- {$ELSE}
- function FlsSetValue; external kernel32 name 'FlsSetValue';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _FlsFree: Pointer;
- function FlsFree;
- begin
- GetProcedureAddress(_FlsFree, kernel32, 'FlsFree');
- asm
- mov esp, ebp
- pop ebp
- jmp [_FlsFree]
- end;
- end;
- {$ELSE}
- function FlsFree; external kernel32 name 'FlsFree';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _TlsAlloc: Pointer;
- function TlsAlloc;
- begin
- GetProcedureAddress(_TlsAlloc, kernel32, 'TlsAlloc');
- asm
- mov esp, ebp
- pop ebp
- jmp [_TlsAlloc]
- end;
- end;
- {$ELSE}
- function TlsAlloc; external kernel32 name 'TlsAlloc';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _TlsGetValue: Pointer;
- function TlsGetValue;
- begin
- GetProcedureAddress(_TlsGetValue, kernel32, 'TlsGetValue');
- asm
- mov esp, ebp
- pop ebp
- jmp [_TlsGetValue]
- end;
- end;
- {$ELSE}
- function TlsGetValue; external kernel32 name 'TlsGetValue';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _TlsSetValue: Pointer;
- function TlsSetValue;
- begin
- GetProcedureAddress(_TlsSetValue, kernel32, 'TlsSetValue');
- asm
- mov esp, ebp
- pop ebp
- jmp [_TlsSetValue]
- end;
- end;
- {$ELSE}
- function TlsSetValue; external kernel32 name 'TlsSetValue';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _TlsFree: Pointer;
- function TlsFree;
- begin
- GetProcedureAddress(_TlsFree, kernel32, 'TlsFree');
- asm
- mov esp, ebp
- pop ebp
- jmp [_TlsFree]
- end;
- end;
- {$ELSE}
- function TlsFree; external kernel32 name 'TlsFree';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SleepEx: Pointer;
- function SleepEx;
- begin
- GetProcedureAddress(_SleepEx, kernel32, 'SleepEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SleepEx]
- end;
- end;
- {$ELSE}
- function SleepEx; external kernel32 name 'SleepEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WaitForSingleObjectEx: Pointer;
- function WaitForSingleObjectEx;
- begin
- GetProcedureAddress(_WaitForSingleObjectEx, kernel32, 'WaitForSingleObjectEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WaitForSingleObjectEx]
- end;
- end;
- {$ELSE}
- function WaitForSingleObjectEx; external kernel32 name 'WaitForSingleObjectEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WaitForMultipleObjectsEx: Pointer;
- function WaitForMultipleObjectsEx;
- begin
- GetProcedureAddress(_WaitForMultipleObjectsEx, kernel32, 'WaitForMultipleObjectsEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WaitForMultipleObjectsEx]
- end;
- end;
- {$ELSE}
- function WaitForMultipleObjectsEx; external kernel32 name 'WaitForMultipleObjectsEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SignalObjectAndWait: Pointer;
- function SignalObjectAndWait;
- begin
- GetProcedureAddress(_SignalObjectAndWait, kernel32, 'SignalObjectAndWait');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SignalObjectAndWait]
- end;
- end;
- {$ELSE}
- function SignalObjectAndWait; external kernel32 name 'SignalObjectAndWait';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ReadFileEx: Pointer;
- function ReadFileEx;
- begin
- GetProcedureAddress(_ReadFileEx, kernel32, 'ReadFileEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ReadFileEx]
- end;
- end;
- {$ELSE}
- function ReadFileEx; external kernel32 name 'ReadFileEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WriteFileEx: Pointer;
- function WriteFileEx;
- begin
- GetProcedureAddress(_WriteFileEx, kernel32, 'WriteFileEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WriteFileEx]
- end;
- end;
- {$ELSE}
- function WriteFileEx; external kernel32 name 'WriteFileEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _BackupRead: Pointer;
- function BackupRead;
- begin
- GetProcedureAddress(_BackupRead, kernel32, 'BackupRead');
- asm
- mov esp, ebp
- pop ebp
- jmp [_BackupRead]
- end;
- end;
- {$ELSE}
- function BackupRead; external kernel32 name 'BackupRead';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _BackupSeek: Pointer;
- function BackupSeek;
- begin
- GetProcedureAddress(_BackupSeek, kernel32, 'BackupSeek');
- asm
- mov esp, ebp
- pop ebp
- jmp [_BackupSeek]
- end;
- end;
- {$ELSE}
- function BackupSeek; external kernel32 name 'BackupSeek';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _BackupWrite: Pointer;
- function BackupWrite;
- begin
- GetProcedureAddress(_BackupWrite, kernel32, 'BackupWrite');
- asm
- mov esp, ebp
- pop ebp
- jmp [_BackupWrite]
- end;
- end;
- {$ELSE}
- function BackupWrite; external kernel32 name 'BackupWrite';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ReadFileScatter: Pointer;
- function ReadFileScatter;
- begin
- GetProcedureAddress(_ReadFileScatter, kernel32, 'ReadFileScatter');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ReadFileScatter]
- end;
- end;
- {$ELSE}
- function ReadFileScatter; external kernel32 name 'ReadFileScatter';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _WriteFileGather: Pointer;
- function WriteFileGather;
- begin
- GetProcedureAddress(_WriteFileGather, kernel32, 'WriteFileGather');
- asm
- mov esp, ebp
- pop ebp
- jmp [_WriteFileGather]
- end;
- end;
- {$ELSE}
- function WriteFileGather; external kernel32 name 'WriteFileGather';
- {$ENDIF DYNAMIC_LINK}
- { MVB:
- The implementation of CreateMutex only interpretes bInitialOwner as True if
- it's ordinal value is 1, all other values are interpreted as False. Delphi
- compiles Longbool(True) as $FFFFFFFF which is consequently interpreted as
- False. Changing the bInitalOwner parameter type to Boolean fixes the problem
- (Boolean(True) = 1) but that would be implementation specific and might break
- in the future, though unlikely. Hence the CreateMutex function here which
- explicitly passes LongBool(1) instead of LongBool(True). }
- type
- TCreateMutexA = function (lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: LongBool; lpName: LPCSTR): HANDLE; stdcall;
- TCreateMutexW = function (lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: LongBool; lpName: LPCWSTR): HANDLE; stdcall;
- var
- _CreateMutexA: Pointer;
- _CreateMutexW: Pointer;
- function CreateMutexA(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
- begin
- GetProcedureAddress(_CreateMutexA, kernel32, 'CreateMutexA');
- if bInitialOwner then
- Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(1), lpName)
- else
- Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(0), lpName)
- end;
- function CreateMutexW(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
- begin
- GetProcedureAddress(_CreateMutexW, kernel32, 'CreateMutexW');
- if bInitialOwner then
- Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(1), lpName)
- else
- Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(0), lpName)
- end;
- {$IFDEF UNICODE}
- function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
- begin
- GetProcedureAddress(_CreateMutexW, kernel32, 'CreateMutexW');
- if bInitialOwner then
- Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(1), lpName)
- else
- Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(0), lpName)
- end;
- {$ELSE}
- function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
- begin
- GetProcedureAddress(_CreateMutexA, kernel32, 'CreateMutexA');
- if bInitialOwner then
- Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(1), lpName)
- else
- Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(0), lpName)
- end;
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenMutexA: Pointer;
- function OpenMutexA;
- begin
- GetProcedureAddress(_OpenMutexA, kernel32, 'OpenMutexA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenMutexA]
- end;
- end;
- {$ELSE}
- function OpenMutexA; external kernel32 name 'OpenMutexA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenMutexW: Pointer;
- function OpenMutexW;
- begin
- GetProcedureAddress(_OpenMutexW, kernel32, 'OpenMutexW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenMutexW]
- end;
- end;
- {$ELSE}
- function OpenMutexW; external kernel32 name 'OpenMutexW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenMutex: Pointer;
- function OpenMutex;
- begin
- GetProcedureAddress(_OpenMutex, kernel32, 'OpenMutexW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenMutex]
- end;
- end;
- {$ELSE}
- function OpenMutex; external kernel32 name 'OpenMutexW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenMutex: Pointer;
- function OpenMutex;
- begin
- GetProcedureAddress(_OpenMutex, kernel32, 'OpenMutexA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenMutex]
- end;
- end;
- {$ELSE}
- function OpenMutex; external kernel32 name 'OpenMutexA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateEventA: Pointer;
- function CreateEventA;
- begin
- GetProcedureAddress(_CreateEventA, kernel32, 'CreateEventA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateEventA]
- end;
- end;
- {$ELSE}
- function CreateEventA; external kernel32 name 'CreateEventA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateEventW: Pointer;
- function CreateEventW;
- begin
- GetProcedureAddress(_CreateEventW, kernel32, 'CreateEventW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateEventW]
- end;
- end;
- {$ELSE}
- function CreateEventW; external kernel32 name 'CreateEventW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}