ReactOS  0.4.13-dev-1148-g9b75b67
driver.c File Reference
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "mmsystem.h"
#include "mmreg.h"
#include "msacm.h"
#include "msacmdrv.h"
#include "wineacm.h"
#include "wine/debug.h"
#include "wine/unicode.h"
Include dependency graph for driver.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msacm)
 
MMRESULT WINAPI acmDriverAddA (PHACMDRIVERID phadid, HINSTANCE hinstModule, LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
 
MMRESULT WINAPI acmDriverAddW (PHACMDRIVERID phadid, HINSTANCE hinstModule, LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
 
MMRESULT WINAPI acmDriverClose (HACMDRIVER had, DWORD fdwClose)
 
MMRESULT WINAPI acmDriverDetailsA (HACMDRIVERID hadid, PACMDRIVERDETAILSA padd, DWORD fdwDetails)
 
MMRESULT WINAPI acmDriverDetailsW (HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails)
 
MMRESULT WINAPI acmDriverEnum (ACMDRIVERENUMCB fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmDriverID (HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
 
LRESULT WINAPI acmDriverMessage (HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
MMRESULT WINAPI acmDriverOpen (PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
 
MMRESULT WINAPI acmDriverPriority (HACMDRIVERID hadid, DWORD dwPriority, DWORD fdwPriority)
 
MMRESULT WINAPI acmDriverRemove (HACMDRIVERID hadid, DWORD fdwRemove)
 

Function Documentation

◆ acmDriverAddA()

MMRESULT WINAPI acmDriverAddA ( PHACMDRIVERID  phadid,
HINSTANCE  hinstModule,
LPARAM  lParam,
DWORD  dwPriority,
DWORD  fdwAdd 
)

Definition at line 48 of file driver.c.

50 {
51  MMRESULT resultW;
52  WCHAR * driverW = NULL;
53  LPARAM lParamW = lParam;
54 
55  TRACE("(%p, %p, %08lx, %08x, %08x)\n",
56  phadid, hinstModule, lParam, dwPriority, fdwAdd);
57 
58  if (!phadid) {
59  WARN("invalid parameter\n");
60  return MMSYSERR_INVALPARAM;
61  }
62 
63  /* Check if any unknown flags */
64  if (fdwAdd &
67  WARN("invalid flag\n");
68  return MMSYSERR_INVALFLAG;
69  }
70 
71  /* Check if any incompatible flags */
72  if ((fdwAdd & ACM_DRIVERADDF_FUNCTION) &&
73  (fdwAdd & ACM_DRIVERADDF_NOTIFYHWND)) {
74  WARN("invalid flag\n");
75  return MMSYSERR_INVALFLAG;
76  }
77 
78  /* A->W translation of name */
79  if ((fdwAdd & ACM_DRIVERADDF_TYPEMASK) == ACM_DRIVERADDF_NAME) {
80  INT len;
81 
82  if (lParam == 0) return MMSYSERR_INVALPARAM;
84  driverW = HeapAlloc(MSACM_hHeap, 0, len * sizeof(WCHAR));
85  if (!driverW) return MMSYSERR_NOMEM;
86  MultiByteToWideChar(CP_ACP, 0, (LPSTR)lParam, -1, driverW, len);
87  lParamW = (LPARAM)driverW;
88  }
89 
90  resultW = acmDriverAddW(phadid, hinstModule, lParamW, dwPriority, fdwAdd);
91  HeapFree(MSACM_hHeap, 0, driverW);
92  return resultW;
93 }
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
#define ACM_DRIVERADDF_GLOBAL
Definition: msacm.h:50
UINT MMRESULT
Definition: mmsystem.h:962
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:56
#define MMSYSERR_NOMEM
Definition: mmsystem.h:103
HANDLE MSACM_hHeap
Definition: internal.c:45
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define ACM_DRIVERADDF_NOTIFYHWND
Definition: msacm.h:47
#define TRACE(s)
Definition: solgame.cpp:4
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
GLenum GLsizei len
Definition: glext.h:6722
#define ACM_DRIVERADDF_TYPEMASK
Definition: msacm.h:48
#define ACM_DRIVERADDF_FUNCTION
Definition: msacm.h:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define MultiByteToWideChar
Definition: compat.h:100
#define ACM_DRIVERADDF_NAME
Definition: msacm.h:45
MMRESULT WINAPI acmDriverAddW(PHACMDRIVERID phadid, HINSTANCE hinstModule, LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
Definition: driver.c:99
LPARAM lParam
Definition: combotst.c:139
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by test_acmDriverAdd().

◆ acmDriverAddW()

MMRESULT WINAPI acmDriverAddW ( PHACMDRIVERID  phadid,
HINSTANCE  hinstModule,
LPARAM  lParam,
DWORD  dwPriority,
DWORD  fdwAdd 
)

Definition at line 99 of file driver.c.

101 {
102  PWINE_ACMLOCALDRIVER pLocalDrv = NULL;
103 
104  TRACE("(%p, %p, %08lx, %08x, %08x)\n",
105  phadid, hinstModule, lParam, dwPriority, fdwAdd);
106 
107  if (!phadid) {
108  WARN("invalid parameter\n");
109  return MMSYSERR_INVALPARAM;
110  }
111 
112  /* Check if any unknown flags */
113  if (fdwAdd &
116  WARN("invalid flag\n");
117  return MMSYSERR_INVALFLAG;
118  }
119 
120  /* Check if any incompatible flags */
121  if ((fdwAdd & ACM_DRIVERADDF_FUNCTION) &&
122  (fdwAdd & ACM_DRIVERADDF_NOTIFYHWND)) {
123  WARN("invalid flag\n");
124  return MMSYSERR_INVALFLAG;
125  }
126 
127  switch (fdwAdd & ACM_DRIVERADDF_TYPEMASK) {
128  case ACM_DRIVERADDF_NAME:
129  /*
130  hInstModule (unused)
131  lParam name of value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
132  dwPriority (unused, set to 0)
133  */
134  *phadid = (HACMDRIVERID) MSACM_RegisterDriverFromRegistry((LPCWSTR)lParam);
135  if (!*phadid) {
136  ERR("Unable to register driver via ACM_DRIVERADDF_NAME\n");
137  return MMSYSERR_INVALPARAM;
138  }
139  break;
141  /*
142  hInstModule Handle of module which contains driver entry proc
143  lParam Driver function address
144  dwPriority (unused, set to 0)
145  */
146  fdwAdd &= ~ACM_DRIVERADDF_TYPEMASK;
147  /* FIXME: fdwAdd ignored */
148  /* Application-supplied acmDriverProc's are placed at the top of the priority unless
149  fdwAdd indicates ACM_DRIVERADDF_GLOBAL
150  */
151  pLocalDrv = MSACM_RegisterLocalDriver(hinstModule, (DRIVERPROC)lParam);
152  *phadid = pLocalDrv ? (HACMDRIVERID) MSACM_RegisterDriver(NULL, NULL, pLocalDrv) : NULL;
153  if (!*phadid) {
154  ERR("Unable to register driver via ACM_DRIVERADDF_FUNCTION\n");
155  return MMSYSERR_INVALPARAM;
156  }
157  break;
159  /*
160  hInstModule (unused)
161  lParam Handle of notification window
162  dwPriority Window message to send for notification broadcasts
163  */
164  *phadid = (HACMDRIVERID) MSACM_RegisterNotificationWindow((HWND)lParam, dwPriority);
165  if (!*phadid) {
166  ERR("Unable to register driver via ACM_DRIVERADDF_NOTIFYHWND\n");
167  return MMSYSERR_INVALPARAM;
168  }
169  break;
170  default:
171  ERR("invalid flag value 0x%08x for fdwAdd\n", fdwAdd);
172  return MMSYSERR_INVALFLAG;
173  }
174 
176  return MMSYSERR_NOERROR;
177 }
LRESULT(CALLBACK * DRIVERPROC)(DWORD_PTR, HDRVR, UINT, LPARAM, LPARAM)
Definition: mmsystem.h:1001
PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc)
Definition: internal.c:876
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define WARN(fmt,...)
Definition: debug.h:111
#define ACM_DRIVERADDF_GLOBAL
Definition: msacm.h:50
smooth NULL
Definition: ftsmooth.c:416
#define ACM_DRIVERADDF_NOTIFYHWND
Definition: msacm.h:47
void MSACM_BroadcastNotification(void)
Definition: internal.c:441
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName, PWINE_ACMLOCALDRIVER pLocalDriver)
Definition: internal.c:283
#define ACM_DRIVERADDF_TYPEMASK
Definition: msacm.h:48
#define ERR(fmt,...)
Definition: debug.h:109
#define ACM_DRIVERADDF_FUNCTION
Definition: msacm.h:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg)
Definition: internal.c:414
#define ACM_DRIVERADDF_NAME
Definition: msacm.h:45
LPARAM lParam
Definition: combotst.c:139
PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry)
Definition: internal.c:59

Referenced by acmDriverAddA().

◆ acmDriverClose()

MMRESULT WINAPI acmDriverClose ( HACMDRIVER  had,
DWORD  fdwClose 
)

Definition at line 182 of file driver.c.

183 {
185  PWINE_ACMDRIVERID padid;
186  PWINE_ACMDRIVER* tpad;
187 
188  TRACE("(%p, %08x)\n", had, fdwClose);
189 
190  if (fdwClose) {
191  WARN("invalid flag\n");
192  return MMSYSERR_INVALFLAG;
193  }
194 
195  pad = MSACM_GetDriver(had);
196  if (!pad) {
197  WARN("invalid handle\n");
198  return MMSYSERR_INVALHANDLE;
199  }
200 
201  padid = pad->obj.pACMDriverID;
202 
203  /* remove driver from list */
204  for (tpad = &(padid->pACMDriverList); *tpad; tpad = &((*tpad)->pNextACMDriver)) {
205  if (*tpad == pad) {
206  *tpad = (*tpad)->pNextACMDriver;
207  break;
208  }
209  }
210 
211  /* close driver if it has been opened */
212  if (pad->hDrvr && !pad->pLocalDrvrInst)
213  CloseDriver(pad->hDrvr, 0, 0);
214  else if (pad->pLocalDrvrInst)
215  MSACM_CloseLocalDriver(pad->pLocalDrvrInst);
216 
217  pad->obj.dwType = 0;
218  HeapFree(MSACM_hHeap, 0, pad);
219 
220  return MMSYSERR_NOERROR;
221 }
#define WARN(fmt,...)
Definition: debug.h:111
LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
Definition: driver.c:462
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
HANDLE MSACM_hHeap
Definition: internal.c:45
static void pad(Char *s)
Definition: bzip2.c:908
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
PWINE_ACMDRIVER pACMDriverList
Definition: wineacm.h:91
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
Definition: internal.c:837
LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST paldrv)
Definition: internal.c:1069
PWINE_ACMDRIVER pNextACMDriver
Definition: wineacm.h:74
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by acmDriverDetailsW(), acmDriverMessage(), acmFilterDetailsW(), acmFilterEnumW(), acmFilterTagDetailsW(), acmFilterTagEnumW(), acmFormatDetailsW(), acmFormatEnumW(), acmFormatSuggest(), acmFormatTagDetailsW(), acmFormatTagEnumW(), acmStreamClose(), acmStreamOpen(), DriverEnumProc(), FormatEnumProc(), MSACM_FillCache(), MSACM_FillFormatTagsCB(), and MSACM_UnregisterDriver().

◆ acmDriverDetailsA()

MMRESULT WINAPI acmDriverDetailsA ( HACMDRIVERID  hadid,
PACMDRIVERDETAILSA  padd,
DWORD  fdwDetails 
)

Definition at line 226 of file driver.c.

227 {
228  MMRESULT mmr;
229  ACMDRIVERDETAILSW addw;
230 
231  TRACE("(%p, %p, %08x)\n", hadid, padd, fdwDetails);
232 
233  if (!padd) {
234  WARN("invalid parameter\n");
235  return MMSYSERR_INVALPARAM;
236  }
237 
238  if (padd->cbStruct < 4) {
239  WARN("invalid parameter\n");
240  return MMSYSERR_INVALPARAM;
241  }
242 
243  addw.cbStruct = sizeof(addw);
244  mmr = acmDriverDetailsW(hadid, &addw, fdwDetails);
245  if (mmr == 0) {
246  ACMDRIVERDETAILSA padda;
247 
248  padda.fccType = addw.fccType;
249  padda.fccComp = addw.fccComp;
250  padda.wMid = addw.wMid;
251  padda.wPid = addw.wPid;
252  padda.vdwACM = addw.vdwACM;
253  padda.vdwDriver = addw.vdwDriver;
254  padda.fdwSupport = addw.fdwSupport;
255  padda.cFormatTags = addw.cFormatTags;
256  padda.cFilterTags = addw.cFilterTags;
257  padda.hicon = addw.hicon;
258  WideCharToMultiByte( CP_ACP, 0, addw.szShortName, -1, padda.szShortName,
259  sizeof(padda.szShortName), NULL, NULL );
260  WideCharToMultiByte( CP_ACP, 0, addw.szLongName, -1, padda.szLongName,
261  sizeof(padda.szLongName), NULL, NULL );
262  WideCharToMultiByte( CP_ACP, 0, addw.szCopyright, -1, padda.szCopyright,
263  sizeof(padda.szCopyright), NULL, NULL );
264  WideCharToMultiByte( CP_ACP, 0, addw.szLicensing, -1, padda.szLicensing,
265  sizeof(padda.szLicensing), NULL, NULL );
266  WideCharToMultiByte( CP_ACP, 0, addw.szFeatures, -1, padda.szFeatures,
267  sizeof(padda.szFeatures), NULL, NULL );
268  padda.cbStruct = min(padd->cbStruct, sizeof(*padd));
269  memcpy(padd, &padda, padda.cbStruct);
270  }
271  return mmr;
272 }
DWORD cFilterTags
Definition: msacm.h:285
WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]
Definition: msacm.h:316
#define WideCharToMultiByte
Definition: compat.h:101
CHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]
Definition: msacm.h:293
DWORD cFormatTags
Definition: msacm.h:310
DWORD fdwSupport
Definition: msacm.h:283
#define CP_ACP
Definition: compat.h:99
CHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]
Definition: msacm.h:290
DWORD cFilterTags
Definition: msacm.h:311
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
CHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]
Definition: msacm.h:292
WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]
Definition: msacm.h:319
DWORD vdwDriver
Definition: msacm.h:281
DWORD cbStruct
Definition: msacm.h:272
smooth NULL
Definition: ftsmooth.c:416
DWORD cbStruct
Definition: msacm.h:298
#define TRACE(s)
Definition: solgame.cpp:4
DWORD fdwSupport
Definition: msacm.h:309
FOURCC fccComp
Definition: msacm.h:275
WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]
Definition: msacm.h:315
DWORD cFormatTags
Definition: msacm.h:284
MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, PACMDRIVERDETAILSW padd, DWORD fdwDetails)
Definition: driver.c:277
DWORD vdwDriver
Definition: msacm.h:307
FOURCC fccType
Definition: msacm.h:274
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
FOURCC fccType
Definition: msacm.h:300
CHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]
Definition: msacm.h:291
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define min(a, b)
Definition: monoChain.cc:55
FOURCC fccComp
Definition: msacm.h:301
WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]
Definition: msacm.h:318
WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]
Definition: msacm.h:317
CHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]
Definition: msacm.h:289

Referenced by DriverEnumProc(), and test_acmDriverAdd().

◆ acmDriverDetailsW()

MMRESULT WINAPI acmDriverDetailsW ( HACMDRIVERID  hadid,
PACMDRIVERDETAILSW  padd,
DWORD  fdwDetails 
)

Definition at line 277 of file driver.c.

278 {
279  HACMDRIVER acmDrvr;
280  MMRESULT mmr;
281 
282  TRACE("(%p, %p, %08x)\n", hadid, padd, fdwDetails);
283 
284  if (!padd) {
285  WARN("invalid parameter\n");
286  return MMSYSERR_INVALPARAM;
287  }
288 
289  if (padd->cbStruct < 4) {
290  WARN("invalid parameter\n");
291  return MMSYSERR_INVALPARAM;
292  }
293 
294  if (fdwDetails) {
295  WARN("invalid flag\n");
296  return MMSYSERR_INVALFLAG;
297  }
298 
299  mmr = acmDriverOpen(&acmDrvr, hadid, 0);
300  if (mmr == MMSYSERR_NOERROR) {
301  ACMDRIVERDETAILSW paddw;
302  paddw.cbStruct = sizeof(paddw);
303  mmr = MSACM_Message(acmDrvr, ACMDM_DRIVER_DETAILS, (LPARAM)&paddw, 0);
304 
305  acmDriverClose(acmDrvr, 0);
306  paddw.cbStruct = min(padd->cbStruct, sizeof(*padd));
307  memcpy(padd, &paddw, paddw.cbStruct);
308  }
309  else if (mmr == MMSYSERR_NODRIVER)
310  return MMSYSERR_NOTSUPPORTED;
311 
312  return mmr;
313 }
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define MMSYSERR_NODRIVER
Definition: mmsystem.h:102
#define ACMDM_DRIVER_DETAILS
Definition: msacmdrv.h:46
LONG_PTR LPARAM
Definition: windef.h:208
DWORD cbStruct
Definition: msacm.h:298
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define min(a, b)
Definition: monoChain.cc:55

