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

Sep 1, 2009 at 5:41 PM

Hi!

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?

Developer
Sep 3, 2009 at 6: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 2:34 PM

Thanks, I will look forward

Aug 15, 2011 at 8:51 AM

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