Home All Groups Group Topic Archive Search About

HOW TO READ ARRAY OF STRUCTURES FROM COM using C#

Author
3 Jul 2006 11:29 AM
srinivas
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

Author
3 Jul 2006 11:52 AM
Alessandro Zifiglio
hi Srinivas, try the following resource :
http://support.microsoft.com/default.aspx?scid=kb;en-us;305990
Regards,
Alessandro Zifiglio
http://www.asyncui.net
Show quoteHide quote
"srinivas" <ch.srinivasa***@gmail.com> ha scritto nel messaggio
news:1151926176.890413.291830@m73g2000cwd.googlegroups.com...
> 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
>
Are all your drivers up to date? click for free checkup

Author
4 Jul 2006 4:48 AM
srinivas
Hi Alessandro Zifiglio,

           Thanks a lot for this link . I will try as per that link .
Regards,
Srinivas
Alessandro Zifiglio wrote:
Show quoteHide quote
> hi Srinivas, try the following resource :
> http://support.microsoft.com/default.aspx?scid=kb;en-us;305990
> Regards,
> Alessandro Zifiglio
> http://www.asyncui.net
> "srinivas" <ch.srinivasa***@gmail.com> ha scritto nel messaggio
> news:1151926176.890413.291830@m73g2000cwd.googlegroups.com...

Bookmark and Share