Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting a Delphi DLL to VB

Status
Not open for further replies.

robdon

Programmer
May 21, 2001
252
ES
Hi,

I have a DLL written in Delphi that is called by a 4GL language called ProIV.

I wish to write a simialr DLL in VB, but I dont know what the Delphi equivalant is in VB.

I only need to know how to convert the parameters for the function.

The Delphi code is...

uses
Classes,
SysUtils;

type
TPCharArray = array of PChar;

//------------------------------------------------------------------------------
function MsgToFile(argc: ShortInt; argv: TPCharArray): integer; stdcall; export;

end;

exports
MsgToFile index 1;



Does anyone have any knowledge of how the function and parameters should be coded in VB, to make the VB DLL the same as the Delphi one?

I've tried a few things in VB, like...

Public Function MsgToFile(intC as Integer, strVal() As Byte) As Long

But the ProIV language does not like calling it, it just core dumps. So I must have something wrong.

Thanks,

Rob Donovan

ProIV Resource Centre <a href='
 
Why do you need to convert the dll to VB? I do a lot of work in VB/VBA, but whenever I need a dll I always write it in Delphi. Have a look at the VB DECLARE statement to see how to call it.


Hope this helps.

[vampire][bat]
 
Hi,

I have a huge project that is written in VB, and I would like to keep it all in the same language.

Also, I dont have a license for Delphi so it would cost me more money to buy Delphi.

I just needed to know what the Function deifintion (ie parameters) would be for the VB equivelant.

Thanks anyway,

Rob

ProIV Resource Centre <a href='
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top