Cleaned up the code a bit.

This commit is contained in:
Eric Pouech 2000-12-21 20:21:53 +00:00 committed by Alexandre Julliard
parent 96f9a8d609
commit 247a94f688
3 changed files with 7 additions and 33 deletions

View File

@ -17,11 +17,12 @@ C_SRCS = \
sound16.c \
time.c
GLUE = lolvldrv.c \
GLUE = \
lolvldrv.c \
mmsystem.c \
time.c
RC_SRCS= \
RC_SRCS = \
winmm_res.rc
@MAKE_DLL_RULES@

View File

@ -11,10 +11,9 @@
#include <string.h>
#include "heap.h"
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "mmddk.h"
#include "winemm.h"
#include "wine/winbase16.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(driver);
@ -26,32 +25,6 @@ static LPWINE_DRIVER lpDrvItemList = NULL;
* problem as long as FreeLibrary is not working correctly)
*/
/* ### start build ### */
extern LONG CALLBACK DRIVER_CallTo16_long_lwwll(FARPROC16,LONG,WORD,WORD,LONG,LONG);
/* ### stop build ### */
/**************************************************************************
* LoadStartupDrivers [internal]
*/
static void WINE_UNUSED DRIVER_LoadStartupDrivers(void)
{
char str[256];
if (GetPrivateProfileStringA("drivers", NULL, "", str, sizeof(str), "SYSTEM.INI") < 2) {
ERR("Can't find drivers section in system.ini\n");
} else {
HDRVR16 hDrv;
LPSTR ptr;
for (ptr = str; *ptr; ptr += strlen(ptr) + 1) {
TRACE("str='%s'\n", ptr);
hDrv = OpenDriver16(ptr, "drivers", 0L);
TRACE("hDrv=%04x\n", hDrv);
}
TRACE("end of list !\n");
}
}
/**************************************************************************
* DRIVER_GetNumberOfModuleRefs [internal]
*
@ -446,7 +419,7 @@ HDRVR WINAPI OpenDriverA(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lPara
goto the_end;
if (!(lpDrv = DRIVER_TryOpenDriver16(lpDriverName, lpSectionName, lParam2)))
ERR("Failed to open driver %s from section %s\n", lpDriverName, lpSectionName);
TRACE("Failed to open driver %s from section %s\n", lpDriverName, lpSectionName);
the_end:
if (lpDrv) TRACE("=> %08lx\n", (DWORD)lpDrv);
return (DWORD)lpDrv;

View File

@ -226,7 +226,7 @@ static LPWINE_DRIVER DRIVER_TryOpenDriver16(LPCSTR lpFileName, LPARAM lParam2)
if (*ptr == '\0') ptr = NULL;
}
if ((hModule = LoadModule16(lpFileName, (LPVOID)-1)) < 32) goto exit;
if ((hModule = LoadLibrary16(lpFileName)) < 32) goto exit;
if ((lpProc = (DRIVERPROC16)GetProcAddress16(hModule, "DRIVERPROC")) == NULL)
goto exit;
@ -275,7 +275,7 @@ HDRVR16 WINAPI OpenDriver16(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lP
lpDrv = DRIVER_TryOpenDriver16(drvName, lParam2);
}
if (!lpDrv) {
ERR("Failed to open driver %s from system.ini file, section %s\n", lpDriverName, lpSectionName);
TRACE("Failed to open driver %s from system.ini file, section %s\n", lpDriverName, lpSectionName);
return 0;
}
the_end: