#include "mmdrv.h"
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ CloseDevice()
Definition at line 239 of file common.c.
241{
244
245
247
249
251 {
252
253
255
257 }
258
260}
void CloseKernelDevice(HANDLE device_handle)
MMRESULT CallSessionThread(SessionInfo *session_info, ThreadFunction function, PVOID thread_parameter)
VOID DestroySession(SessionInfo *session)
HANDLE kernel_device_handle
◆ ErrorToMmResult()
Definition at line 22 of file common.c.
23{
25 {
29
32
36
39
42
45 };
46
47
48
50}
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_INVALID_FUNCTION
#define ERROR_NOT_SUPPORTED
#define ERROR_ACCESS_DENIED
#define MMSYSERR_NOTSUPPORTED
#define MMSYSERR_INVALPARAM
#define MMSYSERR_ALLOCATED
#define MMSYSERR_BADDEVICEID
Referenced by GetDeviceCapabilities(), GetDeviceData(), and OpenKernelDevice().
◆ GetDeviceCapabilities()
Definition at line 84 of file common.c.
89{
94 BOOL device_io_result;
95
97
98
99
106 else
108
110 device_id,
113
115 {
116 DPRINT(
"Failed to open kernel device\n");
118 }
119
123 0,
125 capabilities_size,
126 &bytes_returned,
128
129
130
131 if ( device_io_result )
133 else
135
136
137
139
141}
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
MMRESULT ErrorToMmResult(UINT error_code)
MMRESULT OpenKernelDevice(DeviceType device_type, UINT device_id, DWORD access, HANDLE *handle)
#define IOCTL_WAVE_GET_CAPABILITIES
#define IOCTL_MIDI_GET_CAPABILITIES
#define IsMidiDevice(devicetype)
#define IsWaveDevice(devicetype)
#define IsAuxDevice(devicetype)
DWORD WINAPI GetLastError(void)
◆ GetDeviceCount()
◆ OpenDevice()
Definition at line 153 of file common.c.
159{
163
164
166
168 {
169 DPRINT(
"Couldn't allocate session info\n");
171 }
172
174 device_id,
177
179 {
180 DPRINT(
"Failed to open kernel device\n");
183 }
184
185
186
188
189
190
192 {
197 }
198 else
199 {
200 DPRINT(
"Only wave devices are supported at present!\n");
203 }
204
205
206
208
210 {
213 }
214
215
216
218
219
220
225
227
229}
struct WAVEOPENDESC * LPWAVEOPENDESC
MMRESULT CreateSession(DeviceType device_type, UINT device_id, SessionInfo **session_info)
MMRESULT StartSessionThread(SessionInfo *session_info)
BOOL NotifyClient(SessionInfo *session_info, DWORD message, DWORD_PTR parameter1, DWORD_PTR parameter2)