Click here to Skip to main content
14,984,183 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have 2 processes say Proc1.exe and Proc2.exe. Assume that Proc2.exe acts as a COM server and I want to send a complex user-defined structure to Proc1.exe.

struct str1
  string w1;
  string w2;
Struct str2
    int a ;

    str2 s1[3];

Now I have declared the above mentioned structures in the IDL file . And I have a method in my interface that takes str2 as a parameter.

Now when I invoke this method passing the relevant structure as the parameter from Proc1.exe to Proc2.exe , I keep getting a runtime error telling " The Stub received bad data". I am doing the structure initializatin correctly.

Is there something more I need to do?

Any help is really appreciated. Sample code wud be gr8.
Updated 12-Jul-10 4:52am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900