Referenced by acmDriverDetailsA().

◆ acmDriverEnum()

MMRESULT WINAPI acmDriverEnum ( ACMDRIVERENUMCB  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 318 of file driver.c.

320 {
321  PWINE_ACMDRIVERID padid;
322  DWORD fdwSupport;
323 
324  TRACE("(%p, %08lx, %08x)\n", fnCallback, dwInstance, fdwEnum);
325 
326  if (!fnCallback) {
327  WARN("invalid parameter\n");
328  return MMSYSERR_INVALPARAM;
329  }
330 
332  WARN("invalid flag\n");
333  return MMSYSERR_INVALFLAG;
334  }
335 
336  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
337  fdwSupport = padid->fdwSupport;
338 
340  if (fdwEnum & ACM_DRIVERENUMF_DISABLED)
342  else
343  continue;
344  }
345  if (!(*fnCallback)((HACMDRIVERID)padid, dwInstance, fdwSupport))
346  break;
347  }
348 
349  return MMSYSERR_NOERROR;
350 }
DWORD fdwSupport
Definition: wineacm.h:97
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define ACM_DRIVERENUMF_DISABLED
Definition: msacm.h:70
#define ACM_DRIVERENUMF_NOLOCAL
Definition: msacm.h:69

Referenced by driver_tests().

