msvideo16: Make msvideo16 a separate 16-bit module.

This commit is contained in:
Eric Pouech 2009-05-14 21:36:39 +02:00 committed by Alexandre Julliard
parent 33a04dc69c
commit b8aa4e4fc7
9 changed files with 49 additions and 33 deletions

1
.gitignore vendored
View File

@ -53,7 +53,6 @@ dlls/msi/sql.tab.c
dlls/msi/sql.tab.h
dlls/mstask/mstask_local.h
dlls/mstask/mstask_local_i.c
dlls/msvideo.dll16
dlls/msxml3/msxml3_v1.tlb
dlls/ole32/dcom.h
dlls/ole32/dcom_p.c

9
configure vendored
View File

@ -26181,6 +26181,14 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/msvidc32/Makefile: dlls/msvidc32/Makefile.in dlls/Makedll.rules"
ac_config_files="$ac_config_files dlls/msvidc32/Makefile"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/msvideo.dll16/Makefile"
test "x$enable_win16" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\
msvideo.dll16"
ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/msvideo.dll16/Makefile: dlls/msvideo.dll16/Makefile.in dlls/Makedll.rules"
ac_config_files="$ac_config_files dlls/msvideo.dll16/Makefile"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/mswsock/Makefile"
test "x$enable_mswsock" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\
@ -29192,6 +29200,7 @@ do
"dlls/msvfw32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvfw32/Makefile" ;;
"dlls/msvfw32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvfw32/tests/Makefile" ;;
"dlls/msvidc32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvidc32/Makefile" ;;
"dlls/msvideo.dll16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvideo.dll16/Makefile" ;;
"dlls/mswsock/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/mswsock/Makefile" ;;
"dlls/msxml3/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msxml3/Makefile" ;;
"dlls/msxml3/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msxml3/tests/Makefile" ;;

View File

