By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,805 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,805 IT Pros & Developers. It's quick & easy.

Passing an array of Chars byref to Delphi dll

P: 1
Hi
Im trying to get my vb program to talk to a Delphi written dll. I can get it to work as long as I only ask for the first char in a string but I cant seem to return the whole string from the dll
Delphi code
function GetInfo(info:pchar):longint;stdcall;external 'RRMifare32.dll';

VB
Declare Function GetInfo Lib "RRMifare32.dll" (ByRef info() As Char) As Long

Dim info(12) As Char
GetInfo(info)

Running this gives me a 'FatalExecutionEngineError' error, which I assume is because my dll is unable to interpret the char array from VB. Any ideas what I should be passing it as?
Thanks
Chris
Mar 26 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.