◆ acmDriverID()

MMRESULT WINAPI acmDriverID ( HACMOBJ  hao,
PHACMDRIVERID  phadid,
DWORD  fdwDriverID 
)

Definition at line 355 of file driver.c.

356 {
357  PWINE_ACMOBJ pao;
358 
359  TRACE("(%p, %p, %08x)\n", hao, phadid, fdwDriverID);
360 
361  if (fdwDriverID) {
362  WARN("invalid flag\n");
363  return MMSYSERR_INVALFLAG;
364  }
365 
367  if (!pao) {
368  WARN("invalid handle\n");
369  return MMSYSERR_INVALHANDLE;
370  }
371 
372  if (!phadid) {
373  WARN("invalid parameter\n");
374  return MMSYSERR_INVALPARAM;
375  }
376 
377  *phadid = (HACMDRIVERID) pao->pACMDriverID;
378 
379  return MMSYSERR_NOERROR;
380 }
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID pACMDriverID
Definition: wineacm.h:45
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type)
Definition: internal.c:816
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
#define WINE_ACMOBJ_DONTCARE
Definition: wineacm.h:35
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107

Referenced by acmFilterEnumW(), acmFormatEnumW(), acmFormatTagEnumW(), and DriverEnumProc().

◆ acmDriverMessage()

