비베로 만든 dll이 있습니다.
콜하는것은
procedure TRealView.Multiddll;
type
//dll에 있는 함수 파라메터와 리턴값
TFunc = function(vxx:single;vyy:single;vzz:single;nam:string):double;stdcall;
var
//=================
H:Thandle;
MyFunc:TFunc;
s,press:string;
dou:double;
a,b,c:integer;
//====================
begin
a:=1;b:=1;c:=1;
H:=LoadLibrary('MultiD_DLL.dll');
if(H>32) then //dll을 찾지 못하면 32보다 작은 수를 반환
begin
@MyFunc := GetProcAddress(H,'GetValue_MultiD');
if(@MyFunc <> nil) then //주소를 얻지 못하면 nil을 반환
begin
//press:=
dou:=MyFunc(a,b,c,press);
// Realview.Caption(s);
ShowMessage(FloatToStr(dou));
end
else
begin
s:='MultiD_DLL.dll의 GetValue_MultiD(주소 얻는데 실패)를 찾을수 없다!'; //-----1번 오류 출력!!!
ShowMessage(s);
end;
FreeLibrary(H);
end
else
begin
s:='MultiD_DLL.dll을 찾을수 없다';
ShowMessage(s);
end;
end;
이렇게 불러오고 있는데..dll찾는 것은 되지만 dll에 있는 함수를 찾지 못하고...계속해서
1번 오류가 출력되고 있습니다.
왜 그런지 알려주세요..
문법은 맞는거 같은데..혹...틀린점이 있으면 알려주세요!!.
부탁 합니다.
|