Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2005

Tip: Looking for answers? Try searching our database.

CoInitializeEx

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 31 Jan 2005 22:35 GMT
Hi,

I am trying to use CoInitializeEx but VC++ 6.0 compiler always complaining
error C2065: 'CoInitializeEx' : undeclared identifier.  

According to MSDN
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/cmf_a2c
_5iyg.asp
),
CoInitializeEx is in "ole32.lib" and I have it in my "Project -> Settings ->
Link -> Object/library modules".

Is there anywhere else I forgot to include?

Please advice, thanks!
-P
Larry Brasfield - 31 Jan 2005 22:58 GMT
> Hi,
Hi.

> I am trying to use CoInitializeEx but VC++ 6.0 compiler always complaining
> error C2065: 'CoInitializeEx' : undeclared identifier.
[quoted text clipped - 5 lines]
>
> Is there anywhere else I forgot to include?

Somewhere before that ill-fated usage, write
 #define _WIN32_WINNT 0x0400
 #include <ole2.h>

You might want to study the following screen-scrape and
think about the implication a little bit.
=====================================
[C:\tmp]
> pushd \Programs\DevStud.NET.2003\Vc7\PlatformSDK\Include\

[C:\Programs\DevStud.NET.2003\Vc7\PlatformSDK\Include]
> findstr CoInitializeEx *.h
...
ObjBase.h:WINOLEAPI  CoInitializeEx(IN LPVOID pvReserved, IN DWORD dwCoInit);

[C:\Programs\DevStud.NET.2003\Vc7\PlatformSDK\Include]
> findstr /i objbase.h *.h | findstr include
...
Ole2.h:#include <objbase.h>
...

======================================
(edited for length)

> Please advice, thanks!

Your error message came from the compiler.
Your settings shown above affect the linker.
Those tools are distinctly different and you should
learn to distinguish them to help sort out problems
of this nature on your own.

Signature

--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com
Above views may belong only to me.

Paul - 31 Jan 2005 23:29 GMT
Got it, thx!

> > Hi,
> Hi.
[quoted text clipped - 40 lines]
> learn to distinguish them to help sort out problems
> of this nature on your own.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.