LRESULT WINAPI acmDriverMessage ( HACMDRIVER  had,
UINT  uMsg,
LPARAM  lParam1,
LPARAM  lParam2 
)

Definition at line 395 of file driver.c.

396 {
397  TRACE("(%p, %04x, %08lx, %08lx\n", had, uMsg, lParam1, lParam2);
398 
399  if ((uMsg >= ACMDM_USER && uMsg < ACMDM_RESERVED_LOW) ||
400  uMsg == ACMDM_DRIVER_ABOUT ||
401  uMsg == DRV_QUERYCONFIGURE ||
402  uMsg == DRV_CONFIGURE)
403  {
404  PWINE_ACMDRIVERID padid;
405  LRESULT lResult;
406  LPDRVCONFIGINFO pConfigInfo = NULL;
407  LPWSTR section_name = NULL;
408  LPWSTR alias_name = NULL;
409 
410  /* Check whether handle is an HACMDRIVERID */
411  padid = MSACM_GetDriverID((HACMDRIVERID)had);
412 
413  /* If the message is DRV_CONFIGURE, and the application provides no
414  DRVCONFIGINFO structure, msacm must supply its own.
415  */
416  if (uMsg == DRV_CONFIGURE && lParam2 == 0) {
417  LPWSTR pAlias;
418 
419  /* Get the alias from the HACMDRIVERID */
420  if (padid) {
421  pAlias = padid->pszDriverAlias;
422  if (pAlias == NULL) {
423  WARN("DRV_CONFIGURE: no alias for this driver, cannot self-supply alias\n");
424  }
425  } else {
426  FIXME("DRV_CONFIGURE: reverse lookup HACMDRIVER -> HACMDRIVERID not implemented\n");
427  pAlias = NULL;
428  }
429 
430  if (pAlias != NULL) {
431  /* DRVCONFIGINFO is only 12 bytes long, but native msacm
432  * reports a 16-byte structure to codecs, so allocate 16 bytes,
433  * just to be on the safe side.
434  */
435  const unsigned int iStructSize = 16;
436  pConfigInfo = HeapAlloc(MSACM_hHeap, 0, iStructSize);
437  if (!pConfigInfo) {
438  ERR("OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL\n");
439  } else {
440  static const WCHAR drivers32[] = {'D','r','i','v','e','r','s','3','2','\0'};
441 
442  pConfigInfo->dwDCISize = iStructSize;
443 
444  section_name = HeapAlloc(MSACM_hHeap, 0, (strlenW(drivers32) + 1) * sizeof(WCHAR));
445  if (section_name) strcpyW(section_name, drivers32);
446  pConfigInfo->lpszDCISectionName = section_name;
447  alias_name = HeapAlloc(MSACM_hHeap, 0, (strlenW(pAlias) + 1) * sizeof(WCHAR));
448  if (alias_name) strcpyW(alias_name, pAlias);
449  pConfigInfo->lpszDCIAliasName = alias_name;
450 
451  if (pConfigInfo->lpszDCISectionName == NULL || pConfigInfo->lpszDCIAliasName == NULL) {
452  HeapFree(MSACM_hHeap, 0, alias_name);
453  HeapFree(MSACM_hHeap, 0, section_name);
454  HeapFree(MSACM_hHeap, 0, pConfigInfo);
455  pConfigInfo = NULL;
456  ERR("OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL\n");
457  }
458  }
459  }
460 
461  lParam2 = (LPARAM)pConfigInfo;
462  }
463 
464  if (padid) {
465  /* Handle is really an HACMDRIVERID, must have an open session to get an HACMDRIVER */
466  if (padid->pACMDriverList != NULL) {
467  lResult = MSACM_Message((HACMDRIVER)padid->pACMDriverList, uMsg, lParam1, lParam2);
468  } else {
469  MMRESULT mmr = acmDriverOpen(&had, (HACMDRIVERID)padid, 0);
470  if (mmr != MMSYSERR_NOERROR) {
471  lResult = MMSYSERR_INVALPARAM;
472  } else {
473  lResult = acmDriverMessage(had, uMsg, lParam1, lParam2);
474  acmDriverClose(had, 0);
475  }
476  }
477  } else {
478  lResult = MSACM_Message(had, uMsg, lParam1, lParam2);
479  }
480  if (pConfigInfo) {
481  HeapFree(MSACM_hHeap, 0, alias_name);
482  HeapFree(MSACM_hHeap, 0, section_name);
483  HeapFree(MSACM_hHeap, 0, pConfigInfo);
484  }
485  return lResult;
486  }
487  WARN("invalid parameter\n");
488  return MMSYSERR_INVALPARAM;
489 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: driver.c:395
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
#define DRV_QUERYCONFIGURE
Definition: mmsystem.h:126
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define ACMDM_RESERVED_LOW
Definition: msacm.h:222
#define FIXME(fmt,...)
Definition: debug.h:110
HANDLE MSACM_hHeap
Definition: internal.c:45
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define ACMDM_USER
Definition: msacm.h:221
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define DRV_CONFIGURE
Definition: mmsystem.h:125
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPCWSTR lpszDCISectionName
Definition: mmsystem.h:990
LPWSTR pszDriverAlias
Definition: wineacm.h:88
PWINE_ACMDRIVER pACMDriverList
Definition: wineacm.h:91
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
#define ERR(fmt,...)
Definition: debug.h:109
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
LPCWSTR lpszDCIAliasName
Definition: mmsystem.h:991
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ACMDM_DRIVER_ABOUT
Definition: msacm.h:227

Referenced by acmDriverMessage().

◆ acmDriverOpen()

MMRESULT WINAPI acmDriverOpen ( PHACMDRIVER  phad,
HACMDRIVERID  hadid,
DWORD  fdwOpen 
)

Definition at line 494 of file driver.c.

495 {
496  PWINE_ACMDRIVERID padid;
498  MMRESULT ret;
499 
500  TRACE("(%p, %p, %08u)\n", phad, hadid, fdwOpen);
501 
502  if (!phad) {
503  WARN("invalid parameter\n");
504  return MMSYSERR_INVALPARAM;
505  }
506 
507  if (fdwOpen) {
508  WARN("invalid flag\n");
509  return MMSYSERR_INVALFLAG;
510  }
511 
512  padid = MSACM_GetDriverID(hadid);
513  if (!padid) {
514  WARN("invalid handle\n");
515  return MMSYSERR_INVALHANDLE;
516  }
517 
518  pad = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVER));
519  if (!pad) {
520  WARN("no memory\n");
521  return MMSYSERR_NOMEM;
522  }
523 
524  pad->obj.dwType = WINE_ACMOBJ_DRIVER;
525  pad->obj.pACMDriverID = padid;
526  pad->hDrvr = 0;
527  pad->pLocalDrvrInst = NULL;
528 
529  if (padid->pLocalDriver == NULL)
530  {
531  ACMDRVOPENDESCW adod;
532  int len;
533  LPWSTR section_name;
534 
535  /* this is not an externally added driver... need to actually load it */
536  if (!padid->pszDriverAlias)
537  {
539  goto gotError;
540  }
541 
542  adod.cbStruct = sizeof(adod);
545  adod.dwVersion = acmGetVersion();
546  adod.dwFlags = fdwOpen;
547  adod.dwError = 0;
548  len = strlen("Drivers32") + 1;
549  section_name = HeapAlloc(MSACM_hHeap, 0, len * sizeof(WCHAR));
550  MultiByteToWideChar(CP_ACP, 0, "Drivers32", -1, section_name, len);
551  adod.pszSectionName = section_name;
552  adod.pszAliasName = padid->pszDriverAlias;
553  adod.dnDevNode = 0;
554 
555  pad->hDrvr = OpenDriver(padid->pszDriverAlias, NULL, (DWORD_PTR)&adod);
556 
557  HeapFree(MSACM_hHeap, 0, section_name);
558  if (!pad->hDrvr)
559  {
560  ret = adod.dwError;
561  if (ret == MMSYSERR_NOERROR)
563  goto gotError;
564  }
565  }
566  else
567  {
568  ACMDRVOPENDESCW adod;
569 
570  pad->hDrvr = NULL;
571 
572  adod.cbStruct = sizeof(adod);
575  adod.dwVersion = acmGetVersion();
576  adod.dwFlags = fdwOpen;
577  adod.dwError = 0;
578  adod.pszSectionName = NULL;
579  adod.pszAliasName = NULL;
580  adod.dnDevNode = 0;
581 
582  pad->pLocalDrvrInst = MSACM_OpenLocalDriver(padid->pLocalDriver, (DWORD_PTR)&adod);
583  if (!pad->pLocalDrvrInst)
584  {
585  ret = adod.dwError;
586  if (ret == MMSYSERR_NOERROR)
588  goto gotError;
589  }
590  }
591 
592  /* insert new pad at beg of list */
593  pad->pNextACMDriver = padid->pACMDriverList;
594  padid->pACMDriverList = pad;
595 
596  /* FIXME: Create a WINE_ACMDRIVER32 */
597  *phad = (HACMDRIVER)pad;
598  TRACE("%s => %p\n", debugstr_w(padid->pszDriverAlias), pad);
599 
600  return MMSYSERR_NOERROR;
601  gotError:
602  WARN("failed: ret = %08x\n", ret);
603  if (pad && !pad->hDrvr)
604  HeapFree(MSACM_hHeap, 0, pad);
605  return ret;
606 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam)
Definition: driver.c:400
#define MMSYSERR_NOMEM
Definition: mmsystem.h:103
#define MMSYSERR_NODRIVER
Definition: mmsystem.h:102
#define debugstr_w
Definition: kernel32.h:32
HANDLE MSACM_hHeap
Definition: internal.c:45
PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER paldrv, LPARAM lParam2)
Definition: internal.c:1014
#define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED
Definition: msacm.h:59
smooth NULL
Definition: ftsmooth.c:416
FOURCC fccType
Definition: msacmdrv.h:87
DWORD dnDevNode
Definition: msacmdrv.h:94
static void pad(Char *s)
Definition: bzip2.c:908
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD WINAPI acmGetVersion(void)
Definition: msacm32_main.c:76
LPWSTR pszDriverAlias
Definition: wineacm.h:88
PWINE_ACMDRIVER pACMDriverList
Definition: wineacm.h:91
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMLOCALDRIVER pLocalDriver
Definition: wineacm.h:90
int ret
DWORD dwVersion
Definition: msacmdrv.h:89
GLenum GLsizei len
Definition: glext.h:6722
uint32_t DWORD_PTR
Definition: typedefs.h:63
LPCWSTR pszAliasName
Definition: msacmdrv.h:93
DWORD cbStruct
Definition: msacmdrv.h:86
LPCWSTR pszSectionName
Definition: msacmdrv.h:92
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define MultiByteToWideChar
Definition: compat.h:100
#define WINE_ACMOBJ_DRIVER
Definition: wineacm.h:37
FOURCC fccComp
Definition: msacmdrv.h:88
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC
Definition: msacm.h:58

