Re: Calling dll functions
- From: "Mythran" <kip_potter@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 20 Apr 2006 10:18:20 -0700
"John" <John@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:0F784C81-9ED4-425D-8ADF-89BF15762C3A@xxxxxxxxxxxxxxxx
DWORD _stdcall DLLFunction(DWORD Num, CHAR *Str);
I call the above dll function from a C++ app. Now I need to call it from my
C# app. How can I do it?
[DllImport("MyDll.dll")]
public static extern int DLLFunction(int Num, string Info);
int Num;
string Info = new string(' ', 80);
DLLFunction(Num, Info);
I cannot get anything in variable Info. Please help. Thanks.
[DllImport("myDll.dll")]
public static extern int DLLFunction(out int Num, StringBuilder Info);
int Num;
string Info = new StringBuilder(80);
DLLFunction(out Num, Info);
string results = Info.ToString();
HTH,
Mythran
.
- Follow-Ups:
- Re: Calling dll functions
- From: sb
- Re: Calling dll functions
- Prev by Date: Re: Local variables in Asynchronous socket server
- Next by Date: Re: C# 2.0 + WMI + Subnet
- Previous by thread: Re: Local variables in Asynchronous socket server
- Next by thread: Re: Calling dll functions
- Index(es):
Relevant Pages
|