Reference COM .NET

Hi there,
I've following problem:

I want to call follownig C# function exposed via COM interface

public void CSFoo(ref object object)
{
object = /* some object */;
}

From my unmanaged code call looks like this:

VARIANT var;
pCOMobj->CSFoo(&var);

As you can see I want to pass parameter form managed code as a reference. Normally I would use LPVOID type, but I can do it in C#. Alas I get runtime error: "Application requested Runtime to terminate in unusual way"

Please help me - what am I doing wrong :confused:
[598 byte] By [Mr. Tomaszek] at [2007-11-18 19:15:45]