@ -2118,6 +2118,7 @@ WINE_CONFIG_MAKEFILE([dlls/msvcrtd/tests/Makefile],[dlls/Maketest.rules],[dlls],
WINE_CONFIG_MAKEFILE([dlls/msvfw32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/msvfw32/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
WINE_CONFIG_MAKEFILE([dlls/msvidc32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/msvideo.dll16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16])
WINE_CONFIG_MAKEFILE([dlls/mswsock/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/msxml3/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/msxml3/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])

View File

@ -22,7 +22,6 @@ WIN16_FILES = \
gdi.exe16 \
krnl386.exe16 \
mmsystem.dll16 \
msvideo.dll16 \
setupx.dll16 \
system.drv16 \
toolhelp.dll16 \
@ -50,9 +49,6 @@ gdi.exe16 wing.dll16:
krnl386.exe16 system.drv16 toolhelp.dll16:
echo "kernel32.dll" >$@
msvideo.dll16:
echo "msvfw32.dll" >$@
setupx.dll16:
echo "setupapi.dll" >$@

View File

@ -11,11 +11,6 @@ C_SRCS = \
msvideo_main.c \
drawdib.c
C_SRCS16 = \
msvideo16.c
SPEC_SRCS16 = msvideo.spec
RC_SRCS = rsrc.rc
@MAKE_DLL_RULES@

View File

@ -0,0 +1,16 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = msvideo.dll16
IMPORTS = msvfw32 version advapi32 kernel32
EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,msvfw32.dll
SPEC_SRCS = msvideo.dll16.spec
C_SRCS = msvideo16.c
@MAKE_DLL_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend

View File

@ -156,7 +156,7 @@ LRESULT VFWAPIV ICMessage16( HIC16 hic, UINT16 msg, UINT16 cb, VA_LIST16 valist
TRACE("0x%08x, %u, %u, ...)\n", (DWORD) hic, msg, cb);
for (i = 0; i < cb / sizeof(WORD); i++)
for (i = 0; i < cb / sizeof(WORD); i++)
{
lpData[i] = VA_ARG16(valist, WORD);
}
@ -186,7 +186,7 @@ LRESULT VFWAPI ICGetInfo16(HIC16 hic, ICINFO16 * picinfo, DWORD cb)
*/
HIC16 VFWAPI ICLocate16(DWORD fccType, DWORD fccHandler,
LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut,
WORD wFlags)
WORD wFlags)
{
return HIC_16(ICLocate(fccType, fccHandler, lpbiIn, lpbiOut, wFlags));
}
@ -205,7 +205,7 @@ DWORD VFWAPIV ICCompress16(HIC16 hic, DWORD dwFlags,
DWORD ret;
ICCOMPRESS iccmp;
SEGPTR seg_iccmp;
TRACE("(0x%08x,%d,%p,%p,%p,%p,...)\n", (DWORD) hic, dwFlags,
lpbiOutput, lpData, lpbiInput, lpBits);
@ -350,7 +350,7 @@ HIC16 VFWAPI ICGetDisplayFormat16(HIC16 hic, LPBITMAPINFOHEADER lpbiIn,
*
*
*/
static LPVOID MSVIDEO_MapICDEX16To32(LPDWORD lParam)
static LPVOID MSVIDEO_MapICDEX16To32(LPDWORD lParam)
{
LPVOID ret;
@ -387,7 +387,7 @@ static LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2)
TRACE("Mapping %d\n", msg);
switch (msg)
switch (msg)
{
case DRV_LOAD:
case DRV_ENABLE:
@ -418,10 +418,10 @@ static LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2)
{
ICINFO *ici = HeapAlloc(GetProcessHeap(), 0, sizeof(ICINFO));
ICINFO16 *ici16;
ici16 = MapSL(*lParam1);
ret = ici16;
ici->dwSize = sizeof(ICINFO);
COPY(ici, fccType);
COPY(ici, fccHandler);
@ -503,7 +503,7 @@ static LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2)
addr[1] = MSVIDEO_MapICDEX16To32(lParam2);
else
addr[1] = 0;
ret = addr;
}
break;*/
@ -597,7 +597,7 @@ static void MSVIDEO_UnmapMsg16To32(UINT msg, LPVOID data16, LPDWORD lParam1, LPD
#define UNCOPY(x, y) (x##16->y = x->y);
switch (msg)
switch (msg)
{
case ICM_GETINFO:
{
@ -609,10 +609,10 @@ static void MSVIDEO_UnmapMsg16To32(UINT msg, LPVOID data16, LPDWORD lParam1, LPD
UNCOPY(ici, dwFlags);
UNCOPY(ici, dwVersion);
UNCOPY(ici, dwVersionICM);
WideCharToMultiByte( CP_ACP, 0, ici->szName, -1, ici16->szName,
WideCharToMultiByte( CP_ACP, 0, ici->szName, -1, ici16->szName,
sizeof(ici16->szName), NULL, NULL );
ici16->szName[sizeof(ici16->szName)-1] = 0;
WideCharToMultiByte( CP_ACP, 0, ici->szDescription, -1, ici16->szDescription,
WideCharToMultiByte( CP_ACP, 0, ici->szDescription, -1, ici16->szDescription,
sizeof(ici16->szDescription), NULL, NULL );
ici16->szDescription[sizeof(ici16->szDescription)-1] = 0;
/* This just gives garbage for some reason - BB
@ -654,7 +654,7 @@ BOOL16 VFWAPI ICInfo16(DWORD fccType, DWORD fccHandler, ICINFO16 *lpicinfo)
LPVOID lpv;
DWORD lParam = (DWORD)lpicinfo;
DWORD size = ((ICINFO*)(MapSL((SEGPTR)lpicinfo)))->dwSize;
/* Use the mapping functions to map the ICINFO structure */
lpv = MSVIDEO_MapMsg16To32(ICM_GETINFO, &lParam, &size);
@ -786,7 +786,7 @@ HIC16 VFWAPI ICOpenFunction16(DWORD fccType, DWORD fccHandler, UINT16 wMode, FAR
/***********************************************************************
* ICSendMessage [MSVIDEO.205]
*/
LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD lParam1, DWORD lParam2)
LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD lParam1, DWORD lParam2)
{
LRESULT ret = ICERR_BADHANDLE;
struct msvideo_thunk* thunk;
@ -864,10 +864,10 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len,
TRACE("(%d,%p,%d,%p,%d)\n", nr, buf1, buf1len, buf2, buf2len);
lRet = RegOpenKeyExA(HKEY_LOCAL_MACHINE, HKLM_DRIVERS32, 0, KEY_QUERY_VALUE, &hKey);
if (lRet == ERROR_SUCCESS)
if (lRet == ERROR_SUCCESS)
{
RegQueryInfoKeyA( hKey, 0, 0, 0, &cnt, 0, 0, 0, 0, 0, 0, 0);
for (i = 0; i < cnt; i++)
for (i = 0; i < cnt; i++)
{
bufLen = sizeof(buf) / sizeof(buf[0]);
lRet = RegEnumKeyExA(hKey, i, buf, &bufLen, 0, 0, 0, &lastWrite);
@ -879,8 +879,8 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len,
if (lRet == ERROR_SUCCESS) found = TRUE;
break;
}
RegCloseKey( hKey );
}
RegCloseKey( hKey );
}
/* search system.ini if not found in the registry */
if (!found && GetPrivateProfileStringA("drivers32", NULL, NULL, buf, sizeof(buf), "system.ini"))
@ -901,13 +901,13 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len,
return 20;
}
infosize = GetFileVersionInfoSizeA(fn, &verhandle);
if (!infosize)
if (!infosize)
{
TRACE("%s has no fileversioninfo.\n", fn);
return 18;
}
infobuf = HeapAlloc(GetProcessHeap(), 0, infosize);
if (GetFileVersionInfoA(fn, verhandle, infosize, infobuf))
if (GetFileVersionInfoA(fn, verhandle, infosize, infobuf))
{
/* Yes, two space behind : */
/* FIXME: test for buflen */
@ -919,7 +919,7 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len,
);
TRACE("version of %s is %s\n", fn, buf2);
}
else
else
{
TRACE("GetFileVersionInfoA failed for %s.\n", fn);
lstrcpynA(buf2, fn, buf2len); /* msvideo.dll appears to copy fn*/
@ -929,14 +929,14 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len,
version_info_spec,
&subblock,
&subblocklen
))
))
{
UINT copylen = min(subblocklen,buf1len-1);
memcpy(buf1, subblock, copylen);
buf1[copylen] = '\0';
TRACE("VQA returned %s\n", (LPCSTR)subblock);
}
else
else
{
TRACE("VQA did not return on query \\StringFileInfo\\040904E4\\FileDescription?\n");
lstrcpynA(buf1, fn, buf1len); /* msvideo.dll appears to copy fn*/
@ -954,7 +954,7 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len,
BOOL WINAPI VIDEO_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds,
WORD wHeapSize, DWORD dwReserved1, WORD wReserved2)
{
switch (fdwReason)
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
break;