function initCerti(rbuf:pchar):smallint;stdcall; external 'Certi.dll';
var rbuf : array[0..199] of char;
RetPass : smallint;
-----
procedure TForm1.Button3Click(Sender: TObject);
type
TFunc = function(rbuf:pchar):smallint; stdcall;
var
H : THandle;
MyFunc : TFunc;
begin
Edit1.Text := '';
FillChar(rbuf, SizeOf(rbuf), #0 );
rbuf := 'C:\jin';
RetPass := 0;
H := LoadLibrary('Certi.dll');
if H<32 then begin
ShowMessage('No Dll');
exit;
end;
try
@MyFunc := GetProcAddress(H, 'initCerti'); <-------- get으로 얻은 주소는 nil이 되네요
이부분에서 myfunc 으로 안들어가요
if not (@MyFunc = nil) then begin
RetPass := MyFunc(rbuf); <-------실제 exception은 여기서 납니다
Edit1.text := 'Ret <'+intToStr(RetPass)+'> '+rbuf;
end;
FreeLibrary(H);
except
Edit1.text := 'Exception Error';
end;
end;
============
exception message
exception class EExternerException with message 'External exception E06D7363.
답글 꼬옥 부탁드립니다
|