Einzelnen Beitrag anzeigen

gandime
(Gast)

n/a Beiträge
 
#1

Virtual Basic Dll in Delphi aufrufen?

  Alt 31. Jan 2009, 16:47
Hi,
ich möchte in Delphi eine in VB geschriebene Dll aufrufen, welche ich so mache:
Delphi-Quellcode:
function TForm1.LoadDll(Name:PChar;Plugin:String):PChar;
type
  TDLLFunc = procedure;
var
  DLLHandle:THandle;
  Ret:PChar;
  func:TDllFunc;
begin
  Ret := '';
  DLLHandle:=LoadLibrary(PChar(ExtractFilePath(paramstr(0))+Plugin+'.dll'));
  if DLLHandle >= 32 then
  begin
    @func := GetProcAddress(DLLHandle,Name);
    if Assigned (func) then
      func;
  end;
  result:=Ret;
end;
So siehtz jetzt nur testweise die VB Dll aus:
Delphi-Quellcode:
Public Function start()
MsgBox "dll"
End Function
*
Public Sub start2()
MsgBox "dll"
End Sub
Was ist der Fehler?
Ich vermute den Fehler im VB-Code da ich Delphi Dll´s damit ohne Probleme laden kann!
Vlt kennt sich ja wer nen bissel mit VB aus und kann mir dabei helfen.
  Mit Zitat antworten Zitat