Skip to main content
gamedev.net
🔒 Locked

Problem with CoInitializeEx()

Started by papitorico 2 replies 1.5k views
Original Post
papitorico
papitorico
hello!!! I've been havin' some issues using CoInitializeEx() in Visal Studio 2005, seems that this fuction is never found by the compiler, I had to add some preprocess macros to my source properties, however, didn't work, so I opened an old projec made in VC++ 6.0 to be able to compile. Is there an optional fuction to acces COM objects (DirectX API) in VS 2005, do I really need CoInitializeEx() (& CO.)in VS 2005 to use DirectX 9.0?
Cigguh
Cigguh
CoInitialize( NULL );
CoUninitialize();

work for me.
i make the game so i be ballin
xycsoscyx
xycsoscyx
Note - You must include the #define _WIN32_DCOM preprocessor directive at the beginning of your code to be able to use CoInitializeEx.

This is straight from the MSDN, are you defining this before you include everything? Also, as a note, CoInitialize works for me, as well, I don't need to use the Ex function in order to initialize and use Direct3D9. Relative to what the MSDN says, CoInitialize actually calls it's Ex counterpart internally, just passing in whatever default threading mode it uses.
papitorico
papitorico
Ok guys!!! thnx!!!
I'll be using CoInitialize() instead of CoInitializeEx() from now on!!!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.