[svn] / trunk / vfw / src / driverproc.c Repository:
ViewVC logotype

Diff of /trunk/vfw/src/driverproc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 30, Sat Mar 16 11:40:48 2002 UTC revision 499, Sat Sep 21 03:11:36 2002 UTC
# Line 23  Line 23 
23   *   *
24   *      History:   *      History:
25   *   *
26   *      ... ???   *      31.08.2002      Configure() export
27   *      01.12.2001      inital version; (c)2001 peter ross <suxen_drol@hotmail.com>   *      01.12.2001      inital version; (c)2001 peter ross <pross@xvid.org>
28   *   *
29   *************************************************************************/   *************************************************************************/
30    
# Line 36  Line 36 
36  #include "resource.h"  #include "resource.h"
37    
38    
39  BOOL APIENTRY DllMain(  BOOL WINAPI DllMain(
40          HANDLE hModule,          HANDLE hModule,
41          DWORD  ul_reason_for_call,          DWORD  ul_reason_for_call,
42          LPVOID lpReserved)          LPVOID lpReserved)
# Line 47  Line 47 
47    
48    
49    
50  __declspec(dllexport) LRESULT WINAPI DriverProc(  /* __declspec(dllexport) */ LRESULT WINAPI DriverProc(
51          DWORD dwDriverId,          DWORD dwDriverId,
52          HDRVR hDriver,          HDRVR hDriver,
53          UINT uMsg,          UINT uMsg,
# Line 63  Line 63 
63    
64          case DRV_LOAD :          case DRV_LOAD :
65          case DRV_FREE :          case DRV_FREE :
66                  DRV_OK;                  return DRV_OK;
67    
68          case DRV_OPEN :          case DRV_OPEN :
69                  DEBUG("DRV_OPEN");                  DEBUG("DRV_OPEN");
# Line 74  Line 74 
74                          {                          {
75                                  return DRV_CANCEL;                                  return DRV_CANCEL;
76                          }                          }
77    
78                          codec = malloc(sizeof(CODEC));                          codec = malloc(sizeof(CODEC));
79    
80                          if (codec == NULL)                          if (codec == NULL)
81                          {                          {
82                                  if (icopen != NULL)                                  if (icopen != NULL)
# Line 83  Line 85 
85                                  }                                  }
86                                  return 0;                                  return 0;
87                          }                          }
88    
89                          codec->ehandle = codec->dhandle = NULL;                          codec->ehandle = codec->dhandle = NULL;
90                          config_reg_get(&codec->config);                          config_reg_get(&codec->config);
91    
92                            /* bad things happen if this is uncommented
93                            if (lstrcmp(XVID_BUILD, codec->config.build))
94                            {
95                                    config_reg_default(&codec->config);
96                            }
97                            */
98    
99                          if (icopen != NULL)                          if (icopen != NULL)
100                          {                          {
101                                  icopen->dwError = ICERR_OK;                                  icopen->dwError = ICERR_OK;
# Line 136  Line 146 
146    
147                          return lParam2; /* size of struct */                          return lParam2; /* size of struct */
148                  }                  }
                 DEBUG("ICM_GETINFO end");  
   
149    
150                  /* state control */                  /* state control */
151    
# Line 266  Line 274 
274                  return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2);                  return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2);
275          }          }
276  }  }
277    
278    
279    void WINAPI Configure(HWND hwnd, HINSTANCE hinst, LPTSTR lpCmdLine, int nCmdShow)
280    {
281            DWORD dwDriverId;
282    
283            dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0);
284            if (dwDriverId != (DWORD)NULL)
285            {
286                    DriverProc(dwDriverId, 0, ICM_CONFIGURE, 0, 0);
287                    DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0);
288            }
289    }

Legend:
Removed from v.30  
changed lines
  Added in v.499

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4