'CoInitializeEx' undeclared identifier?????
i am getting this error
''CoInitializeEx'' undeclared identifier
when i try to use CoInitialiseEx. I got this from the bgmusic sample in the directshow samples in the dx90sdk.
It works in their program, but not mine, i copied all their headers and links, and still it cant find it, i include the ole3d.dll and objbase.h, and still it doesnt work.
What on earth could be the reason my program can''t find it, and the bgmusic sample can??
Thanks,
make sure you include the #define _WIN32_DCOM preprocessor directive at the beginning of your code
I know you got it working now, but just for anyone else...
I was scratching my head over this for days - couldn''t work out why the sample worked and mine didn''t... identical code and all
Turns out that they (MS-DX) #define the _WIN32_WINNT = 0x400 in the project properties/config pages.
iirc, setting that up ALSO defines the _WIN32_DCOM flag that was mentioned, because all (?) versions of WINNT since 4.0 have DCOM built in...
just my 2-cents
Jack
I was scratching my head over this for days - couldn''t work out why the sample worked and mine didn''t... identical code and all
Turns out that they (MS-DX) #define the _WIN32_WINNT = 0x400 in the project properties/config pages.
iirc, setting that up ALSO defines the _WIN32_DCOM flag that was mentioned, because all (?) versions of WINNT since 4.0 have DCOM built in...
just my 2-cents
Jack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement