COM Multithreaded Initialization

Started by
1 comment, last by Del Snd of Thndr 21 years, 1 month ago
I realize this isn''t exactly DirectX, but I figured it''s pretty closely related. I''m beginning to learn a little bit of COM (so I can get to DirectX) in VC++ .NET. I have included windows.h and windowsx.h, and I am trying to initialize COM for a multithreaded application. I can use "CoInitialize(NULL);" without errors, but I get two errors when I use "CoInitializeEx(NULL, COINIT_MULTITHREADED);". The errors are: 1)COINIT_MULTITHREADED is an undeclared identifier. 2)CoInitializeEx is an undeclared identifier. Any suggestions on what might be wrong? Thanks! ~del
~del
Advertisement
Add this to your stdafx.h file:


  #ifndef _WIN32_WINNT#define _WIN32_WINNT 0x0400#endif  


That should fix your issue.
You''re right. That did it. Thanks!



~del
~del

This topic is closed to new replies.

Advertisement