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