Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP! Linker problem with UrlMon.h - unresolved external HlinkSimpleNavigateToString...

92 views
Skip to first unread message

Jason Thibodeau

unread,
May 18, 2002, 2:21:07 PM5/18/02
to
I am writing an ActiveForm created in C++Builder 6. One of the key elements
is to be able to navigate to other URLs. Help!

Here's the linker error:

[Linker Error] Unresolved external 'HlinkSimpleNavigateToString' referenced
from D:\PROJECTS\MYPROJECT\MYACTIVEFORMIMPL.OBJ

Heres the code:
...
#include <UrlMon.h>
...

WideString wURL = "http:/www.somewhere.com"/;
WideString wNilStr = "";
HlinkSimpleNavigateToString(wURL.c_bstr(),wNilStr.c_bstr(),wNilStr.c_bstr(),
ComObject,NULL,NULL,0,0);
...

Here's the function as defined in UrlMon.h:

...
STDAPI

/* [in] */ LPCWSTR szTarget, // required - target document -
null if local jump w/in doc
/* [in] */ LPCWSTR szLocation, // optional, for navigation into
middle of a doc
/* [in] */ LPCWSTR szTargetFrameName,// optional, for targeting
frame-sets
/* [in] */ IUnknown *pUnk, // required - we'll search this for
other necessary interfaces
/* [in] */ IBindCtx *pbc, // optional. caller may register an
IBSC in this
/* [in] */ IBindStatusCallback *,
/* [in] */ DWORD grfHLNF, // flags
/* [in] */ DWORD dwReserved // for future use, must be NULL
);
...

So I see it is a matter of getting the function that is declared as STDIMP
to be linked to successfully in my project (BCB6), just not sure how to do
it right now... I have tried fiddling with compiler options but to no
avail:( Is it a name mangling problem? How do I get this to work? I am
relatively new with BCB, but I have used this function in many ActiveForms
in Delphi.

Thanks,
Jason


Remy Lebeau [TeamB]

unread,
May 18, 2002, 4:14:17 PM5/18/02
to
If you're using BCB5 or 6, then try adding Urlmon.lib to your project. If
you have any other version, or urlmon.lib doesn't work, then you'll have to
use UrlMon.dll directly, either via LoadLibrary()/GetProcAddress() or else
run it through IMPLIB to make a compatible .lib file for Builder to use.


Gambit

"Jason Thibodeau" <jthib...@nulogicdesign.com> wrote in message
news:3ce69b49$1_2@dnews...

0 new messages