Home > Back-end >  Leaving here at 30 pit dad, that is STLL DLL is there a problem or the method has a problem, I wrote
Leaving here at 30 pit dad, that is STLL DLL is there a problem or the method has a problem, I wrote

Time:10-06

Static call without any hint, nor an error,
Procedure my_go (); Cdecl; External 'my. DLL';
Dynamic invocation, play errors, run to the MyRro (); Pop up when the access violation at 0 x10113903: read of address 0 x10113903), don't know what's the problem, thank you for your help.
Type
TMyPro=procedure (); Cdecl;
Var
MyHandle: Thandle;
MyRro: TMyPro;
The begin
Try
MyHandle:=LoadLibrary (' my. DLL);
If MyHandle> 0 then///greater than 0 for DLL loading success
Try
@ MyRro:=GetProcAddress call (MyHandle, PChar (' mygo '));
If @ MyRro<> Nil then
The begin
MyRro ();
End
The else
ShowMessage (mygo function not found ");
The finally
FreeLibrary (MyHandle);
End
The else
ShowMessage (my DLL not found ');
Except,

end;
end;

CodePudding user response:

You the function name is: mygo or my_go?
@ MyRro:=GetProcAddress call (MyHandle, PChar (' mygo '));

CodePudding user response:

Thank you upstairs, the problem is not the function name (procedure mygo (); Cdecl; External 'my. DLL';
), I wrote a,
@ MyRro:=GetProcAddress call (MyHandle, PChar (' mygo '));
I'm afraid I write in a way that is adjustable dynamic link library is wrong, this DLL has a total of three documents, estimate mydll also calls the other files,

Delphi debugger pop-up window is memory?????? This kind of question marks,
I suspect the DLL has a problem, but I don't know how to confirm, thank you for advice

CodePudding user response:

@ MyRro:=GetProcAddress call (MyHandle, PChar (' mygo '));
Modified to MyRro:=GetProcAddress call (MyHandle, PChar (' mygo '));

CodePudding user response:

DLL lost on look at
Either with IDA and have a look
  • Related