--- trunk/xvidcore/vfw/src/driverproc.c 2004/05/26 05:23:03 1453 +++ branches/release-1_2-branch/xvidcore/vfw/src/driverproc.c 2008/11/28 16:54:45 1820 @@ -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.5 2004-05-26 05:23:03 syskin Exp $ + * $Id: driverproc.c,v 1.8 2005-09-09 11:34:51 suxen_drol Exp $ * ****************************************************************************/ @@ -60,7 +60,7 @@ case DRV_LOAD : case DRV_FREE : - return DRV_OK; + return DRVCNF_OK; case DRV_OPEN : DPRINTF("DRV_OPEN"); @@ -70,7 +70,7 @@ if (icopen != NULL && icopen->fccType != ICTYPE_VIDEO) { - return DRV_CANCEL; + return DRVCNF_CANCEL; } codec = malloc(sizeof(CODEC)); @@ -116,26 +116,27 @@ clean_dll_bindings(codec); status_destroy_always(&codec->status); free(codec); - return DRV_OK; + return DRVCNF_OK; case DRV_DISABLE : case DRV_ENABLE : - return DRV_OK; + return DRVCNF_OK; case DRV_INSTALL : case DRV_REMOVE : - return DRV_OK; + return DRVCNF_OK; case DRV_QUERYCONFIGURE : case DRV_CONFIGURE : - return DRV_CANCEL; + return DRVCNF_CANCEL; /* info */ case ICM_GETINFO : DPRINTF("ICM_GETINFO"); - { + + if (lParam1 && lParam2 >= sizeof(ICINFO)) { ICINFO *icinfo = (ICINFO *)lParam1; icinfo->fccType = ICTYPE_VIDEO; @@ -146,6 +147,9 @@ VIDCF_COMPRESSFRAMES; icinfo->dwVersion = 0; +#if !defined(ICVERSION) +#define ICVERSION 0x0104 +#endif icinfo->dwVersionICM = ICVERSION; wcscpy(icinfo->szName, XVID_NAME_L); @@ -153,6 +157,8 @@ return lParam2; /* size of struct */ } + + return 0; /* error */ /* state control */ @@ -307,7 +313,11 @@ dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0); if (dwDriverId != (DWORD)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); } }