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.

 

ObjectHydrated pattern in DotNetNuke UserInfo is not good

DotNetNuke UserMembership class (as well as some others) hasObjectHydrated property as a flag is object loaded or not.

In my opinion implementation of this pattern is fragile and not reliable.

Get  Membership Property of  UserInfo tries to load data from UserMembership, which is not good, because Get (read-only) property should not change state of the object.
It can cause different behavior in Debug and Release modes, if any code like Debug.WriteLine(ObjUser.Membership.Email) will be used.

Also assigning any of UserMembership properties (e.g. Email) sets has ObjectHydrated flag to true, even if other properties are not filled.

I've noticed a few times that FillUserMembership wasn't called when expected and properties of UserMembership were null, even if ObjectHydrated flag was true.It caused exceptions, that are not reproducible.

I've noticed that DNN support has reports about the issue(see here and here)

«March»
SunMonTueWedThuFriSat
2627281234
567891011
12131415161718
19202122232425
2627282930311
2345678