Referenced by acmDriverDetailsW(), acmDriverMessage(), acmFilterDetailsW(), acmFilterEnumW(), acmFilterTagDetailsW(), acmFilterTagEnumW(), acmFormatDetailsW(), acmFormatEnumW(), acmFormatSuggest(), acmFormatTagDetailsW(), acmFormatTagEnumW(), acmStreamOpen(), DriverEnumProc(), FormatEnumProc(), FormatTagEnumProc(), MSACM_FillCache(), and MSACM_FillFormatTagsCB().

◆ acmDriverPriority()

MMRESULT WINAPI acmDriverPriority ( HACMDRIVERID  hadid,
DWORD  dwPriority,
DWORD  fdwPriority 
)

Definition at line 611 of file driver.c.

612 {
613 
614  TRACE("(%p, %08x, %08x)\n", hadid, dwPriority, fdwPriority);
615 
616  /* Check for unknown flags */
617  if (fdwPriority &
620  WARN("invalid flag\n");
621  return MMSYSERR_INVALFLAG;
622  }
623 
624  /* Check for incompatible flags */
625  if ((fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) &&
626  (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE)) {
627  WARN("invalid flag\n");
628  return MMSYSERR_INVALFLAG;
629  }
630 
631  /* Check for incompatible flags */
632  if ((fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) &&
633  (fdwPriority & ACM_DRIVERPRIORITYF_END)) {
634  WARN("invalid flag\n");
635  return MMSYSERR_INVALFLAG;
636  }
637 
638  /* According to MSDN, ACM_DRIVERPRIORITYF_BEGIN and ACM_DRIVERPRIORITYF_END
639  may only appear by themselves, and in addition, hadid and dwPriority must
640  both be zero */
641  if ((fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) ||
642  (fdwPriority & ACM_DRIVERPRIORITYF_END)) {
643  if (fdwPriority & ~(ACM_DRIVERPRIORITYF_BEGIN|ACM_DRIVERPRIORITYF_END)) {
644  WARN("ACM_DRIVERPRIORITYF_[BEGIN|END] cannot be used with any other flags\n");
645  return MMSYSERR_INVALPARAM;
646  }
647  if (dwPriority) {
648  WARN("priority invalid with ACM_DRIVERPRIORITYF_[BEGIN|END]\n");
649  return MMSYSERR_INVALPARAM;
650  }
651  if (hadid) {
652  WARN("non-null hadid invalid with ACM_DRIVERPRIORITYF_[BEGIN|END]\n");
653  return MMSYSERR_INVALPARAM;
654  }
655  /* FIXME: MSDN wording suggests that deferred notification should be
656  implemented as a system-wide lock held by a calling task, and that
657  re-enabling notifications should broadcast them across all processes.
658  This implementation uses a simple DWORD counter. One consequence of the
659  current implementation is that applications will never see
660  MMSYSERR_ALLOCATED as a return error.
661  */
662  if (fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) {
664  } else if (fdwPriority & ACM_DRIVERPRIORITYF_END) {
666  }
667  return MMSYSERR_NOERROR;
668  } else {
669  PWINE_ACMDRIVERID padid;
670  PWINE_ACMNOTIFYWND panwnd;
671  BOOL bPerformBroadcast = FALSE;
672 
673  /* Fetch driver ID */
674  padid = MSACM_GetDriverID(hadid);
675  panwnd = MSACM_GetNotifyWnd(hadid);
676  if (!padid && !panwnd) {
677  WARN("invalid handle\n");
678  return MMSYSERR_INVALHANDLE;
679  }
680 
681  if (padid) {
682  /* Check whether driver ID is appropriate for requested op */
683  if (dwPriority) {
685  return MMSYSERR_NOTSUPPORTED;
686  }
687  if (dwPriority != 1 && dwPriority != (DWORD)-1) {
688  FIXME("unexpected priority %d, using sign only\n", dwPriority);
689  if ((signed)dwPriority < 0) dwPriority = (DWORD)-1;
690  if (dwPriority > 0) dwPriority = 1;
691  }
692 
693  if (dwPriority == 1 && (padid->pPrevACMDriverID == NULL ||
695  /* do nothing - driver is first of list, or first after last
696  local driver */
697  } else if (dwPriority == (DWORD)-1 && padid->pNextACMDriverID == NULL) {
698  /* do nothing - driver is last of list */
699  } else {
700  MSACM_RePositionDriver(padid, dwPriority);
701  bPerformBroadcast = TRUE;
702  }
703  }
704 
705  /* Check whether driver ID should be enabled or disabled */
706  if (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE) {
709  bPerformBroadcast = TRUE;
710  }
711  } else if (fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) {
714  bPerformBroadcast = TRUE;
715  }
716  }
717  }
718 
719  if (panwnd) {
720  if (dwPriority) {
721  return MMSYSERR_NOTSUPPORTED;
722  }
723 
724  /* Check whether notify window should be enabled or disabled */
725  if (fdwPriority & ACM_DRIVERPRIORITYF_DISABLE) {
728  bPerformBroadcast = TRUE;
729  }
730  } else if (fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) {
733  bPerformBroadcast = TRUE;
734  }
735  }
736  }
737 
738  /* Perform broadcast of changes */
739  if (bPerformBroadcast) {
742  }
743  return MMSYSERR_NOERROR;
744  }
745 }
DWORD fdwSupport
Definition: wineacm.h:97
#define TRUE
Definition: types.h:120
#define ACM_DRIVERPRIORITYF_ENABLE
Definition: msacm.h:72
void MSACM_EnableNotifications(void)
Definition: internal.c:465
#define WARN(fmt,...)
Definition: debug.h:111
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
#define DWORD
Definition: nt_native.h:44
PWINE_ACMDRIVERID pPrevACMDriverID
Definition: wineacm.h:93
void MSACM_WriteCurrentPriorities(void)
Definition: internal.c:666
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
void MSACM_BroadcastNotification(void)
Definition: internal.c:441
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
void MSACM_DisableNotifications(void)
Definition: internal.c:457
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
#define ACM_DRIVERPRIORITYF_END
Definition: msacm.h:76
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
#define ACMDRIVERDETAILS_SUPPORTF_LOCAL
Definition: msacm.h:66
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
void MSACM_RePositionDriver(PWINE_ACMDRIVERID padid, DWORD dwPriority)
Definition: internal.c:502
#define ACM_DRIVERPRIORITYF_DISABLE
Definition: msacm.h:73
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define ACM_DRIVERPRIORITYF_BEGIN
Definition: msacm.h:75
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver)
Definition: internal.c:845

