all groups > dotnet interop > july 2006 >
You're in the

dotnet interop

group:

HOW TO READ ARRAY OF STRUCTURES FROM COM using C#


HOW TO READ ARRAY OF STRUCTURES FROM COM using C# srinivas
7/3/2006 4:28:21 AM
dotnet interop:
Hi ,

Pls help me to solve this problem .

/* --this is one of the function in COM component */

int ProjectLIsts(LPCTSTR prj , VARIANT* prj_list)

{
prj_Lists= { ARRY OF STRUCTERES . ,.ONE STRUCTERES FOR EACH PROJECT
}

returns TOTAL NUM of PROJECTS
}

...........
I want to do it using pinvoke method .

How can read the ARRAY OF STRUCTERES from managed Code .

My project structure is


typedef struct {
char name[50]; //full project name
char mnemonic[20];
char lock;
char hide;
}PRJ_INFO;

I am new to .net . So pls help to overcome for this problem .I searched
so many sites but I did not get correct answer for this problem.

If any one suggest good method I will follow that method

Regards,
Srinivas
Re: HOW TO READ ARRAY OF STRUCTURES FROM COM using C# TDC
7/7/2006 5:11:17 AM
Structures in Variants are tricky. This looks even trickier because it
looks like it is a Variant containing an array of structures (which I
guess would then be themselves Variant-Structures)? Do you have access
to the source of the COM component or is it a thrid-party component?


[quoted text, click to view]
Re: HOW TO READ ARRAY OF STRUCTURES FROM COM using C# srinivas
7/9/2006 10:15:17 PM
yes i have access permissions .. For solving that problem i created
regular DLL .
[quoted text, click to view]
AddThis Social Bookmark Button