views:

29

answers:

1

We have a 32-bit app which interfaces with a 64-bit COM control. In order to handle the interface, I created a 64-bit COM object which resides in a local server (exe). This local server object implements the same interface as our COM control, and simply passes-through the calls. Everything is working except for those interface functions which take a VARIANT * as a parameter. I'm guessing the problem is the difference in size of the pointers. What can I do to address this problem?

The Variant* holds a BSTR. Here's the snippet from the IDL showing the function call:

[id(5), helpstring("method GetSystemInfo")] HRESULT GetSystemInfo([in] LONG InfoID, [in] LONG Channel, [in,out] VARIANT* InfoVal);

Thanks

A: 

I figured it out. When working with the VARIANT, I needed to set v.bstrVal = NULL prior to the call.

Curtis