> Of course, this by itself is not going to work as I've listed it. You must > analyze the method being called in terms its parameters. Each parameter > will need a corresponding ParameterModifier set properly based on whether > the parameter is an in-, out-, or ref-type. You can then make the call (via > InvokeMember) and copy the modified parameters back into the original > message...
I did try that one a couple of days ago, but what I didn't do back then was to make a copy of the methodMessage.Args array. I did a combination of these two factors now and it worked! > BTW, I recall an old thread in the DOTNET archives where Adam Nathan talks > about VT_VARIANT | VT_BYREF not being supported. I say this because of the > following function (that was sent to me out-of-band): > HRESULT bcRACIsEnabled([out] VARIANT *pvtAuthenticationKey, [out]INT* > piIsEnabled); > You may find yourself having trouble with this one... That one actually worked too, so VT_VARIANT | VT_BYREF does work with on [out] parameters. This has been an interesting problem and hopefully I have a solution now that will work with all the methods in our legacy COM objects. Thanks a lot for your help! Would be useful to update your Interposer class for COM with this code, and post it back to gotdotnet.com? - Petter You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
