(Thus speaketh the Delphi Help):
Importing functions from DLLs
To import routines from a dynamic-link library, attach a
directive of the form
external stringConstant;
to the end of a normal procedure or function header, where
stringConstant is the name of the .DLL file in single quotation marks. For
example,
function SomeFunction(S: string): string; external
'strlib.dll';
imports a function called SomeFunction from STRLIB.DLL.
You can import a routine under a different name from the one it has in the DLL. If you do this, specify the original name in the external directive: external stringConstant1 name stringConstant2;
where the first stringConstant gives the name of the .DLL file
and the second stringConstant is the routine’s original name. For example, the
following declaration imports a function from USER32.DLL (part of the Windows
API).
function MessageBox(HWnd: Integer; Text, Caption: PChar;
Flags: Integer): Integer;
stdcall; external 'user32.dll' name 'MessageBoxA'; The function’s original name is MessageBoxA, but it is
imported as MessageBox.
Instead of a name, you can use a number to identify the routine you want to import: external stringConstant index integerConstant;
where integerConstant is the routine’s index in the DLL export
table.
-ns
|
- [DUG]: Dll Function Name Jeremy Coulter
- RE: [DUG]: Dll Function Name Nello Sestini
- RE: [DUG]: Dll Function Name Neil Anderson
- RE: [DUG]: Dll Function Name Jeremy Coulter
- RE: [DUG]: Dll Function Name Neil Anderson
- RE: [DUG]: Dll Function Name Jeremy Coulter
- RE: [DUG]: Dll Function Name Jeremy Coulter