Link to home
Start Free TrialLog in
Avatar of c095276
c095276

asked on

Passing const _variant_t & to a function in a dll

I have used the #import to import the msxml.dll in one of my projects.  The following function is giving me trouble.
IXMLDOMNodePtr createNode ( const _variant_t & type, _bstr_t name, _bstr_t namespaceURI );

How do you pass the first argument in.  I tryed to pass the nodeType property from another node into it and I get compile errors. I have tryed to cast the argument to a COleVariant object, and that also gives an error.
ASKER CERTIFIED SOLUTION
Avatar of ShaunWilde
ShaunWilde

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of c095276
c095276

ASKER

Thanks I actually had to cast the NODE_ELEMENT to a BYTE, but it seem to work great.
you could also do

myObj->createNode("element",...); // NODE_ELEMENT