pchKey is the path for your preference settings.
Remember to omit the leading '\' in the path. The constant dw
is not used.
To take full advance of this useful function, you should open
your Registry Editor and study the settings under HKEY_CURRENT_USER\Sofware\Microsoft\Internet
Explorer. Since this function is called just before OnDownloadBegin,
you can even use it to set up different settings for different
web-locations.
In the following stupid demo we use OnGetOptionKeyPath to
add an extra item to the default extended menu (mouse right-click
menu) when - and only when - the webbrowser loads www.borland.com
:
Add to the registry under HKEY_CURRENT_USER
New key: Software\OurSetting\Internet
Explorer.
New key: Software\OurSettings\Internet Explorer\MenuExt.
New key: Software\OurSettings\Internet Explorer\MenuExt\Home Sweet
Home\.
add Binary Value 'Contexts' = 01