--- trunk/xvidcore/dshow/src/Configure.cpp 2004/03/22 22:36:25 1382 +++ trunk/xvidcore/dshow/src/Configure.cpp 2011/06/15 19:09:17 2018 @@ -3,7 +3,7 @@ * XVID MPEG-4 VIDEO CODEC * - Configure from command line - * - * Copyright(C) 2002-2004 Peter Ross + * Copyright(C) 2002-2010 Peter Ross * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: Configure.cpp,v 1.2 2004-03-22 22:36:23 edgomez Exp $ + * $Id$ * ****************************************************************************/ @@ -29,44 +29,58 @@ #include "config.h" #include "resource.h" -/* "DllEntryPoint@12" in strmbase.lib\dllentry.obj stores the module in g_hInst - this function must be called on DllEntry, inorder for property pages to function - likewise, we need g_hInst inorder to display property sheets from command line -*/ -extern HINSTANCE g_hInst; +HINSTANCE g_xvid_hInst; -int adv_dialog(HWND hwndOwner) + +INT_PTR adv_dialog(HWND hwndOwner) { PROPSHEETPAGE psp [1]; PROPSHEETHEADER psh; psp[0].dwSize = sizeof (PROPSHEETPAGE); psp[0].dwFlags = PSP_USETITLE; - psp[0].hInstance = g_hInst; + psp[0].hInstance = g_xvid_hInst; psp[0].pszTemplate = MAKEINTRESOURCE (IDD_ABOUT); psp[0].pszIcon = NULL; psp[0].pfnDlgProc = adv_proc; - psp[0].pszTitle = "About"; + psp[0].pszTitle = TEXT("About"); psp[0].lParam = 0; psh.dwSize = sizeof (PROPSHEETHEADER); psh.dwFlags = PSH_PROPSHEETPAGE; psh.hwndParent = hwndOwner; - psh.hInstance = g_hInst; + psh.hInstance = g_xvid_hInst; psh.pszIcon = NULL; - psh.pszCaption = (LPSTR)"XviD Configuration"; + psh.pszCaption = TEXT("Xvid Configuration"); psh.nPages = sizeof (psp) / sizeof (PROPSHEETPAGE); - psh.ppsp = (LPCPROPSHEETPAGE) &psp; + psh.ppsp = psp; return PropertySheet (&psh); } +extern "C" void CALLBACK Configure(HWND hWndParent, HINSTANCE hInstParent, LPSTR lpCmdLine, int nCmdShow ); void CALLBACK Configure(HWND hWndParent, HINSTANCE hInstParent, LPSTR lpCmdLine, int nCmdShow ) { InitCommonControls(); LoadRegistryInfo(); adv_dialog( GetDesktopWindow() ); -} \ No newline at end of file +} + + +/* strmbase.lib\dllentry.obj:DllEntryPoint@12 */ +extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID); + + +extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, LPVOID lpvReserved); + +BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, LPVOID lpvReserved) +{ + g_xvid_hInst = hInst; + + /* Call directshow DllEntryPoint@12 */ + return DllEntryPoint(hInst, fdwReason, lpvReserved); +} +