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