Home > Back-end >  To ask how to export the DLL constants
To ask how to export the DLL constants

Time:09-30

To ask how to export the DLL constants (a function or procedure) for a pointer type or how to make the following statements into Delphi, c + +

BoolRefTrue=(CFBooleanRef *) GetProcAddress call (corefoundation, "kCFBooleanTrue");

CodePudding user response:

This is not a dynamic import DLL function statements?


 var 
BoolRefTrue: function (x, y: integger) : integer; Stdcall//declare the body of the function, the parameters of what must be the same as the DLL.
Corefoundation: longint;
The begin
Corefoundation:=LoadLibrary (PChar (' xx. DLL));//the name of the library, library system best directory or the current directory
If dll<> 0 then
The begin
@ boolRefTrue:=GetProcAddress call (corefoundation, 'kCFBooleanTrue');

//by boolRefTrue () is used;

FreeLibrary (DLL);//finished release
end;
end;

CodePudding user response:

The above method call fails, boolRefTrue is not a function that is constant in the DLL

CodePudding user response:

refer to the second floor wohuaia99 response:
the above method call fails, boolRefTrue is not a function, is a constant in the DLL


What is this type (CFBooleanRef *)? In the DELPHI change my

Type (boolRefTrue)

CodePudding user response:

Constants for DLL function address mode is why?

CodePudding user response:

As far as I know, written by Delphi DLLs derived constants, variables, only the export function, you need constant can use function returns,
  • Related