2010/1/7 Andrew Eikum aeikum@codeweavers.com:
The last call in IHlink::Navigate is to IHlinkSite::OnNavigationComplete. This function takes an HRESULT argument which, according to MSDN, should contain the final result of the navigation. Again, according to MSDN, IHlink::Navigate should return S_OK on success, error otherwise.
MSDN says that the HRESULT is for the
Is http://msdn.microsoft.com/en-us/library/aa767919%28VS.85%29.aspx (hyperlinking) useful? http://msdn.microsoft.com/en-us/library/aa740928%28VS.85%29.aspx (hyperlinking tutorial) is linked from there and contains sections of code for various IHlinkTarget and IHlink related methods.
Of interest is the bit under "Jumping to the hyperlink target" -- according to MSDN: "The following code is a theoretical implementation of a hyperlink object. The system-provided hyperlink object uses similar code." It proceeds to show some code of what an IHlink::Navigate call is doing.
Of course, reality is different from what MSDN claims. On native, IHlinkSite::OnNavigationComplete is consistently called by IHlink::Navigate with its HRESULT argument set to 0x40100. I have no idea what this value is supposed to represent. Every Windows version with an hlink DLL, on both x86 and x86_64, passes 0x40100 to the IHlinkSite when IHlink::Navigate is called. It doesn't seem to matter what the target of the navigation is (website, file on filesystem). See the tests linked below.
The code above is using different methods to locate an IHlinkTarget object, and then calling the Navigate method on that (and presumably returning the HRESULT of that call, although the code listed does not return anything).
NOTE: The test is incomplete (there are a lot of methods on the interfaces that are returning E_NOTIMPL), especially the QueryInterface and QueryService methods.
- Reece