Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Oct : Delphi DLL and C..
| Subject: | Delphi DLL and C.. |
| Posted by: | "Craig" (firebirdwebg..@hotmail.com) |
| Date: | Thu, 11 Oct 2007 15:41:07 |
Hi,
I have a DLL written in Delphi that returns an integer..
function Validate(UserName: String; Password: String): integer;stdcall;
It works fine..
What I want to do now is return a record like..instead of just an integer..
Type
TUserData = record
Name : String;
Pay : Double;
Time: TDateTime;
End;
I have no problem doing this in delphi , but the program that is calling my
DLL is an app written in C.
Can you tell me how to structure this function so the C app can read it?
Also,
I need to tweek the C app too.. Can you tell me what it would look like on
the C end? So I can get my data from the DLL ??
What about passing these vars by reference, would that be better? Can it be
done with a DLL?
Thanks for any help. Im really not that strong on this stuff.
Craig