/******************************Public*Routine******************************\ * CloseMovie * \**************************************************************************/ DWORD CMovie::CloseMovie( ) { m_Mode = MOVIE_NOTOPENED; if(m_Mc) { if(m_Me) { m_MediaEvent = NULL; m_Me->Release(); m_Me = NULL; } if(m_Ms) { m_Ms->Release(); m_Ms = NULL; } if(m_Wc) { m_Wc->Release(); m_Wc = NULL; } m_Mc->Release(); m_Mc = NULL; if(m_Gb) { m_Gb->Release(); m_Gb = NULL; } if(m_Fg) { m_Fg->Release(); m_Fg = NULL; } } QzUninitialize(); return 0L; }
/******************************Public*Routine******************************\ * WinMain * * * Windows recognizes this function by name as the initial entry point * for the program. This function calls the application initialization * routine, if no other instance of the program is running, and always * calls the instance initialization routine. It then executes a message * retrieval and dispatch loop that is the top-level control structure * for the remainder of execution. The loop is terminated when a WM_QUIT * message is received, at which time this function exits the application * instance by returning the value passed by PostQuitMessage(). * * If this function must abort before entering the message loop, it * returns the conventional value NULL. * \**************************************************************************/ int PASCAL WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLineOld, int nCmdShow ) { USES_CONVERSION; HRESULT hres = CoInitialize(NULL); if(hres == S_FALSE) { CoUninitialize(); } if(!hPrevInstance) { if(!InitApplication(hInstance)) { return FALSE; } } /* ** Perform initializations that apply to a specific instance */ if(!InitInstance(hInstance, nCmdShow)) { return FALSE; } /* Verify that the VMR is present on this system */ if(!VerifyVMR()) return FALSE; /* ** Acquire and dispatch messages until a WM_QUIT message is received. */ int iRet = DoMainLoop(); QzUninitialize(); return iRet; }
/******************************Public*Routine******************************\ * CloseMovie * \**************************************************************************/ DWORD// CMpegMovie::CloseMovie( ) { m_Mode = MOVIE_NOTOPENED; if ( m_bWin9xCompatible ) { ShowMovie( FALSE ); if(m_Mc) { if(m_Me) { m_Me->SetNotifyWindow(NULL, 0, 0); m_Me->Release(); m_Me = NULL; } if(m_Ms) { m_Ms->Release(); m_Ms = NULL; } if (m_Bv) { m_Bv->Release(); m_Bv = NULL; } if (m_Vw) { m_Vw->put_Owner(NULL); m_Vw->put_MessageDrain(NULL); m_Vw->Release(); m_Vw = NULL; } if (m_Ba) { m_Ba->Release(); m_Ba = NULL; } m_Mc->Release(); m_Mc = NULL; if(m_Gb) { m_Gb->Release(); m_Gb = NULL; } } QzUninitialize(); return 0L; } else { if ( m_pDdcc ) m_pDdcc->Release(); if(m_Mc) { if(m_Me) { m_Me->SetNotifyWindow(NULL, 0, 0); m_Me->Release(); m_Me = NULL; } if(m_Ms) { m_Ms->Release(); m_Ms = NULL; } if(m_Wc) { m_Wc->Release(); m_Wc = NULL; } if (m_Ba) { m_Ba->Release(); m_Ba = NULL; } m_Mc->Release(); m_Mc = NULL; if(m_Gb) { m_Gb->Release(); m_Gb = NULL; } if(m_Fg) { m_Fg->Release(); m_Fg = NULL; } } QzUninitialize(); return 0L; } }