◆ acmDriverRemove()

MMRESULT WINAPI acmDriverRemove ( HACMDRIVERID  hadid,
DWORD  fdwRemove 
)

Definition at line 750 of file driver.c.

751 {
752  PWINE_ACMDRIVERID padid;
753  PWINE_ACMNOTIFYWND panwnd;
754 
755  TRACE("(%p, %08x)\n", hadid, fdwRemove);
756 
757  padid = MSACM_GetDriverID(hadid);
758  panwnd = MSACM_GetNotifyWnd(hadid);
759  if (!padid && !panwnd) {
760  WARN("invalid handle\n");
761  return MMSYSERR_INVALHANDLE;
762  }
763 
764  if (fdwRemove) {
765  WARN("invalid flag\n");
766  return MMSYSERR_INVALFLAG;
767  }
768 
769  if (padid) MSACM_UnregisterDriver(padid);
770  if (panwnd) MSACM_UnRegisterNotificationWindow(panwnd);
772 
773  return MMSYSERR_NOERROR;
774 }
#define WARN(fmt,...)
Definition: debug.h:111
PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
Definition: internal.c:766
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
void MSACM_BroadcastNotification(void)
Definition: internal.c:441
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND *panwnd)
Definition: internal.c:479
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver)
Definition: internal.c:845

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msacm  )