Unit Call32nt

Classes

Functions

Call32 - value to add to sp to restore stack pointer
Declare32 - /----------------------------------------------------- // Declare32 // This function is called directly from VB.
GetVDMPointer32W - If there was no error, set Call32NTErrorOccurred to false

Types

pPROC32ENTRY
pPROC32LIST
THandle32
tPROC32ENTRY
tPROC32LIST

Constants

Call32NTError
cAlloc
CALLOCGROW
cRegistered
fGotProcs
rgPROC32ENTRY
rgProc32handle

Variables

Callproc32W
FreeLibrary32W
GetProcAddress32W
LoadLibraryEx32W
lpvGetCapture
lpvGetLastError


Functions


procedure Call32(iProc:longint);

value to add to sp to restore stack pointer

function Declare32(lpstrName,lpstrLib,lpstrArg:pchar):longint;

/----------------------------------------------------- // Declare32 // This function is called directly from VB. // It allocates and fills in a PROC32ENTRY structure // so that we can call the 32 bit function. //-----------------------------------------------------

function GetVDMPointer32W(name:pchar;Length:word):longint;

If there was no error, set Call32NTErrorOccurred to false

Types


pPROC32ENTRY=^tPROC32ENTRY
number of parameters
pPROC32LIST=^tPROC32LIST

THandle32 = longint

tPROC32ENTRY = record
hinst : longint;
lpfunc : tfarproc;
dwAddrXlat : longint;
dwHwndXlat : longint;
nParams : longint;
end;

tPROC32LIST=array[0..0] of tPROC32ENTRY;

Constants

Call32NTError = false

No Windows Stack frame!} {$R-} {No range checking!} Translation by Christian Ghisler, from: //---------------------------------------------------------- // CALL32.C // // This creates a DLL for 16-bit Visual Basic programs to // call 32-bit DLLs on Windows NT 3.1. It uses the // Generic Thunks feature of the WOW subsystem on Windows // NT to load and call 32 bit DLLs. This file should // be compile into a 16-bit DLL. // // Writted by Peter Golde. //----------------------------------------------------------

cAlloc = 0

number of registered functions.

CALLOCGROW = 10

array of PROC32ENTRY structures.

cRegistered = 0

rgProc32Entry points to an array of PROC32ENTRY functions, which is grown as needed. The value returned by Declare32 is an index into this array.

fGotProcs = FALSE

Handle auf globalen Speicherbereich für rgProc32Entry } { These are the addresses of the Generic Thunk functions in the WOW KERNEL.

rgPROC32ENTRY = nil

number of alloced PROC32ENTRY structures.

rgProc32handle = 0

number of entries to grow rgProc32Entry by

Variables

Callproc32W : function (address:pointer;n,c:longint):longint

Did we successfully get the addresses?

FreeLibrary32W : function(handle:longint):bool

GetProcAddress32W : function(module:longint;funcname:pchar):pointer

LoadLibraryEx32W : function(libname:pchar;a,b:longint):longint

lpvGetCapture : pointer

lpvGetLastError : function:pchar