annotate loader/driver.c @ 1036:537875fdcf16

*** empty log message ***
author gabucino
date Tue, 05 Jun 2001 16:15:39 +0000
parents 1f7c824033fb
children d8c1b0b38edc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 #include <config.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 #include <stdio.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 #ifdef HAVE_MALLOC_H
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 #include <malloc.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 #else
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 #include <stdlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 #include <wine/driver.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 #include <wine/pe_image.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 #include <wine/winreg.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 #include <wine/vfw.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 #include <registry.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15
185
b2dfe79ffb9f disabled DirectShow loader - use libDS_Filter instead
arpi_esp
parents: 128
diff changeset
16 //#include "com.h"
b2dfe79ffb9f disabled DirectShow loader - use libDS_Filter instead
arpi_esp
parents: 128
diff changeset
17 //typedef long STDCALL (*GETCLASS) (GUID*, GUID*, void**);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 #ifdef __FreeBSD__
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 #include <sys/time.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 #define STORE_ALL \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 __asm__ ( \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 "push %%ebx\n\t" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 "push %%ecx\n\t" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 "push %%edx\n\t" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 "push %%esi\n\t" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 "push %%edi\n\t"::)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 #define REST_ALL \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 __asm__ ( \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 "pop %%edi\n\t" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 "pop %%esi\n\t" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 "pop %%edx\n\t" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 "pop %%ecx\n\t" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 "pop %%ebx\n\t"::)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 typedef struct {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 UINT uDriverSignature;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 HINSTANCE hDriverModule;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 DRIVERPROC DriverProc;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 DWORD dwDriverID;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 } DRVR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 typedef DRVR *PDRVR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 typedef DRVR *NPDRVR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 typedef DRVR *LPDRVR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 static DWORD dwDrvID = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 LRESULT WINAPI SendDriverMessage( HDRVR hDriver, UINT message,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 LPARAM lParam1, LPARAM lParam2 )
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 DRVR* module=(DRVR*)hDriver;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 int result;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 #ifdef DETAILED_OUT
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 printf("SendDriverMessage: driver %X, message %X, arg1 %X, arg2 %X\n", hDriver, message, lParam1, lParam2);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 if(module==0)return -1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 if(module->hDriverModule==0)return -1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 if(module->DriverProc==0)return -1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 STORE_ALL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 result=module->DriverProc(module->dwDriverID,1,message,lParam1,lParam2);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 REST_ALL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 #ifdef DETAILED_OUT
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 printf("\t\tResult: %X\n", result);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 return result;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 static NPDRVR DrvAlloc(HDRVR*lpDriver, LPUINT lpDrvResult)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 NPDRVR npDriver;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 /* allocate and lock handle */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 if (lpDriver)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 if ( (*lpDriver = (HDRVR) malloc(sizeof(DRVR))) )
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 if ((npDriver = (NPDRVR) *lpDriver))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 *lpDrvResult = MMSYSERR_NOERROR;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 return (npDriver);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 free((NPDRVR)*lpDriver);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92 return (*lpDrvResult = MMSYSERR_NOMEM, (NPDRVR) 0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 return (*lpDrvResult = MMSYSERR_INVALPARAM, (NPDRVR) 0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98 static void DrvFree(HDRVR hDriver)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
100 int i;
236
a2c9731b2e01 Setup_FS_Segment() for VoxWare audio
arpi_esp
parents: 185
diff changeset
101 setup_FS_Segment();
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 if(hDriver)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103 if(((DRVR*)hDriver)->hDriverModule)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
104 if(((DRVR*)hDriver)->DriverProc)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
105 (((DRVR*)hDriver)->DriverProc)(((DRVR*)hDriver)->dwDriverID, hDriver, DRV_CLOSE, 0, 0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106 if(hDriver) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107 if(((DRVR*)hDriver)->hDriverModule)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 if(((DRVR*)hDriver)->DriverProc)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109 (((DRVR*)hDriver)->DriverProc)(0, hDriver, DRV_FREE, 0, 0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110 FreeLibrary(((DRVR*)hDriver)->hDriverModule);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111 free((NPDRVR)hDriver);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112 return;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116 void DrvClose(HDRVR hdrvr)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
117 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118 DrvFree(hdrvr);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
119 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
120
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
121
128
28091b3caff9 DLL loader updated from avifile-0.60beta4
arpi_esp
parents: 1
diff changeset
122 extern char* def_path; //=WIN32_PATH; // path to codecs
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
123 char* win32_codec_name=NULL; // must be set before calling DrvOpen() !!!
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
124
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
125 HDRVR
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
126 DrvOpen(LPARAM lParam2)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
127 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
128 ICOPEN *icopen=(ICOPEN *) lParam2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129 UINT uDrvResult;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 HDRVR hDriver;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131 NPDRVR npDriver;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
132 char unknown[0x24];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
133 // char* codec_name=icopen->fccHandler;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
134
236
a2c9731b2e01 Setup_FS_Segment() for VoxWare audio
arpi_esp
parents: 185
diff changeset
135 Setup_LDT_Keeper();
a2c9731b2e01 Setup_FS_Segment() for VoxWare audio
arpi_esp
parents: 185
diff changeset
136
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
137 if (!(npDriver = DrvAlloc(&hDriver, &uDrvResult)))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
138 return ((HDRVR) 0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
139
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
140 if (!(npDriver->hDriverModule = expLoadLibraryA(win32_codec_name))) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
141 printf("Can't open library %s\n", win32_codec_name);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142 DrvFree(hDriver);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
143 return ((HDRVR) 0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
144 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
145
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
146 #if 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
147 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
148 unsigned char *p=((char*)npDriver->hDriverModule);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149 double *dp;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
150 int i;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
151 p+=0x14c0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
152 for(i=0;i<16;i++)printf(" %02X",p[i]); printf("\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
153 dp=(double*)p;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
154 printf("divx bitrate = %f\n",(float)(*dp));
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
155 // *(double*)((char*)npDriver->hDriverModule+0x14c0)=bitrate;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159 if (!(npDriver->DriverProc = (DRIVERPROC)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
160 GetProcAddress(npDriver->hDriverModule, "DriverProc"))) {
185
b2dfe79ffb9f disabled DirectShow loader - use libDS_Filter instead
arpi_esp
parents: 128
diff changeset
161 #if 1
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
162 printf("Library %s is not a VfW/ACM valid codec\n", win32_codec_name);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163 #else
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
164 // Try DirectShow...
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
165 GETCLASS func=(GETCLASS)GetProcAddress(npDriver->hDriverModule,"DllGetClassObject");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166 if(!func)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
167 printf("Library %s is not a valid VfW/ACM/DShow codec\n", win32_codec_name);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
168 else {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
169 HRESULT result;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170 struct IClassFactory* factory=0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171 struct IUnknown* object=0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172 GUID CLSID_Voxware={0x73f7a062, 0x8829, 0x11d1,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
173 {0xb5, 0x50, 0x00, 0x60, 0x97, 0x24, 0x2d, 0x8d}};
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174 GUID* id=&CLSID_Voxware;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
176 result=func(id, &IID_IClassFactory, (void**)&factory);
340
1f7c824033fb less, and more informal printfs
arpi_esp
parents: 236
diff changeset
177 if(result || (!factory)) printf("No such class object (wrong/missing GUID?)\n");
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
178
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
179 printf("Calling factory->vt->CreateInstance()\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
180 printf("addr = %X\n",(unsigned int)factory->vt->CreateInstance);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
181 result=factory->vt->CreateInstance(factory, 0, &IID_IUnknown, (void**)&object);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
182 printf("Calling factory->vt->Release()\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
183 factory->vt->Release((struct IUnknown*)factory);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
184 if(result || (!object)) printf("Class factory failure\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
185
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
186 printf("DirectShow codecs not yet supported...\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
187 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
189
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
190 FreeLibrary(npDriver->hDriverModule);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
191 DrvFree(hDriver);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
192 return ((HDRVR) 0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
194 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
195
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
196 //TRACE("DriverProc == %X\n", npDriver->DriverProc);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197 npDriver->dwDriverID = ++dwDrvID;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
198
236
a2c9731b2e01 Setup_FS_Segment() for VoxWare audio
arpi_esp
parents: 185
diff changeset
199 setup_FS_Segment();
a2c9731b2e01 Setup_FS_Segment() for VoxWare audio
arpi_esp
parents: 185
diff changeset
200
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
201 STORE_ALL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
202 (npDriver->DriverProc)(0, hDriver, DRV_LOAD, 0, 0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
203 REST_ALL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
204 //TRACE("DRV_LOAD Ok!\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
205 STORE_ALL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
206 (npDriver->DriverProc)(0, hDriver, DRV_ENABLE, 0, 0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
207 REST_ALL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
208 //TRACE("DRV_ENABLE Ok!\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
210 // open driver
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
211 STORE_ALL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
212 npDriver->dwDriverID=(npDriver->DriverProc)(npDriver->dwDriverID, hDriver, DRV_OPEN,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
213 (LPARAM) (LPSTR) unknown, lParam2);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
214 REST_ALL;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
215
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
216 //TRACE("DRV_OPEN Ok!(%X)\n", npDriver->dwDriverID);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
217
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
218 if (uDrvResult)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
219 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
220 DrvFree(hDriver);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
221 hDriver = (HDRVR) 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
222 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
223
340
1f7c824033fb less, and more informal printfs
arpi_esp
parents: 236
diff changeset
224 // printf("Successfully loaded codec %s\n",win32_codec_name);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
225
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
226 return (hDriver);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
227 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
228