32 0, 0, { (
DWORD_PTR)(__FILE__
": mmdriver_lock") }
37static const WCHAR HKLM_BASE[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
38 'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'N',
'T',
'\\',
'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
70 if (found) *found =
NULL;
75 if (found && !*found) *found = lpDrv;
104 if (
d)
TRACE(
"%p -> %p, %p\n", hDrvr,
d->lpDrvProc, (
void *)
d->dwDriverID);
105 else TRACE(
"%p -> NULL\n", hDrvr);
118 TRACE(
"Before call32 proc=%p drvrID=%08lx hDrv=%p wMsg=%04x p1=%08lx p2=%08lx\n",
121 TRACE(
"After call32 proc=%p drvrID=%08lx hDrv=%p wMsg=%04x p1=%08lx p2=%08lx => %08lx\n",
144 TRACE(
"retval = %ld\n", retval);
194 TRACE(
"DRV_LOAD failed on driver %p\n", lpNewDrv);
206 TRACE(
"DRV_OPEN failed on driver %p\n", lpNewDrv);
237 static const WCHAR wszSystemIni[] = {
'S',
'Y',
'S',
'T',
'E',
'M',
'.',
'I',
'N',
'I',0};
238 WCHAR wsznull =
'\0';
303 cause =
"Not a 32 bit lib";
311 cause =
"no DriverProc";
329 cause =
"load0 failed";
336 cause =
"load1 failed";
344 cause =
"load failed";
348 TRACE(
"=> %p\n", lpDrv);
406 TRACE(
"(%s, %s, 0x%08lx);\n",
415 static const WCHAR wszDrivers32[] = {
'D',
'r',
'i',
'v',
'e',
'r',
's',
'3',
'2',0};
417 lstrcpynW(libName, lpDriverName,
sizeof(libName) /
sizeof(
WCHAR));
442 if (pFnOpenDriver16 &&
443 (lpDrv = pFnOpenDriver16(lpDriverName, lpSectionName,
lParam)))
448 TRACE(
"Failed to open driver %s from system.ini file, section %s\n",
454 if (lpDrv)
TRACE(
"=> %p\n", lpDrv);
467 TRACE(
"(%p, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
480 FIXME(
"WINE_GDF_SESSION: Shouldn't happen (%p)\n", lpDrv);
497 WARN(
"Failed to close driver\n");
524 TRACE(
"(%p)\n", hDrvr);
541 TRACE(
"(%p);\n", hDrvr);
582 default:
return "UNKNOWN";
594 TRACE(
"(%08lX, %s %04X, %p, %04X, %08lX, %08lX, %08lX)\n",
610 ((
LPDRVCALLBACK)dwCallBack)(hDev, wMsg, dwUser, dwParam1, dwParam2);
625 if (pFnGetMMThread16)
627 WINE_MMTHREAD* lpMMThd = pFnGetMMThread16(
LOWORD(dwCallBack));
629 TRACE(
"mmThread (%04x, %p) !\n",
LOWORD(dwCallBack), lpMMThd);
649 WARN(
"Notification failure\n");
#define InterlockedIncrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void restart(int argc, const char *argv[])
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
#define MultiByteToWideChar
#define __EXCEPT_PAGE_FAULT
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
LPWINE_DRIVER DRIVER_FindFromHDrvr(HDRVR hDrvr)
static LPWINE_DRIVER lpDrvItemList
static CRITICAL_SECTION_DEBUG mmdriver_lock_debug
static BOOL DRIVER_RemoveFromList(LPWINE_DRIVER lpDrv)
DWORD WINAPI GetDriverFlags(HDRVR hDrvr)
static BOOL DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam1, LPARAM lParam2)
static unsigned DRIVER_GetNumberOfModuleRefs(HMODULE hModule, WINE_DRIVER **found)
LRESULT WINAPI DefDriverProc(DWORD_PTR dwDriverIdentifier, HDRVR hDrv, UINT Msg, LPARAM lParam1, LPARAM lParam2)
static LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg, LPARAM lParam1, LPARAM lParam2)
static const char * DRIVER_getCallback(DWORD uFlags)
HDRVR WINAPI OpenDriverA(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam)
BOOL WINAPI DriverCallback(DWORD_PTR dwCallBack, DWORD uFlags, HDRVR hDev, DWORD wMsg, DWORD_PTR dwUser, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
static CRITICAL_SECTION mmdriver_lock
void DRIVER_UnloadAll(void)
BOOL DRIVER_GetLibName(LPCWSTR keyName, LPCWSTR sectName, LPWSTR buf, int sz)
LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1, LPARAM lParam2)
LPWINE_DRIVER DRIVER_TryOpenDriver32(LPCWSTR fn, LPARAM lParam2)
static void DRIVER_Dump(const char *comment)
static const WCHAR HKLM_BASE[]
HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam)
HMODULE WINAPI GetDriverModuleHandle(HDRVR hDrvr)
LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
DRVCALLBACK * LPDRVCALLBACK
LRESULT(CALLBACK * DRIVERPROC)(DWORD_PTR, HDRVR, UINT, LPARAM, LPARAM)
#define comment(fmt, arg1)
struct @1678::@1679 driver
LIST_ENTRY ProcessLocksList
struct tagWINE_DRIVER * lpPrevItem
struct tagWINE_DRIVER * lpNextItem
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
static GLenum _GLUfuncptr fn
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
struct tagWINE_DRIVER * LPWINE_DRIVER
#define WINE_GDF_EXTERNAL_MASK
BOOL WINMM_CheckForMMSystem(void)
#define HKEY_LOCAL_MACHINE
BOOL WINAPI PostThreadMessageA(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)