Made MPR a separate dll.

This commit is contained in:
Alexandre Julliard 2000-03-17 15:09:48 +00:00
parent 1529f58467
commit ebc32253bc
6 changed files with 41 additions and 11 deletions

View File

@ -98,6 +98,7 @@ DLLS = \
mciseq.drv \ mciseq.drv \
mciwave.drv \ mciwave.drv \
midimap.drv \ midimap.drv \
mpr \
msacm \ msacm \
msacm.drv \ msacm.drv \
msacm32 \ msacm32 \

View File

@ -35,7 +35,6 @@ LIBSUBDIRS = \
dlls/crtdll \ dlls/crtdll \
dlls/display \ dlls/display \
dlls/mouse \ dlls/mouse \
dlls/mpr \
dlls/ntdll \ dlls/ntdll \
files \ files \
graphics \ graphics \
@ -111,7 +110,6 @@ LIBOBJS = \
dlls/crtdll/crtdll.o \ dlls/crtdll/crtdll.o \
dlls/display/display.o \ dlls/display/display.o \
dlls/mouse/mouse.o \ dlls/mouse/mouse.o \
dlls/mpr/mpr.o \
dlls/ntdll/ntdll.o \ dlls/ntdll/ntdll.o \
files/files.o \ files/files.o \
graphics/graphics.o \ graphics/graphics.o \

View File

@ -14,6 +14,7 @@ DLLFILES = \
imagehlp/libimagehlp.@LIBEXT@ \ imagehlp/libimagehlp.@LIBEXT@ \
imm32/libimm32.@LIBEXT@ \ imm32/libimm32.@LIBEXT@ \
lzexpand/liblz32.@LIBEXT@ \ lzexpand/liblz32.@LIBEXT@ \
mpr/libmpr.@LIBEXT@ \
msacm/libmsacm.@LIBEXT@ \ msacm/libmsacm.@LIBEXT@ \
msacm32/libmsacm32.@LIBEXT@ \ msacm32/libmsacm32.@LIBEXT@ \
msnet32/libmsnet32.@LIBEXT@ \ msnet32/libmsnet32.@LIBEXT@ \
@ -132,6 +133,9 @@ libmciwave.drv.@LIBEXT@: winmm/mciwave/libmciwave.drv.@LIBEXT@
libmidimap.drv.@LIBEXT@: winmm/midimap/libmidimap.drv.@LIBEXT@ libmidimap.drv.@LIBEXT@: winmm/midimap/libmidimap.drv.@LIBEXT@
$(RM) $@ && $(LN_S) winmm/midimap/libmidimap.drv.@LIBEXT@ $@ $(RM) $@ && $(LN_S) winmm/midimap/libmidimap.drv.@LIBEXT@ $@
libmpr.@LIBEXT@: mpr/libmpr.@LIBEXT@
$(RM) $@ && $(LN_S) mpr/libmpr.@LIBEXT@ $@
libmsacm.@LIBEXT@: msacm/libmsacm.@LIBEXT@ libmsacm.@LIBEXT@: msacm/libmsacm.@LIBEXT@
$(RM) $@ && $(LN_S) msacm/libmsacm.@LIBEXT@ $@ $(RM) $@ && $(LN_S) msacm/libmsacm.@LIBEXT@ $@

View File

@ -1,2 +1,3 @@
Makefile Makefile
libmpr.so.1.0
mpr.spec.c mpr.spec.c

View File

@ -1,9 +1,9 @@
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = mpr MODULE = mpr
SOVERSION = 1.0
SPEC_SRCS = mpr.spec SPEC_SRCS = mpr.spec
@ -15,9 +15,7 @@ C_SRCS = \
pwcache.c \ pwcache.c \
wnet.c wnet.c
all: $(MODULE).o @MAKE_DLL_RULES@
@MAKE_RULES@
### Dependencies: ### Dependencies:

View File

@ -147,7 +147,9 @@ WORD WINAPI WNetUnlockQueueData16( LPSTR szQueue )
WORD WINAPI WNetAddConnection16( LPSTR lpNetPath, LPSTR lpPassWord, WORD WINAPI WNetAddConnection16( LPSTR lpNetPath, LPSTR lpPassWord,
LPSTR lpLocalName ) LPSTR lpLocalName )
{ {
return WNetAddConnectionA( lpNetPath, lpPassWord, lpLocalName ); FIXME( "(%s, %p, %s): stub\n",
debugstr_a(lpNetPath), lpPassWord, debugstr_a(lpLocalName) );
return WN16_NET_ERROR;
} }
/******************************************************************** /********************************************************************
@ -165,10 +167,36 @@ WORD WINAPI WNetCancelConnection16( LPSTR lpName, BOOL16 bForce )
WORD WINAPI WNetGetConnection16( LPSTR lpLocalName, WORD WINAPI WNetGetConnection16( LPSTR lpLocalName,
LPSTR lpRemoteName, UINT16 *cbRemoteName ) LPSTR lpRemoteName, UINT16 *cbRemoteName )
{ {
DWORD len = *cbRemoteName; const char *path;
WORD retv = WNetGetConnectionA( lpLocalName, lpRemoteName, &len );
*cbRemoteName = (UINT16)len; TRACE( "local %s\n", lpLocalName );
return retv; if (lpLocalName[1] == ':')
{
int drive = toupper(lpLocalName[0]) - 'A';
switch(DRIVE_GetType(drive))
{
case TYPE_INVALID:
return WN16_BAD_LOCALNAME;
case TYPE_NETWORK:
path = DRIVE_GetLabel(drive);
if (strlen(path) + 1 > *cbRemoteName)
{
*cbRemoteName = strlen(path) + 1;
return WN16_MORE_DATA;
}
strcpy( lpRemoteName, path );
*cbRemoteName = strlen(lpRemoteName) + 1;
return WN16_SUCCESS;
case TYPE_FLOPPY:
case TYPE_HD:
case TYPE_CDROM:
TRACE("file is local\n");
return WN16_NOT_CONNECTED;
default:
return WN16_BAD_LOCALNAME;
}
}
return WN16_BAD_LOCALNAME;
} }
/************************************************************************** /**************************************************************************