Unexpected Changes in AxInterop.SHDocVw.dll

I had an existing .Net code that used WebBrowser Active-X control using AxInterop.SHDocVw.dll. I am not sure was it generated by VS or downloaded as primary interop.


There were a few calls in the VB code with not specified optional third parameter like this:


frmENQ.Web.ExecWB(SHDocVw.OLECMDID.OLECMDID_ZOOM, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, , z)


Recently I tried to re-build the code and found the errors:


Argument not specified for parameter ‘pvaIn’ of ‘Public Overridable Sub ExecWB(cmdID As SHDocVw.OLECMDID, cmdexecopt As SHDocVw.OLECMDEXECOPT, ByRef pvaIn As Object, ByRef pvaOut As Object)’.


After investigation I found that AxInterop.SHDocVw.dll was changed and now has 2 overloads-no one with optional parameters:


ExecWB(cmdID As SHDocVw.OLECMDID, cmdexecopt As SHDocVw.OLECMDEXECOPT, ByRef pvaIn As Object, ByRef pvaOut As Object)’


and ExecWB(cmdID As SHDocVw.OLECMDID, cmdexecopt As SHDocVw.OLECMDEXECOPT)’


So I have to change my code to avoid using optional parameters( which is recommended style anyway)


I still do not understand, when the DLL (or ActiveX control) was changed.


 

Advertisements