1 | /* $Id: driver.cpp,v 1.1 1999-05-24 20:20:06 ktk Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Driver multimedia apis
|
---|
5 | *
|
---|
6 | * Copyright 1998 Patrick Haller
|
---|
7 | *
|
---|
8 | *
|
---|
9 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
10 | *
|
---|
11 | */
|
---|
12 | #include <os2win.h>
|
---|
13 | #include <mmsystem.h>
|
---|
14 |
|
---|
15 | #include <string.h>
|
---|
16 | #include <misc.h>
|
---|
17 | #include <unicode.h>
|
---|
18 |
|
---|
19 | #include "winmm.h"
|
---|
20 | #include "os2timer.h"
|
---|
21 |
|
---|
22 |
|
---|
23 | /*****************************************************************************
|
---|
24 | * Name : LRESULT WIN32API SendDriverMessage
|
---|
25 | * Purpose : Sends the specified message to the installable driver
|
---|
26 | * Parameters: HDRVR hDrvr
|
---|
27 | * UINT msg
|
---|
28 | * LONG lParam1
|
---|
29 | * LONG lParam2
|
---|
30 | * Variables :
|
---|
31 | * Result : API returncode
|
---|
32 | * Remark :
|
---|
33 | * Status :
|
---|
34 | *
|
---|
35 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
---|
36 | *****************************************************************************/
|
---|
37 |
|
---|
38 | LRESULT WIN32API SendDriverMessage(HDRVR hdrvr,
|
---|
39 | UINT msg,
|
---|
40 | LONG lParam1,
|
---|
41 | LONG lParam2)
|
---|
42 | {
|
---|
43 | dprintf(("WINMM: SendDriverMessage(%08x,%08x,%08x,%08x) not implemented.\n",
|
---|
44 | hdrvr,
|
---|
45 | msg,
|
---|
46 | lParam1,
|
---|
47 | lParam2));
|
---|
48 |
|
---|
49 | return 0; /* unsuccessful return */
|
---|
50 | }
|
---|
51 |
|
---|
52 |
|
---|
53 | /*****************************************************************************
|
---|
54 | * Name : HDRVR WIN32API OpenDriver
|
---|
55 | * Purpose : Opens an instance of an installable driver and initializes
|
---|
56 | * the instance using either the driver's default settings or a
|
---|
57 | * driver-specific value.
|
---|
58 | * Parameters: LPCWSTR lpDriverName
|
---|
59 | * LPCWSTR lpSectionName
|
---|
60 | * LONG lParam
|
---|
61 | * Variables :
|
---|
62 | * Result : API returncode
|
---|
63 | * Remark :
|
---|
64 | * Status :
|
---|
65 | *
|
---|
66 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
---|
67 | *****************************************************************************/
|
---|
68 |
|
---|
69 | HDRVR WIN32API OpenDriver(LPCWSTR lpDriverName,
|
---|
70 | LPCWSTR lpSectionName,
|
---|
71 | LONG lParam)
|
---|
72 | {
|
---|
73 | dprintf(("WINMM: OpenDriver(%s,%s,%08x) not implemented.\n",
|
---|
74 | lpDriverName,
|
---|
75 | lpSectionName,
|
---|
76 | lParam));
|
---|
77 |
|
---|
78 | return 0; /* unsuccessful return */
|
---|
79 | }
|
---|
80 |
|
---|
81 |
|
---|
82 | /*****************************************************************************
|
---|
83 | * Name : HDRVR WIN32API OpenDriverA
|
---|
84 | * Purpose : Opens an instance of an installable driver and initializes
|
---|
85 | * the instance using either the driver's default settings or a
|
---|
86 | * driver-specific value.
|
---|
87 | * Parameters: LPCTSTR lpDriverName
|
---|
88 | * LPCTSTR lpSectionName
|
---|
89 | * LONG lParam
|
---|
90 | * Variables :
|
---|
91 | * Result : API returncode
|
---|
92 | * Remark :
|
---|
93 | * Status :
|
---|
94 | *
|
---|
95 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
---|
96 | *****************************************************************************/
|
---|
97 |
|
---|
98 | HDRVR WIN32API OpenDriverA(LPTSTR lpDriverName,
|
---|
99 | LPTSTR lpSectionName,
|
---|
100 | LONG lParam)
|
---|
101 | {
|
---|
102 | dprintf(("WINMM: OpenDriverA(%s,%s,%08x) not implemented.\n",
|
---|
103 | lpDriverName,
|
---|
104 | lpSectionName,
|
---|
105 | lParam));
|
---|
106 |
|
---|
107 | return 0; /* unsuccessful return */
|
---|
108 | }
|
---|
109 |
|
---|
110 |
|
---|
111 |
|
---|
112 | /*****************************************************************************
|
---|
113 | * Name : HDRVR WIN32API CloseDriver
|
---|
114 | * Purpose : Closes an installable driver.
|
---|
115 | * Parameters: HDRVR hDrvr
|
---|
116 | * LONG lParam1
|
---|
117 | * LONG lParam2
|
---|
118 | * Variables :
|
---|
119 | * Result :
|
---|
120 | * Remark :
|
---|
121 | * Status :
|
---|
122 | *
|
---|
123 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
---|
124 | *****************************************************************************/
|
---|
125 |
|
---|
126 | LRESULT WIN32API CloseDriver(HDRVR hDrvr,
|
---|
127 | LONG lParam1,
|
---|
128 | LONG lParam2)
|
---|
129 | {
|
---|
130 | dprintf(("WINMM: CloseDriver(%08x,%08x,%08x) not implemented.\n",
|
---|
131 | hDrvr,
|
---|
132 | lParam1,
|
---|
133 | lParam2));
|
---|
134 |
|
---|
135 | return 0; /* unsuccessful return */
|
---|
136 | }
|
---|
137 |
|
---|
138 |
|
---|
139 | /*****************************************************************************
|
---|
140 | * Name : LRESULT WIN32API DefDriverProc
|
---|
141 | * Purpose : Provides default processing for any messages not processed by
|
---|
142 | * an installable driver.
|
---|
143 | * Parameters: DWORD dwDriverID
|
---|
144 | * HDRVR hDrvr
|
---|
145 | * UINT msg
|
---|
146 | * LONG lParam1
|
---|
147 | * LONG lParam2
|
---|
148 | * Variables :
|
---|
149 | * Result :
|
---|
150 | * Remark :
|
---|
151 | * Status :
|
---|
152 | *
|
---|
153 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
---|
154 | *****************************************************************************/
|
---|
155 |
|
---|
156 | LRESULT WIN32API DefDriverProc(DWORD dwDriverID,
|
---|
157 | HDRVR hDrvr,
|
---|
158 | UINT msg,
|
---|
159 | LONG lParam1,
|
---|
160 | LONG lParam2)
|
---|
161 | {
|
---|
162 | dprintf(("WINMM: DefDriverProc(%08x,%08x,%08x,%08x,%08x) not implemented.\n",
|
---|
163 | dwDriverID,
|
---|
164 | hDrvr,
|
---|
165 | msg,
|
---|
166 | lParam1,
|
---|
167 | lParam2));
|
---|
168 |
|
---|
169 | return 0; /* unsuccessful return */
|
---|
170 | }
|
---|
171 |
|
---|
172 |
|
---|
173 | /*****************************************************************************
|
---|
174 | * Name : LRESULT WIN32API DriverCallback
|
---|
175 | * Purpose : Calls a callback function, sends a message to a window, or
|
---|
176 | * unblocks a thread.
|
---|
177 | * Parameters: DWORD dwCallback
|
---|
178 | * DWORD dwFlags
|
---|
179 | * HDRVR hDrvr
|
---|
180 | * DWORD msg
|
---|
181 | * DWORD dwUser
|
---|
182 | * DWORD dwParam1
|
---|
183 | * DWORD dwParam2
|
---|
184 | * Variables :
|
---|
185 | * Result :
|
---|
186 | * Remark :
|
---|
187 | * Status :
|
---|
188 | *
|
---|
189 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
---|
190 | *****************************************************************************/
|
---|
191 |
|
---|
192 | LRESULT WIN32API DriverCallback(DWORD dwCallback,
|
---|
193 | DWORD dwFlags,
|
---|
194 | HDRVR hDrvr,
|
---|
195 | DWORD msg,
|
---|
196 | DWORD dwUser,
|
---|
197 | DWORD dwParam1,
|
---|
198 | DWORD dwParam2)
|
---|
199 | {
|
---|
200 | dprintf(("WINMM: DriverCallback(%08x,%08x,%08x,%08x,%08x,%08x,%08x) not implemented.\n",
|
---|
201 | dwCallback,
|
---|
202 | dwFlags,
|
---|
203 | hDrvr,
|
---|
204 | msg,
|
---|
205 | dwUser,
|
---|
206 | dwParam1,
|
---|
207 | dwParam2));
|
---|
208 |
|
---|
209 | return FALSE; /* unsuccessful return */
|
---|
210 | }
|
---|
211 |
|
---|
212 |
|
---|
213 | /*****************************************************************************
|
---|
214 | * Name : HMODULE WIN32API DrvGetModuleHandle
|
---|
215 | * Purpose : Retrieves the instance handle of the module that contains the
|
---|
216 | * installable driver.
|
---|
217 | * Parameters: HDRVR hDriver
|
---|
218 | * Variables :
|
---|
219 | * Result :
|
---|
220 | * Remark :
|
---|
221 | * Status :
|
---|
222 | *
|
---|
223 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
---|
224 | *****************************************************************************/
|
---|
225 |
|
---|
226 | HMODULE WIN32API DrvGetModuleHandle(HDRVR hDriver)
|
---|
227 | {
|
---|
228 | dprintf(("WINMM: DrvGetModuleHandle(%08x) not implemented.\n",
|
---|
229 | hDriver));
|
---|
230 |
|
---|
231 | return 0; /* unsuccessful return */
|
---|
232 | }
|
---|
233 |
|
---|
234 |
|
---|
235 | /*****************************************************************************
|
---|
236 | * Name : LRESULT WIN32API DrvSendMessage
|
---|
237 | * Purpose : Sends the specified message to the installable driver
|
---|
238 | * Parameters: HDRVR hDrvr
|
---|
239 | * UINT msg
|
---|
240 | * LONG lParam1
|
---|
241 | * LONG lParam2
|
---|
242 | * Variables :
|
---|
243 | * Result : API returncode
|
---|
244 | * Remark : Ehm, what's the difference to SendDriverMessage() ?
|
---|
245 | * Status :
|
---|
246 | *
|
---|
247 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
---|
248 | *****************************************************************************/
|
---|
249 |
|
---|
250 | LRESULT WIN32API DrvSendMessage(HDRVR hdrvr,
|
---|
251 | UINT msg,
|
---|
252 | LONG lParam1,
|
---|
253 | LONG lParam2)
|
---|
254 | {
|
---|
255 | dprintf(("WINMM: DrvSendMessage(%08x,%08x,%08x,%08x) not implemented.\n",
|
---|
256 | hdrvr,
|
---|
257 | msg,
|
---|
258 | lParam1,
|
---|
259 | lParam2));
|
---|
260 |
|
---|
261 | return 0; /* unsuccessful return */
|
---|
262 | }
|
---|
263 |
|
---|
264 |
|
---|
265 | /*****************************************************************************
|
---|
266 | * Name : HMODULE WIN32API GetDriverModuleHandle
|
---|
267 | * Purpose : Retrieves the instance handle of the module that contains the
|
---|
268 | * installable driver.
|
---|
269 | * Parameters: HDRVR hDriver
|
---|
270 | * Variables :
|
---|
271 | * Result :
|
---|
272 | * Remark : What's the difference to DrvGetModuleHandle() ?
|
---|
273 | * Status :
|
---|
274 | *
|
---|
275 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
---|
276 | *****************************************************************************/
|
---|
277 |
|
---|
278 | HMODULE WIN32API GetDriverModuleHandle(HDRVR hDriver)
|
---|
279 | {
|
---|
280 | dprintf(("WINMM: GetDriverModuleHandle(%08x) not implemented.\n",
|
---|
281 | hDriver));
|
---|
282 |
|
---|
283 | return 0; /* unsuccessful return */
|
---|
284 | }
|
---|