How to use action ConvertTo to convert TLB parameter into managed type IntPtr?

Sep 1, 2009 at 6:41 PM


I have IDL entry like this:

HRESULT Method([in, ref] VARIANT* pVal);

I need to call this method with value VARIANT VT_EMPTY (but 'null' converts into VT_NULL).

Manually editing IL-code allows me to solve this problem:

.method public hidebysig newslot abstract virtual
          instance void  Method([in] native int pVal) runtime managed internalcall

(I replace "[in] object&  marshal(struct) pVal" =>"[in] native int pVal")

How to make this in TlbImp2?

Sep 3, 2009 at 7:22 AM

It seems the latest version of TlbImpConfigFileEditor.exe doesnt support native int or intptr when using ConvertTo action. we will add this ConvertTo action in the furture.

Sep 3, 2009 at 3:34 PM

Thanks, I will look forward

Aug 15, 2011 at 9:51 AM

What about this issue? 2 yeras passed :( Current feature is important for me. Any chances that tlbimp2 will support this?