--- trunk/xvidcore/dshow/src/Configure.cpp 2004/03/22 22:36:25 1382 +++ branches/release-1_3-branch/xvidcore/dshow/src/Configure.cpp 2010/12/27 16:39:33 1925 @@ -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: Configure.cpp,v 1.7 2010-10-16 12:20:30 Isibaar Exp $ * ****************************************************************************/ @@ -29,21 +29,18 @@ #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; @@ -53,20 +50,37 @@ 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 = (LPSTR)"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); +} +