Array of struct as a parameter in method
- From: smalol@xxxxxxxxx
- Date: Thu, 17 Jan 2008 22:11:48 -0800 (PST)
Hello,
I have a problem in adopting C++ libraries into C# application.
In C++ I have definitions like below:
typedef struct NAME_OF_STRUCTURE
{
short param1;
short param2;
unsigned short param3;
unsigned char param4;
} NAME_OF_STRUCTURE;
uint Method(NAME_OF_STRUCTURE *list);
And the execution is like that:
NAME_OF_STRUCTURE table[250];
Method((NAME_OF_STRUCTURE*) table)
I checked it and it works properly in C++ application. But now I have
to import and use it into my C# application. I converted structure
like this:
public struct NAME_OF_STRUCTURE
{
public short param1;
public short param2;
public ushort param3;
public byte param4;
}
But I don't know how to define method, especially how to convert
(NAME_OF_STRUCTURE*) table to C# and then execute the method.
Thanks for you help.
.
- Prev by Date: Does GetComInterfaceForObject pin the object?
- Next by Date: Debugging vb6 from ASP.NET
- Previous by thread: Does GetComInterfaceForObject pin the object?
- Next by thread: Debugging vb6 from ASP.NET
- Index(es):
Relevant Pages
|