23 |
* |
* |
24 |
* History: |
* History: |
25 |
* |
* |
26 |
* 01.12.2001 inital version; (c)2001 peter ross <suxen_drol@hotmail.com> |
* 31.08.2002 Configure() export |
27 |
|
* 01.12.2001 inital version; (c)2001 peter ross <pross@xvid.org> |
28 |
* |
* |
29 |
*************************************************************************/ |
*************************************************************************/ |
30 |
|
|
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) |
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, |
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"); |
87 |
} |
} |
88 |
|
|
89 |
codec->ehandle = codec->dhandle = NULL; |
codec->ehandle = codec->dhandle = NULL; |
90 |
|
codec->fbase = 25; |
91 |
|
codec->fincr = 1; |
92 |
config_reg_get(&codec->config); |
config_reg_get(&codec->config); |
93 |
|
|
94 |
/* bad things happen if this is uncommented |
/* bad things happen if this is uncommented |
148 |
|
|
149 |
return lParam2; /* size of struct */ |
return lParam2; /* size of struct */ |
150 |
} |
} |
|
DEBUG("ICM_GETINFO end"); |
|
|
|
|
151 |
|
|
152 |
/* state control */ |
/* state control */ |
153 |
|
|
276 |
return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2); |
return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2); |
277 |
} |
} |
278 |
} |
} |
279 |
|
|
280 |
|
|
281 |
|
void WINAPI Configure(HWND hwnd, HINSTANCE hinst, LPTSTR lpCmdLine, int nCmdShow) |
282 |
|
{ |
283 |
|
DWORD dwDriverId; |
284 |
|
|
285 |
|
dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0); |
286 |
|
if (dwDriverId != (DWORD)NULL) |
287 |
|
{ |
288 |
|
DriverProc(dwDriverId, 0, ICM_CONFIGURE, 0, 0); |
289 |
|
DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); |
290 |
|
} |
291 |
|
} |