mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 19:09:27 +02:00
+ import the module management win16 apis
git-svn-id: trunk@31541 -
This commit is contained in:
parent
10a01c0127
commit
203d26af4b
@ -66,6 +66,41 @@ procedure Throw(var CatchBuf: TCatchBuf; ThrowBack: SmallInt); external 'KERNEL'
|
|||||||
procedure SwitchStackBack; external 'KERNEL';
|
procedure SwitchStackBack; external 'KERNEL';
|
||||||
procedure SwitchStackTo(StackSegment, StackPointer, StackTop: UINT); external 'KERNEL';
|
procedure SwitchStackTo(StackSegment, StackPointer, StackTop: UINT); external 'KERNEL';
|
||||||
|
|
||||||
|
{ Module Management }
|
||||||
|
|
||||||
|
function LoadModule(ModuleName: LPCSTR; ParameterName: LPVOID): HINST; external 'KERNEL';
|
||||||
|
function FreeModule(Module: HINST): BOOL; external 'KERNEL';
|
||||||
|
|
||||||
|
function LoadLibrary(LibFileName: LPCSTR): HINST; external 'KERNEL';
|
||||||
|
procedure FreeLibrary(LibModule: HINST); external 'KERNEL';
|
||||||
|
|
||||||
|
function WinExec(CmdLine: LPCSTR; CmdShow: UINT): UINT; external 'KERNEL';
|
||||||
|
|
||||||
|
function GetModuleHandle(ModuleName: LPCSTR): HMODULE; external 'KERNEL';
|
||||||
|
|
||||||
|
function GetModuleUsage(Module: HINST): SmallInt; external 'KERNEL';
|
||||||
|
function GetModuleFileName(Module: HINST; FileName: LPSTR; Size: SmallInt): SmallInt; external 'KERNEL';
|
||||||
|
|
||||||
|
function GetProcAddress(Module: HINST; ProcName: LPCSTR): FARPROC; external 'KERNEL';
|
||||||
|
|
||||||
|
function GetInstanceData(Instance: HINST; Data: PBYTE; Count: SmallInt): SmallInt; external 'KERNEL';
|
||||||
|
|
||||||
|
function GetCodeHandle(Proc: FARPROC): HGLOBAL; external 'KERNEL';
|
||||||
|
|
||||||
|
procedure GetCodeInfo(lpProc: FARPROC; lpSegInfo: LPSEGINFO); external 'KERNEL';
|
||||||
|
|
||||||
|
function MakeProcInstance(Proc: FARPROC; Instance: HINST): FARPROC; external 'KERNEL';
|
||||||
|
procedure FreeProcInstance(Proc: FARPROC); external 'KERNEL';
|
||||||
|
|
||||||
|
{#ifdef _LAX
|
||||||
|
#define MakeProcInstance(__F, __H) MakeProcInstance((FARPROC)__F, __H)
|
||||||
|
#define FreeProcInstance(__F) FreeProcInstance((FARPROC)__F)
|
||||||
|
#endif /* _LAX */}
|
||||||
|
|
||||||
|
function SetSwapAreaSize(Size: UINT): LONG; external 'KERNEL';
|
||||||
|
procedure SwapRecording(Flag: UINT); external 'KERNEL';
|
||||||
|
procedure ValidateCodeSegments; external 'KERNEL';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
function LOBYTE(w: Word): Byte;
|
function LOBYTE(w: Word): Byte;
|
||||||
|
@ -93,6 +93,27 @@ type
|
|||||||
PCatchBuf = ^TCatchBuf;
|
PCatchBuf = ^TCatchBuf;
|
||||||
TCatchBuf = CATCHBUF;
|
TCatchBuf = CATCHBUF;
|
||||||
|
|
||||||
|
const
|
||||||
|
HINSTANCE_ERROR = HINST(32);
|
||||||
|
|
||||||
|
{ Windows Exit Procedure flag values }
|
||||||
|
WEP_SYSTEM_EXIT = 1;
|
||||||
|
WEP_FREE_DLL = 0;
|
||||||
|
|
||||||
|
type
|
||||||
|
LPSEGINFO = ^SEGINFO; far;
|
||||||
|
SEGINFO = record
|
||||||
|
offSegment: UINT;
|
||||||
|
cbSegment: UINT;
|
||||||
|
flags: UINT;
|
||||||
|
cbAlloc: UINT;
|
||||||
|
h: HGLOBAL;
|
||||||
|
alignShift: UINT;
|
||||||
|
reserved: array [0..1] of UINT;
|
||||||
|
end;
|
||||||
|
PSegInfo = ^TSegInfo;
|
||||||
|
TSegInfo = SEGINFO;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user