Article View: borland.public.csharpbuilder.language.csharp
Article #379C# calling Delphi-function
From: ttt
Date: Thu, 21 Apr 2005 09:19
Date: Thu, 21 Apr 2005 09:19
25 lines
1344 bytes
1344 bytes
I have a problem. Could somebody help me?
I have C# program that calls a function written with Delphi.
Why won't this structure work?
public struct UserInfo
{
public char[] FirstName;
public char[] LastName;
}
UserInfo ui;
ui.FirstName = new char[80];
ui.LastName = new char[80];
Then I call a function in a DLL with a parameter: F(UserInfo ui);
The DLL made by Delphi has a record
type TUserInfo = record
FirstName: array [0..79] of char;
LastName: array [0..79] of char;
end;
What do I do wrong. It won't work.
Technical Details
Message-ID:
<4267703a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,e7244bf71a2c4e2c,start X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit From: "ttt" <jukkah63@hotmail.com> Newsgroups: borland.public.csharpbuilder.language.csharp Subject: C# calling Delphi-function Date: Thu, 21 Apr 2005 12:19:53 +0300 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 131.207.235.108 Message-ID: <4267703a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1114075194 131.207.235.108 (21 Apr 2005 02:19:54 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail