63 static const WCHAR msacmW[] = {
'M',
'S',
'A',
'C',
'M',
'.'};
64 static const WCHAR drvkey[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
65 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
66 'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'N',
'T',
'\\',
67 'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'\\',
68 'D',
'r',
'i',
'v',
'e',
'r',
's',
'3',
'2',
'\0'};
80 WARN(
"unable to open registry key - 0x%08x\n", lRet);
85 WARN(
"unable to query requested subkey %s - 0x%08x\n",
debugstr_w(pszRegEntry), lRet);
103 TRACE(
"cFilterTags=%lu cFormatTags=%lu fdwSupport=%08lx\n",
106 TRACE(
"\tdwFormatTag=%lu cbwfx=%lu\n",
167 padid->
aFormatTag[ntag].dwFormatTag = aftd.dwFormatTag;
168 padid->
aFormatTag[ntag].cbwfx = aftd.cbFormatSize;
187 static const WCHAR baseKey[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
188 'A',
'u',
'd',
'i',
'o',
'C',
'o',
'm',
'p',
'r',
'e',
's',
's',
'i',
'o',
'n',
'M',
'a',
'n',
'a',
'g',
'e',
'r',
'\\',
189 'D',
'r',
'i',
'v',
'e',
'r',
'C',
'a',
'c',
'h',
'e',
'\\',
'\0'};
194 ERR(
"No alias needed for registry entry\n");
290 TRACE(
"(%s, %s, %p)\n",
356 static const WCHAR msacm32[] = {
'm',
's',
'a',
'c',
'm',
'3',
'2',
'.',
'd',
'l',
'l',
'\0'};
357 static const WCHAR msacmW[] = {
'M',
'S',
'A',
'C',
'M',
'.'};
358 static const WCHAR drv32[] = {
'd',
'r',
'i',
'v',
'e',
'r',
's',
'3',
'2',
'\0'};
359 static const WCHAR sys[] = {
's',
'y',
's',
't',
'e',
'm',
'.',
'i',
'n',
'i',
'\0'};
360 static const WCHAR drvkey[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
361 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
362 'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'N',
'T',
'\\',
363 'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'\\',
364 'D',
'r',
'i',
'v',
'e',
'r',
's',
'3',
'2',
'\0'};
376 RegQueryInfoKeyW(
hKey, 0, 0, 0, &cnt, 0, 0, 0, 0, 0, 0, 0);
377 for (
i = 0;
i < cnt;
i++) {
388 bufLen =
sizeof(
buf);
420 TRACE(
"(%p,0x%08x)\n", hNotifyWnd, dwNotifyMsg);
523 if (dwPriority == 1) {
529 }
else if (dwPriority == -1) {
559 unsigned int iNumDrivers;
571 static const WCHAR basePriorityKey[] = {
572 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
573 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
574 'M',
'u',
'l',
't',
'i',
'm',
'e',
'd',
'i',
'a',
'\\',
575 'A',
'u',
'd',
'i',
'o',
' ',
'C',
'o',
'm',
'p',
'r',
'e',
's',
's',
'i',
'o',
'n',
' ',
'M',
'a',
'n',
'a',
'g',
'e',
'r',
'\\',
576 'P',
'r',
'i',
'o',
'r',
'i',
't',
'y',
' ',
'v',
'4',
'.',
'0',
'0',
'\0'
585 ERR(
"out of memory\n");
591 TRACE(
"RegOpenKeyW failed, possibly key does not exist yet\n");
599 driverList[
i] = padid;
609 for (
i = 0;
i < iNumDrivers;
i++)
611 static const WCHAR priorityTmpl[] = {
'P',
'r',
'i',
'o',
'r',
'i',
't',
'y',
'%',
'l',
'd',
'\0'};
613 unsigned int iTargetPosition;
614 unsigned int iCurrentPosition;
616 static const WCHAR sPrefix[] = {
'm',
's',
'a',
'c',
'm',
'.',
'\0'};
620 lBufferLength =
sizeof(szBuffer);
628 pAlias =
wcsstr(szBuffer, sPrefix);
629 if (pAlias ==
NULL)
continue;
631 for (iCurrentPosition = 0; iCurrentPosition < iNumDrivers; iCurrentPosition++) {
632 if (
wcsicmp(driverList[iCurrentPosition]->pszDriverAlias, pAlias) == 0)
635 if (iCurrentPosition < iNumDrivers && iTargetPosition != iCurrentPosition) {
636 padid = driverList[iTargetPosition];
637 driverList[iTargetPosition] = driverList[iCurrentPosition];
638 driverList[iCurrentPosition] = padid;
641 if (szBuffer[0] ==
'1') {
642 driverList[iTargetPosition]->
fdwSupport &= ~ACMDRIVERDETAILS_SUPPORTF_DISABLED;
643 }
else if (szBuffer[0] ==
'0') {
650 for (
i = 0;
i < iNumDrivers;
i++) {
672 static const WCHAR basePriorityKey[] = {
673 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
674 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
675 'M',
'u',
'l',
't',
'i',
'm',
'e',
'd',
'i',
'a',
'\\',
676 'A',
'u',
'd',
'i',
'o',
' ',
'C',
'o',
'm',
'p',
'r',
'e',
's',
's',
'i',
'o',
'n',
' ',
'M',
'a',
'n',
'a',
'g',
'e',
'r',
'\\',
677 'P',
'r',
'i',
'o',
'r',
'i',
't',
'y',
' ',
'v',
'4',
'.',
'0',
'0',
'\0'
680 DWORD dwPriorityCounter;
681 static const WCHAR priorityTmpl[] = {
'P',
'r',
'i',
'o',
'r',
'i',
't',
'y',
'%',
'l',
'd',
'\0'};
682 static const WCHAR valueTmpl[] = {
'%',
'c',
',',
' ',
'%',
's',
'\0'};
683 static const WCHAR converterAlias[] = {
'I',
'n',
't',
'e',
'r',
'n',
'a',
'l',
' ',
'P',
'C',
'M',
' ',
'C',
'o',
'n',
'v',
'e',
'r',
't',
'e',
'r',
'\0'};
690 ERR(
"unable to remove current key %s (0x%08x) - priority changes won't persist past application end.\n",
696 ERR(
"unable to create key %s (0x%08x) - priority changes won't persist past application end.\n",
708 swprintf(szSubKey, priorityTmpl, dwPriorityCounter);
716 ERR(
"unable to write value for %s under key %s (0x%08x)\n",
723 swprintf(szSubKey, priorityTmpl, dwPriorityCounter);
726 swprintf(szBuffer, valueTmpl,
'1', converterAlias);
730 ERR(
"unable to write value for %s under key %s (0x%08x)\n",
745 ERR(
"local driver instances still present after closing all drivers - memory leak\n");
767 return pNextACMLocalDriver;
777 while (
p->pACMDriverList)
789 if (
p->pPrevACMDriverID)
791 if (
p->pNextACMDriverID)
799 return pNextACMDriverID;
866#define MSACM_DRIVER_SendMessage(PDRVRINST, msg, lParam1, lParam2) \
867 (PDRVRINST)->pLocalDriver->lpDrvProc((PDRVRINST)->dwDriverID, (HDRVR)(PDRVRINST), msg, lParam1, lParam2)
930 if (found) *found =
NULL;
938 if (found && !*found) *found = pInst;
970 ERR(
"requested to remove invalid instance %p\n", pPrevInst);
996 FIXME(
"DRV_LOAD failed on driver %p\n", lpNewDrv);
1019 FIXME(
"DRV_OPEN failed on driver %p\n", lpNewDrv);
1049 ERR(
"load0 failed\n");
1055 ERR(
"load1 failed\n");
1070 ERR(
"load failed\n");
1074 TRACE(
"=> %p\n", pDrvInst);
1091 ERR(
"should not directly close session instance (%p)\n", paldrv);
1106 ERR(
"unable to close driver instance\n");
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
#define HeapFree(x, y, z)
BOOL WINAPI IsBadReadPtr(IN LPCVOID lp, IN UINT_PTR ucb)
INT WINAPI GetPrivateProfileSectionW(LPCWSTR section, LPWSTR buffer, DWORD len, LPCWSTR filename)
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
static LPWSTR MSACM_GetRegistryKey(const WINE_ACMDRIVERID *padid)
PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg)
PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND *panwnd)
static BOOL MSACM_ReadCache(PWINE_ACMDRIVERID padid)
void MSACM_WriteCurrentPriorities(void)
PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver)
PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry)
static BOOL MSACM_RemoveFromList(PWINE_ACMLOCALDRIVERINST lpDrv)
static PWINE_ACMLOCALDRIVER MSACM_UnregisterLocalDriver(PWINE_ACMLOCALDRIVER paldrv)
BOOL MSACM_FindFormatTagInCache(const WINE_ACMDRIVERID *padid, DWORD fmtTag, LPDWORD idx)
static DWORD MSACM_suspendBroadcastCount
static BOOL MSACM_FillCache(PWINE_ACMDRIVERID padid)
static PWINE_ACMNOTIFYWND MSACM_pLastACMNotifyWnd
static BOOL MSACM_WriteCache(const WINE_ACMDRIVERID *padid)
void MSACM_UnregisterAllDrivers(void)
static PWINE_ACMNOTIFYWND MSACM_pFirstACMNotifyWnd
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
void MSACM_EnableNotifications(void)
void MSACM_BroadcastNotification(void)
void MSACM_RePositionDriver(PWINE_ACMDRIVERID padid, DWORD dwPriority)
static PWINE_ACMDRIVERID MSACM_pLastACMDriverID
#define MSACM_DRIVER_SendMessage(PDRVRINST, msg, lParam1, lParam2)
PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER paldrv, LPARAM lParam2)
PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
static void MSACM_ReorderDriversByPriority(void)
static PWINE_ACMLOCALDRIVER MSACM_pFirstACMLocalDriver
void MSACM_RegisterAllDrivers(void)
static PWINE_ACMLOCALDRIVER MSACM_pLastACMLocalDriver
PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver)
static unsigned MSACM_GetNumberOfModuleRefs(HMODULE hModule, DRIVERPROC lpDrvProc, WINE_ACMLOCALDRIVERINST **found)
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
static BOOL MSACM_pendingBroadcast
void MSACM_DisableNotifications(void)
PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName, PWINE_ACMLOCALDRIVER pLocalDriver)
PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type)
static BOOL MSACM_AddToList(PWINE_ACMLOCALDRIVERINST lpNewDrv, LPARAM lParam2)
PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc)
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST paldrv)
LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1, LPARAM lParam2)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
LRESULT(CALLBACK * DRIVERPROC)(DWORD_PTR, HDRVR, UINT, LPARAM, LPARAM)
#define MMSYSERR_INVALHANDLE
#define ERROR_FILE_NOT_FOUND
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
#define ACM_FORMATTAGDETAILSF_INDEX
#define ACMDRIVERDETAILS_SUPPORTF_LOCAL
#define ACMDM_FORMATTAG_DETAILS
#define ACMDM_DRIVER_DETAILS
_CRTIMP wchar_t *__cdecl _wcslwr(_Inout_z_ wchar_t *_String)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
PWINE_ACMLOCALDRIVER pLocalDriver
PWINE_ACMDRIVER pACMDriverList
PWINE_ACMDRIVERID pNextACMDriverID
PWINE_ACMDRIVERID pPrevACMDriverID
struct _WINE_ACMDRIVERID::@482 * aFormatTag
PWINE_ACMLOCALDRIVERINST pLocalDrvrInst
PWINE_ACMLOCALDRIVERINST pNextACMInst
PWINE_ACMLOCALDRIVER pLocalDriver
PWINE_ACMLOCALDRIVER pPrevACMLocalDrv
PWINE_ACMLOCALDRIVERINST pACMInstList
PWINE_ACMLOCALDRIVER pNextACMLocalDrv
PWINE_ACMNOTIFYWND pNextACMNotifyWnd
PWINE_ACMNOTIFYWND pPrevACMNotifyWnd
PWINE_ACMDRIVERID pACMDriverID
WORD WORD PSZ PSZ pszFileName
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
struct _WINE_ACMOBJ * PWINE_ACMOBJ
#define WINE_ACMOBJ_NOTIFYWND
#define WINE_ACMOBJ_DRIVERID
#define WINE_ACMOBJ_LOCALDRIVER
#define WINE_ACMOBJ_DONTCARE
#define WINE_ACMOBJ_DRIVER
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
LPWSTR WINAPI CharLowerW(_Inout_ LPWSTR)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)