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 DLLCodePudding user response: