--- trunk/xvidcore/vfw/src/driverproc.c 2004/07/15 11:53:46 1495 +++ trunk/xvidcore/vfw/src/driverproc.c 2008/11/30 17:57:14 1830 @@ -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: driverproc.c,v 1.6 2004-07-15 11:53:46 suxen_drol Exp $ + * $Id: driverproc.c,v 1.10 2008-11-30 17:56:07 Isibaar Exp $ * ****************************************************************************/ @@ -35,17 +35,17 @@ static int clean_dll_bindings(CODEC* codec); -BOOL WINAPI DllMain( - HANDLE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved) +INT_PTR WINAPI DllMain( + HANDLE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved) { g_hInst = (HINSTANCE) hModule; return TRUE; } /* __declspec(dllexport) */ LRESULT WINAPI DriverProc( - DWORD dwDriverId, + DWORD_PTR dwDriverId, HDRVR hDriver, UINT uMsg, LPARAM lParam1, @@ -147,6 +147,9 @@ VIDCF_COMPRESSFRAMES; icinfo->dwVersion = 0; +#if !defined(ICVERSION) +#define ICVERSION 0x0104 +#endif icinfo->dwVersionICM = ICVERSION; wcscpy(icinfo->szName, XVID_NAME_L); @@ -307,10 +310,14 @@ { DWORD dwDriverId; - dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0); - if (dwDriverId != (DWORD)NULL) + dwDriverId = (LRESULT) DriverProc(0, 0, DRV_OPEN, 0, 0); + if (dwDriverId != (LRESULT)NULL) { - DriverProc(dwDriverId, 0, ICM_CONFIGURE, (LPARAM)GetDesktopWindow(), 0); + if (lstrcmpi(lpCmdLine, "about")==0) { + DriverProc(dwDriverId, 0, ICM_ABOUT, (LPARAM)GetDesktopWindow(), 0); + }else{ + DriverProc(dwDriverId, 0, ICM_CONFIGURE, (LPARAM)GetDesktopWindow(), 0); + } DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); } }