Original Post
Hi I was planning to try the cutscene example from dx9. I started by stripping all the command line stuff (make the thing more readable and reconstructing it line by line (btw thats how I learn from example .. reading the help file for everything I don't understand) Here is my code so far: CoInitializeEx undeclared indentifier. What do I have to include to make this work!!!!! For some weird reason the cutscene example compiles perfectly except when I paste the code from cutscene.cpp over into my file (complains about the same thing). Might this be something in the project settings? Thanks Talib PS I still don't understand what CoInitializeEx does, it's help wasn't too .... um, well helpfull
#include <windows.h>
#include <dshow.h>
#include <stdio.h>
#include <atlbase.h>
#include <objbase.h>
//included almost everything to try and make it work .. might try the kitchen sink next
LRESULT WINAPI WindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam )
{
switch( Msg )
{
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hWnd, Msg, wParam, lParam);
}
int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HWND hWnd;
HRESULT hr;
WNDCLASS wc = {0};
wc.lpfnWndProc = (WNDPROC) WindowProc;
wc.hInstance = hInstance;
wc.lpszClassName = "Hidden Window";
if (!RegisterClass(&wc))
return FALSE;
hWnd = CreateWindowEx(0,"Hidden Window", "FSMovie",0,0,0,0,0,0,0,hInstance,0);
if (FAILED(hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED)))
return hr;
//Error Here!
return 0;
}