"out keyword" in COM interop
-
Hi, I have a problem with passing parameters to a method in a COM , i had imported to my C# application using the IDE add reference. This is because the parameter has type as "out object", when i tried passing an Object (reference) to this, the error is "invalid arguments". Can anybody please help me out on this?? Yours Truly SLN
-
Hi, I have a problem with passing parameters to a method in a COM , i had imported to my C# application using the IDE add reference. This is because the parameter has type as "out object", when i tried passing an Object (reference) to this, the error is "invalid arguments". Can anybody please help me out on this?? Yours Truly SLN
You probably just need to add the "out" keyword to your function call, just before the variable name.
void foo( YourComObject com ) { object o; com.GetXyz( out o ); ... }
Burt Harris -
You probably just need to add the "out" keyword to your function call, just before the variable name.
void foo( YourComObject com ) { object o; com.GetXyz( out o ); ... }
Burt HarrisThanks it worked!!! :) Yours Truly SLN