DIID_HTMLDocumentEvents2 Produces Linker Errors

  • Thread starter Thread starter Arsen V.
  • Start date Start date
A

Arsen V.

Hello,

I have the following:
....

typedef IDispEventImpl<1, CToolBandObj, &DIID_HTMLDocumentEvents2,
&LIBID_MSHTML, 1, 0> SinkHTMLDocumentImpl;

....

When the project is compiled, Linker gives the following errors:

Linking...
Creating library Debug/Test.lib and object Debug/Test.exp
Test.obj : error LNK2001: unresolved external symbol
_DIID_HTMLDocumentEvents2
ToolBandObj.obj : error LNK2001: unresolved external symbol
_DIID_HTMLDocumentEvents2
Debug/Test.dll : fatal error LNK1120: 1 unresolved externals

What am I missing? Do I need to include a DLL?

Thanks,
Arsen
 
Arsen V. said:
I have the following:
...

typedef IDispEventImpl<1, CToolBandObj, &DIID_HTMLDocumentEvents2,
&LIBID_MSHTML, 1, 0> SinkHTMLDocumentImpl;

mshtml.tlb is version 4.0, not 1.0
When the project is compiled, Linker gives the following errors:

Linking...
Creating library Debug/Test.lib and object Debug/Test.exp
Test.obj : error LNK2001: unresolved external symbol
_DIID_HTMLDocumentEvents2

Link against Uuid.Lib. You may need to download and install the latest
version of Platform SDK, and make sure that SDK's Lib directory is
listed about Visual Studio's Lib directory under Tools | Options |
Directories | Library files.
--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
 
Hi Igor,

I am now linking agains the following libs:

kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib atl.lib
Urlmon.lib wininet.lib Uuid.Lib

I changed the version to 4.0 instead of 1.0

I have the latest Platform SDK, but it only has an INCLUDE directory not the
LIB directory. Do I need to install another one? Where do I get a copy?

I am still getting the same error:

unresolved external symbol _DIID_HTMLDocumentEvents2

I tried doing a Rebuild All, but got the same error.

Thank you for your help!

Arsen
 
Arsen V. said:
I have the latest Platform SDK, but it only has an INCLUDE directory not the
LIB directory. Do I need to install another one? Where do I get a
copy?

Then your installation is broken. It should have both Include and Lib.
Redownload and reinstall.
--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top