IHTMLPrivateWindow4

The IHTMLPrivateWindow4 interface is implemented by MSHTML for the window object. It derives from a presumably earlier interface IHTMLPrivateWindow, which in turn derives only from IUnknown. The IIDs are:

IHTMLPrivateWindow {3050F6DC-98B5-11CF-BB82-00AA00BDCE0B}
IHTMLPrivateWindow4 {3050F594-98B5-11CF-BB82-00AA00BDCE0B}

Microsoft’s only documentation of these interfaces seems to be that the header file MSHTMDID.H defines a DISPID symbol for each method, as if to anticipate that the methods will be exposed to scripting, but defines no numerical value. Note that the interface is anyway not scriptable since it is not based on IDispatch. Perhaps there is more to it, but inasmuch as this empty definition of a DISPID symbol has any meaning, it does at least suggest which methods belong to which interface.

There is also that the symbols IID_IHTMLPrivateWindow and IID_IHTMLPrivateWindow4 are defined in the UUID.LIB library.

Methods

The original IHMTLPrivateWindow methods are:

Offset Method
0x0C SuperNavigate
0x10 GetPendingUrl
0x14 SetPICSTarget
0x18 PICSComplete
0x1C FindWindowByName
0x20 GetAddressBarUrl

The methods added for IHTMLPrivateWindow4 are:

Offset Method
0x24 SuperNavigate2
0x28 SuperNavigate3

Prototypes

The following are known from Microsoft’s symbol files:

HRESULT SuperNavigate (BSTR, BSTR, BSTR, BSTR, VARIANT *, VARIANT *, ULONG);
HRESULT GetPendingUrl (BSTR *);
HRESULT SetPICSTarget (IOleCommandTarget *);
HRESULT PICSComplete (INT);
HRESULT FindWindowByName (PCWSTR, IHTMLWindow2 **);
HRESULT GetAddressBarUrl (PWSTR *);
HRESULT SuperNavigate2 (IUri *, BSTR, BSTR, BSTR, VARIANT *, VARIANT *, ULONG);
HRESULT SuperNavigate3 (IUri *, BSTR, BSTR, BSTR, IStream *, ULONG);

Use By Microsoft

Microsoft’s symbol files show that IID_IHTMLPrivateWindow is known to both ACTXPRXY.DLL and IEFRAME.DLL (and, of course, to MSHTML). They also show IEFRAME, MSHTML and SHDOCVW.DLL getting this IID in the compiler-generated form _GUID_3050f6dc_98b5_11cf_bb82_00aa00bdce0b.

The IHTMLPrivateWindow4 interface sees less use. MSHTML knows the IID_IHTMLPrivateWindow4 symbol, of course, and IEFRAME has the compiler-generated _GUID_3050f594_98b5_11cf_bb82_00aa00bdce0b.