VxDCall functions do not need to be 'register'.

This commit is contained in:
Alexandre Julliard 1999-05-13 14:42:14 +00:00
parent 936d663b03
commit fd45627724
2 changed files with 188 additions and 189 deletions

View File

@ -15,15 +15,15 @@ import ntdll.dll
# - code generated by the MS Thunk Compiler # - code generated by the MS Thunk Compiler
# - symbols exported by the Oct 94 beta version of kernel32.dll # - symbols exported by the Oct 94 beta version of kernel32.dll
1 register VxDCall0() VxDCall0 1 stdcall VxDCall0(long ) VxDCall0
2 register VxDCall1() VxDCall1 2 stdcall VxDCall1(long long) VxDCall1
3 register VxDCall2() VxDCall2 3 stdcall VxDCall2(long long long) VxDCall2
4 register VxDCall3() VxDCall3 4 stdcall VxDCall3(long long long long) VxDCall3
5 register VxDCall4() VxDCall4 5 stdcall VxDCall4(long long long long long) VxDCall4
6 register VxDCall5() VxDCall5 6 stdcall VxDCall5(long long long long long long) VxDCall5
7 register VxDCall6() VxDCall6 7 stdcall VxDCall6(long long long long long long long) VxDCall6
8 register VxDCall7() VxDCall7 8 stdcall VxDCall7(long long long long long long long long) VxDCall7
9 register VxDCall8() VxDCall8 9 stdcall VxDCall8(long long long long long long long long long) VxDCall8
10 stdcall k32CharToOemA(str str) CharToOemA 10 stdcall k32CharToOemA(str str) CharToOemA
11 stdcall k32CharToOemBuffA(str str long) CharToOemBuffA 11 stdcall k32CharToOemBuffA(str str long) CharToOemBuffA
12 stdcall k32OemToCharA(ptr ptr) OemToCharA 12 stdcall k32OemToCharA(ptr ptr) OemToCharA

View File

@ -16,6 +16,7 @@
#include <sys/mman.h> #include <sys/mman.h>
#include <fcntl.h> #include <fcntl.h>
#include <string.h> #include <string.h>
#include <stdarg.h>
#include <time.h> #include <time.h>
#include "winbase.h" #include "winbase.h"
#include "winreg.h" #include "winreg.h"
@ -24,13 +25,12 @@
#include "process.h" #include "process.h"
#include "mmsystem.h" #include "mmsystem.h"
#include "heap.h" #include "heap.h"
#include "debug.h"
#include "winioctl.h" #include "winioctl.h"
#include "stackframe.h"
#include "winnt.h" #include "winnt.h"
#include "msdos.h" #include "msdos.h"
#include "miscemu.h" #include "miscemu.h"
#include "server.h" #include "server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win32) DEFAULT_DEBUG_CHANNEL(win32)
@ -51,7 +51,7 @@ static BOOL DeviceIo_MMDEVLDR(DWORD dwIoControlCode,
LPDWORD lpcbBytesReturned, LPDWORD lpcbBytesReturned,
LPOVERLAPPED lpOverlapped); LPOVERLAPPED lpOverlapped);
static BOOL VxDCall_VMM( DWORD *retv, DWORD service, CONTEXT *context ); static DWORD VxDCall_VMM( DWORD service, va_list args );
static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode, static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode,
LPVOID lpvInBuffer, DWORD cbInBuffer, LPVOID lpvInBuffer, DWORD cbInBuffer,
@ -73,7 +73,7 @@ struct VxDInfo
{ {
LPCSTR name; LPCSTR name;
WORD id; WORD id;
BOOL (*vxdcall)(DWORD *, DWORD, CONTEXT *); DWORD (*vxdcall)(DWORD, va_list);
BOOL (*deviceio)(DWORD, LPVOID, DWORD, BOOL (*deviceio)(DWORD, LPVOID, DWORD,
LPVOID, DWORD, LPDWORD, LPOVERLAPPED); LPVOID, DWORD, LPDWORD, LPOVERLAPPED);
}; };
@ -272,7 +272,7 @@ HANDLE DEVICE_Open( LPCSTR filename, DWORD access,
if (!lstrcmpiA( info->name, filename )) if (!lstrcmpiA( info->name, filename ))
return FILE_CreateDevice( info->id | 0x10000, access, sa ); return FILE_CreateDevice( info->id | 0x10000, access, sa );
FIXME(win32, "Unknown VxD %s\n", filename); FIXME( "Unknown VxD %s\n", filename);
return FILE_CreateDevice( 0x10000, access, sa ); return FILE_CreateDevice( 0x10000, access, sa );
} }
@ -313,10 +313,9 @@ BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
{ {
const struct VxDInfo *info; const struct VxDInfo *info;
TRACE(win32, "(%d,%ld,%p,%ld,%p,%ld,%p,%p)\n", TRACE( "(%d,%ld,%p,%ld,%p,%ld,%p,%p)\n",
hDevice,dwIoControlCode,lpvInBuffer,cbInBuffer, hDevice,dwIoControlCode,lpvInBuffer,cbInBuffer,
lpvOutBuffer,cbOutBuffer,lpcbBytesReturned,lpOverlapped lpvOutBuffer,cbOutBuffer,lpcbBytesReturned,lpOverlapped );
);
if (!(info = DEVICE_GetInfo( hDevice ))) if (!(info = DEVICE_GetInfo( hDevice )))
{ {
@ -337,7 +336,7 @@ BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
else else
{ {
/* FIXME: Set appropriate error */ /* FIXME: Set appropriate error */
FIXME( win32, "Unimplemented control %ld for VxD device %s\n", FIXME( "Unimplemented control %ld for VxD device %s\n",
dwIoControlCode, info->name ? info->name : "???" ); dwIoControlCode, info->name ? info->name : "???" );
} }
} }
@ -376,12 +375,12 @@ BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
case IOCTL_STORAGE_GET_MEDIA_TYPES: case IOCTL_STORAGE_GET_MEDIA_TYPES:
case IOCTL_STORAGE_LOAD_MEDIA: case IOCTL_STORAGE_LOAD_MEDIA:
case IOCTL_STORAGE_MEDIA_REMOVAL: case IOCTL_STORAGE_MEDIA_REMOVAL:
FIXME( win32, "unimplemented dwIoControlCode=%08lx\n", dwIoControlCode); FIXME( "unimplemented dwIoControlCode=%08lx\n", dwIoControlCode);
SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
return FALSE; return FALSE;
break; break;
default: default:
FIXME( win32, "ignored dwIoControlCode=%08lx\n",dwIoControlCode); FIXME( "ignored dwIoControlCode=%08lx\n",dwIoControlCode);
SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
return FALSE; return FALSE;
break; break;
@ -412,7 +411,7 @@ static BOOL DeviceIo_VTDAPI(DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbI
break; break;
default: default:
FIXME(win32, "Control %ld not implemented\n", dwIoControlCode); FIXME( "Control %ld not implemented\n", dwIoControlCode);
retv = FALSE; retv = FALSE;
break; break;
} }
@ -427,183 +426,194 @@ static BOOL DeviceIo_VTDAPI(DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbI
/*********************************************************************** /***********************************************************************
* VxDCall (KERNEL32.[1-9]) * VxDCall (KERNEL32.[1-9])
*/ */
static void VxDCall( CONTEXT *context, int nArgs ) static DWORD VxDCall( DWORD service, ... )
{ {
DWORD retv, service; DWORD ret = 0xffffffff; /* FIXME */
int i, ok = FALSE; int i;
/* Pop return address to caller */ TRACE( "(%08lx, ...)\n", service);
EIP_reg(context) = STACK32_POP(context);
/* Pop requested service ID */
service = STACK32_POP(context);
TRACE(win32, "(%08lx, ...)\n", service);
for (i = 0; VxDList[i].name; i++) for (i = 0; VxDList[i].name; i++)
if (VxDList[i].id == HIWORD(service)) if (VxDList[i].id == HIWORD(service))
break; break;
if (!VxDList[i].name) if (!VxDList[i].name)
FIXME(win32, "Unknown VxD (%08lx)\n", service); FIXME( "Unknown VxD (%08lx)\n", service);
else if (!VxDList[i].vxdcall) else if (!VxDList[i].vxdcall)
FIXME(win32, "Unimplemented VxD (%08lx)\n", service); FIXME( "Unimplemented VxD (%08lx)\n", service);
else else
ok = VxDList[i].vxdcall(&retv, service, context);
/* If unimplemented, trust the caller to have called the
version with the correct number of arguments */
if (!ok)
{ {
ESP_reg(context) += 4 * nArgs; va_list args;
retv = 0xffffffff; /* FIXME */ va_start( args, service );
ret = VxDList[i].vxdcall( service, args );
va_end( args );
} }
return ret;
/* Push return address back onto stack */
STACK32_PUSH(context, EIP_reg(context));
/* Return to caller */
EAX_reg(context) = retv;
} }
REGS_ENTRYPOINT(VxDCall0) { VxDCall( context, 0 ); } DWORD WINAPI VxDCall0( DWORD service )
REGS_ENTRYPOINT(VxDCall1) { VxDCall( context, 1 ); } {
REGS_ENTRYPOINT(VxDCall2) { VxDCall( context, 2 ); } return VxDCall( service );
REGS_ENTRYPOINT(VxDCall3) { VxDCall( context, 3 ); } }
REGS_ENTRYPOINT(VxDCall4) { VxDCall( context, 4 ); }
REGS_ENTRYPOINT(VxDCall5) { VxDCall( context, 5 ); } DWORD WINAPI VxDCall1( DWORD service, DWORD arg1 )
REGS_ENTRYPOINT(VxDCall6) { VxDCall( context, 6 ); } {
REGS_ENTRYPOINT(VxDCall7) { VxDCall( context, 7 ); } return VxDCall( service, arg1 );
REGS_ENTRYPOINT(VxDCall8) { VxDCall( context, 8 ); } }
DWORD WINAPI VxDCall2( DWORD service, DWORD arg1, DWORD arg2 )
{
return VxDCall( service, arg1, arg2 );
}
DWORD WINAPI VxDCall3( DWORD service, DWORD arg1, DWORD arg2, DWORD arg3 )
{
return VxDCall( service, arg1, arg2, arg3 );
}
DWORD WINAPI VxDCall4( DWORD service, DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4 )
{
return VxDCall( service, arg1, arg2, arg3, arg4 );
}
DWORD WINAPI VxDCall5( DWORD service, DWORD arg1, DWORD arg2, DWORD arg3,
DWORD arg4, DWORD arg5 )
{
return VxDCall( service, arg1, arg2, arg3, arg4, arg5 );
}
DWORD WINAPI VxDCall6( DWORD service, DWORD arg1, DWORD arg2, DWORD arg3,
DWORD arg4, DWORD arg5, DWORD arg6 )
{
return VxDCall( service, arg1, arg2, arg3, arg4, arg5, arg6 );
}
DWORD WINAPI VxDCall7( DWORD service, DWORD arg1, DWORD arg2, DWORD arg3,
DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7 )
{
return VxDCall( service, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
}
DWORD WINAPI VxDCall8( DWORD service, DWORD arg1, DWORD arg2, DWORD arg3,
DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8 )
{
return VxDCall( service, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 );
}
/*********************************************************************** /***********************************************************************
* VxDCall_VMM * VxDCall_VMM
*/ */
BOOL VxDCall_VMM( DWORD *retv, DWORD service, CONTEXT *context ) static DWORD VxDCall_VMM( DWORD service, va_list args )
{ {
BOOL ok = TRUE;
switch ( LOWORD(service) ) switch ( LOWORD(service) )
{ {
case 0x0011: /* RegOpenKey */ case 0x0011: /* RegOpenKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPCSTR lpszSubKey = (LPCSTR) STACK32_POP( context ); LPCSTR lpszSubKey = va_arg( args, LPCSTR );
LPHKEY retkey = (LPHKEY) STACK32_POP( context ); LPHKEY retkey = va_arg( args, LPHKEY );
*retv = RegOpenKeyA( hkey, lpszSubKey, retkey ); return RegOpenKeyA( hkey, lpszSubKey, retkey );
} }
break;
case 0x0012: /* RegCreateKey */ case 0x0012: /* RegCreateKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPCSTR lpszSubKey = (LPCSTR) STACK32_POP( context ); LPCSTR lpszSubKey = va_arg( args, LPCSTR );
LPHKEY retkey = (LPHKEY) STACK32_POP( context ); LPHKEY retkey = va_arg( args, LPHKEY );
*retv = RegCreateKeyA( hkey, lpszSubKey, retkey ); return RegCreateKeyA( hkey, lpszSubKey, retkey );
} }
break;
case 0x0013: /* RegCloseKey */ case 0x0013: /* RegCloseKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
*retv = RegCloseKey( hkey ); return RegCloseKey( hkey );
} }
break;
case 0x0014: /* RegDeleteKey */ case 0x0014: /* RegDeleteKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPCSTR lpszSubKey = (LPCSTR) STACK32_POP( context ); LPCSTR lpszSubKey = va_arg( args, LPCSTR );
*retv = RegDeleteKeyA( hkey, lpszSubKey ); return RegDeleteKeyA( hkey, lpszSubKey );
} }
break;
case 0x0015: /* RegSetValue */ case 0x0015: /* RegSetValue */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPCSTR lpszSubKey = (LPCSTR) STACK32_POP( context ); LPCSTR lpszSubKey = va_arg( args, LPCSTR );
DWORD dwType = (DWORD) STACK32_POP( context ); DWORD dwType = va_arg( args, DWORD );
LPCSTR lpszData = (LPCSTR) STACK32_POP( context ); LPCSTR lpszData = va_arg( args, LPCSTR );
DWORD cbData = (DWORD) STACK32_POP( context ); DWORD cbData = va_arg( args, DWORD );
*retv = RegSetValueA( hkey, lpszSubKey, dwType, lpszData, cbData ); return RegSetValueA( hkey, lpszSubKey, dwType, lpszData, cbData );
} }
break;
case 0x0016: /* RegDeleteValue */ case 0x0016: /* RegDeleteValue */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPSTR lpszValue = (LPSTR) STACK32_POP( context ); LPSTR lpszValue = va_arg( args, LPSTR );
*retv = RegDeleteValueA( hkey, lpszValue ); return RegDeleteValueA( hkey, lpszValue );
} }
break;
case 0x0017: /* RegQueryValue */ case 0x0017: /* RegQueryValue */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPSTR lpszSubKey = (LPSTR) STACK32_POP( context ); LPSTR lpszSubKey = va_arg( args, LPSTR );
LPSTR lpszData = (LPSTR) STACK32_POP( context ); LPSTR lpszData = va_arg( args, LPSTR );
LPDWORD lpcbData = (LPDWORD)STACK32_POP( context ); LPDWORD lpcbData = va_arg( args, LPDWORD );
*retv = RegQueryValueA( hkey, lpszSubKey, lpszData, lpcbData ); return RegQueryValueA( hkey, lpszSubKey, lpszData, lpcbData );
} }
break;
case 0x0018: /* RegEnumKey */ case 0x0018: /* RegEnumKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
DWORD iSubkey = (DWORD) STACK32_POP( context ); DWORD iSubkey = va_arg( args, DWORD );
LPSTR lpszName = (LPSTR) STACK32_POP( context ); LPSTR lpszName = va_arg( args, LPSTR );
DWORD lpcchName = (DWORD) STACK32_POP( context ); DWORD lpcchName = va_arg( args, DWORD );
*retv = RegEnumKeyA( hkey, iSubkey, lpszName, lpcchName ); return RegEnumKeyA( hkey, iSubkey, lpszName, lpcchName );
} }
break;
case 0x0019: /* RegEnumValue */ case 0x0019: /* RegEnumValue */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
DWORD iValue = (DWORD) STACK32_POP( context ); DWORD iValue = va_arg( args, DWORD );
LPSTR lpszValue = (LPSTR) STACK32_POP( context ); LPSTR lpszValue = va_arg( args, LPSTR );
LPDWORD lpcchValue = (LPDWORD)STACK32_POP( context ); LPDWORD lpcchValue = va_arg( args, LPDWORD );
LPDWORD lpReserved = (LPDWORD)STACK32_POP( context ); LPDWORD lpReserved = va_arg( args, LPDWORD );
LPDWORD lpdwType = (LPDWORD)STACK32_POP( context ); LPDWORD lpdwType = va_arg( args, LPDWORD );
LPBYTE lpbData = (LPBYTE) STACK32_POP( context ); LPBYTE lpbData = va_arg( args, LPBYTE );
LPDWORD lpcbData = (LPDWORD)STACK32_POP( context ); LPDWORD lpcbData = va_arg( args, LPDWORD );
*retv = RegEnumValueA( hkey, iValue, lpszValue, lpcchValue, return RegEnumValueA( hkey, iValue, lpszValue, lpcchValue,
lpReserved, lpdwType, lpbData, lpcbData ); lpReserved, lpdwType, lpbData, lpcbData );
} }
break;
case 0x001A: /* RegQueryValueEx */ case 0x001A: /* RegQueryValueEx */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPSTR lpszValue = (LPSTR) STACK32_POP( context ); LPSTR lpszValue = va_arg( args, LPSTR );
LPDWORD lpReserved = (LPDWORD)STACK32_POP( context ); LPDWORD lpReserved = va_arg( args, LPDWORD );
LPDWORD lpdwType = (LPDWORD)STACK32_POP( context ); LPDWORD lpdwType = va_arg( args, LPDWORD );
LPBYTE lpbData = (LPBYTE) STACK32_POP( context ); LPBYTE lpbData = va_arg( args, LPBYTE );
LPDWORD lpcbData = (LPDWORD)STACK32_POP( context ); LPDWORD lpcbData = va_arg( args, LPDWORD );
*retv = RegQueryValueExA( hkey, lpszValue, lpReserved, return RegQueryValueExA( hkey, lpszValue, lpReserved,
lpdwType, lpbData, lpcbData ); lpdwType, lpbData, lpcbData );
} }
break;
case 0x001B: /* RegSetValueEx */ case 0x001B: /* RegSetValueEx */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPSTR lpszValue = (LPSTR) STACK32_POP( context ); LPSTR lpszValue = va_arg( args, LPSTR );
DWORD dwReserved = (DWORD) STACK32_POP( context ); DWORD dwReserved = va_arg( args, DWORD );
DWORD dwType = (DWORD) STACK32_POP( context ); DWORD dwType = va_arg( args, DWORD );
LPBYTE lpbData = (LPBYTE) STACK32_POP( context ); LPBYTE lpbData = va_arg( args, LPBYTE );
DWORD cbData = (DWORD)STACK32_POP( context ); DWORD cbData = va_arg( args, DWORD );
*retv = RegSetValueExA( hkey, lpszValue, dwReserved, return RegSetValueExA( hkey, lpszValue, dwReserved,
dwType, lpbData, cbData ); dwType, lpbData, cbData );
} }
break;
case 0x001C: /* RegFlushKey */ case 0x001C: /* RegFlushKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
*retv = RegFlushKey( hkey ); return RegFlushKey( hkey );
} }
break;
case 0x001D: /* RegQueryInfoKey */ case 0x001D: /* RegQueryInfoKey */
{ {
@ -611,47 +621,39 @@ BOOL VxDCall_VMM( DWORD *retv, DWORD service, CONTEXT *context )
corresponding Win32 API call does. The implementation in Win95 corresponding Win32 API call does. The implementation in Win95
ADVAPI32 sets all output parameters not mentioned here to zero. */ ADVAPI32 sets all output parameters not mentioned here to zero. */
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPDWORD lpcSubKeys = (LPDWORD)STACK32_POP( context ); LPDWORD lpcSubKeys = va_arg( args, LPDWORD );
LPDWORD lpcchMaxSubKey LPDWORD lpcchMaxSubKey = va_arg( args, LPDWORD );
= (LPDWORD)STACK32_POP( context ); LPDWORD lpcValues = va_arg( args, LPDWORD );
LPDWORD lpcValues = (LPDWORD)STACK32_POP( context ); LPDWORD lpcchMaxValueName = va_arg( args, LPDWORD );
LPDWORD lpcchMaxValueName LPDWORD lpcchMaxValueData = va_arg( args, LPDWORD );
= (LPDWORD)STACK32_POP( context ); return RegQueryInfoKeyA( hkey, NULL, NULL, NULL, lpcSubKeys, lpcchMaxSubKey,
LPDWORD lpcchMaxValueData NULL, lpcValues, lpcchMaxValueName, lpcchMaxValueData,
= (LPDWORD)STACK32_POP( context ); NULL, NULL );
*retv = RegQueryInfoKeyA( hkey, NULL, NULL, NULL, lpcSubKeys, lpcchMaxSubKey,
NULL, lpcValues, lpcchMaxValueName, lpcchMaxValueData,
NULL, NULL );
} }
break;
case 0x0021: /* RegLoadKey */ case 0x0021: /* RegLoadKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPCSTR lpszSubKey = (LPCSTR) STACK32_POP( context ); LPCSTR lpszSubKey = va_arg( args, LPCSTR );
LPCSTR lpszFile = (LPCSTR) STACK32_POP( context ); LPCSTR lpszFile = va_arg( args, LPCSTR );
*retv = RegLoadKeyA( hkey, lpszSubKey, lpszFile ); return RegLoadKeyA( hkey, lpszSubKey, lpszFile );
} }
break;
case 0x0022: /* RegUnLoadKey */ case 0x0022: /* RegUnLoadKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPCSTR lpszSubKey = (LPCSTR) STACK32_POP( context ); LPCSTR lpszSubKey = va_arg( args, LPCSTR );
*retv = RegUnLoadKeyA( hkey, lpszSubKey ); return RegUnLoadKeyA( hkey, lpszSubKey );
} }
break;
case 0x0023: /* RegSaveKey */ case 0x0023: /* RegSaveKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPCSTR lpszFile = (LPCSTR) STACK32_POP( context ); LPCSTR lpszFile = va_arg( args, LPCSTR );
LPSECURITY_ATTRIBUTES sa = LPSECURITY_ATTRIBUTES sa = va_arg( args, LPSECURITY_ATTRIBUTES );
(LPSECURITY_ATTRIBUTES)STACK32_POP( context ); return RegSaveKeyA( hkey, lpszFile, sa );
*retv = RegSaveKeyA( hkey, lpszFile, sa );
} }
break;
#if 0 /* Functions are not yet implemented in misc/registry.c */ #if 0 /* Functions are not yet implemented in misc/registry.c */
case 0x0024: /* RegRemapPreDefKey */ case 0x0024: /* RegRemapPreDefKey */
@ -660,26 +662,23 @@ BOOL VxDCall_VMM( DWORD *retv, DWORD service, CONTEXT *context )
case 0x0027: /* RegReplaceKey */ case 0x0027: /* RegReplaceKey */
{ {
HKEY hkey = (HKEY) STACK32_POP( context ); HKEY hkey = va_arg( args, HKEY );
LPCSTR lpszSubKey = (LPCSTR) STACK32_POP( context ); LPCSTR lpszSubKey = va_arg( args, LPCSTR );
LPCSTR lpszNewFile= (LPCSTR) STACK32_POP( context ); LPCSTR lpszNewFile= va_arg( args, LPCSTR );
LPCSTR lpszOldFile= (LPCSTR) STACK32_POP( context ); LPCSTR lpszOldFile= va_arg( args, LPCSTR );
*retv = RegReplaceKeyA( hkey, lpszSubKey, lpszNewFile, lpszOldFile ); return RegReplaceKeyA( hkey, lpszSubKey, lpszNewFile, lpszOldFile );
} }
break;
default: default:
if (LOWORD(service) < N_VMM_SERVICE) if (LOWORD(service) < N_VMM_SERVICE)
FIXME(win32, "Unimplemented service %s (%08lx)\n", FIXME( "Unimplemented service %s (%08lx)\n",
VMM_Service_Name[LOWORD(service)], service); VMM_Service_Name[LOWORD(service)], service);
else else
FIXME(win32, "Unknown service %08lx\n", service); FIXME( "Unknown service %08lx\n", service);
ok = FALSE;
break; break;
} }
return ok; return 0xffffffff; /* FIXME */
} }
/*********************************************************************** /***********************************************************************
@ -760,7 +759,7 @@ static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbI
LPOVERLAPPED lpOverlapped) LPOVERLAPPED lpOverlapped)
{ {
BOOL retv = TRUE; BOOL retv = TRUE;
TRACE(win32,"(%ld,%p,%ld,%p,%ld,%p,%p): stub\n", TRACE("(%ld,%p,%ld,%p,%ld,%p,%p): stub\n",
dwIoControlCode, dwIoControlCode,
lpvInBuffer,cbInBuffer, lpvInBuffer,cbInBuffer,
lpvOutBuffer,cbOutBuffer, lpvOutBuffer,cbOutBuffer,
@ -775,7 +774,7 @@ static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbI
struct win32apireq *pIn=(struct win32apireq *) lpvInBuffer; struct win32apireq *pIn=(struct win32apireq *) lpvInBuffer;
struct win32apireq *pOut=(struct win32apireq *) lpvOutBuffer; struct win32apireq *pOut=(struct win32apireq *) lpvOutBuffer;
TRACE(win32, TRACE(
"Control '%s': " "Control '%s': "
"proid=0x%08lx, eax=0x%08lx, ebx=0x%08lx, ecx=0x%08lx, " "proid=0x%08lx, eax=0x%08lx, ebx=0x%08lx, ecx=0x%08lx, "
"edx=0x%08lx, esi=0x%08lx, edi=0x%08lx, ebp=0x%08lx, " "edx=0x%08lx, esi=0x%08lx, edi=0x%08lx, ebp=0x%08lx, "
@ -800,15 +799,15 @@ static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbI
retv = TRUE; retv = TRUE;
} break; } break;
case IFS_IOCTL_GET_RES:{ case IFS_IOCTL_GET_RES:{
FIXME(win32, "Control 'IFS_IOCTL_GET_RES' not implemented\n"); FIXME( "Control 'IFS_IOCTL_GET_RES' not implemented\n");
retv = FALSE; retv = FALSE;
} break; } break;
case IFS_IOCTL_GET_NETPRO_NAME_A:{ case IFS_IOCTL_GET_NETPRO_NAME_A:{
FIXME(win32, "Control 'IFS_IOCTL_GET_NETPRO_NAME_A' not implemented\n"); FIXME( "Control 'IFS_IOCTL_GET_NETPRO_NAME_A' not implemented\n");
retv = FALSE; retv = FALSE;
} break; } break;
default: default:
FIXME(win32, "Control %ld not implemented\n", dwIoControlCode); FIXME( "Control %ld not implemented\n", dwIoControlCode);
retv = FALSE; retv = FALSE;
} }
@ -873,15 +872,15 @@ static BOOL DeviceIo_VWin32(DWORD dwIoControlCode,
DIOC_REGISTERS *pIn = (DIOC_REGISTERS *)lpvInBuffer; DIOC_REGISTERS *pIn = (DIOC_REGISTERS *)lpvInBuffer;
DIOC_REGISTERS *pOut = (DIOC_REGISTERS *)lpvOutBuffer; DIOC_REGISTERS *pOut = (DIOC_REGISTERS *)lpvOutBuffer;
TRACE( win32, "Control '%s': " TRACE( "Control '%s': "
"eax=0x%08lx, ebx=0x%08lx, ecx=0x%08lx, " "eax=0x%08lx, ebx=0x%08lx, ecx=0x%08lx, "
"edx=0x%08lx, esi=0x%08lx, edi=0x%08lx ", "edx=0x%08lx, esi=0x%08lx, edi=0x%08lx ",
(dwIoControlCode == VWIN32_DIOC_DOS_IOCTL)? "VWIN32_DIOC_DOS_IOCTL" : (dwIoControlCode == VWIN32_DIOC_DOS_IOCTL)? "VWIN32_DIOC_DOS_IOCTL" :
(dwIoControlCode == VWIN32_DIOC_DOS_INT13)? "VWIN32_DIOC_DOS_INT13" : (dwIoControlCode == VWIN32_DIOC_DOS_INT13)? "VWIN32_DIOC_DOS_INT13" :
(dwIoControlCode == VWIN32_DIOC_DOS_INT25)? "VWIN32_DIOC_DOS_INT25" : (dwIoControlCode == VWIN32_DIOC_DOS_INT25)? "VWIN32_DIOC_DOS_INT25" :
(dwIoControlCode == VWIN32_DIOC_DOS_INT26)? "VWIN32_DIOC_DOS_INT26" : "???", (dwIoControlCode == VWIN32_DIOC_DOS_INT26)? "VWIN32_DIOC_DOS_INT26" : "???",
pIn->reg_EAX, pIn->reg_EBX, pIn->reg_ECX, pIn->reg_EAX, pIn->reg_EBX, pIn->reg_ECX,
pIn->reg_EDX, pIn->reg_ESI, pIn->reg_EDI ); pIn->reg_EDX, pIn->reg_ESI, pIn->reg_EDI );
DIOCRegs_2_CONTEXT( pIn, &cxt ); DIOCRegs_2_CONTEXT( pIn, &cxt );
@ -898,12 +897,12 @@ static BOOL DeviceIo_VWin32(DWORD dwIoControlCode,
break; break;
case VWIN32_DIOC_SIMCTRLC: case VWIN32_DIOC_SIMCTRLC:
FIXME(win32, "Control VWIN32_DIOC_SIMCTRLC not implemented\n"); FIXME( "Control VWIN32_DIOC_SIMCTRLC not implemented\n");
retv = FALSE; retv = FALSE;
break; break;
default: default:
FIXME(win32, "Unknown Control %ld\n", dwIoControlCode); FIXME( "Unknown Control %ld\n", dwIoControlCode);
retv = FALSE; retv = FALSE;
break; break;
} }
@ -918,7 +917,7 @@ static BOOL DeviceIo_MMDEVLDR(DWORD dwIoControlCode,
LPDWORD lpcbBytesReturned, LPDWORD lpcbBytesReturned,
LPOVERLAPPED lpOverlapped) LPOVERLAPPED lpOverlapped)
{ {
FIXME(win32,"(%ld,%p,%ld,%p,%ld,%p,%p): stub\n", FIXME("(%ld,%p,%ld,%p,%ld,%p,%p): stub\n",
dwIoControlCode, dwIoControlCode,
lpvInBuffer,cbInBuffer, lpvInBuffer,cbInBuffer,
lpvOutBuffer,cbOutBuffer, lpvOutBuffer,cbOutBuffer,
@ -949,7 +948,7 @@ static BOOL DeviceIo_MONODEBG(DWORD dwIoControlCode,
fprintf(stderr,"MONODEBG: %s\n",debugstr_a(lpvInBuffer)); fprintf(stderr,"MONODEBG: %s\n",debugstr_a(lpvInBuffer));
break; break;
default: default:
FIXME(win32,"(%ld,%p,%ld,%p,%ld,%p,%p): stub\n", FIXME("(%ld,%p,%ld,%p,%ld,%p,%p): stub\n",
dwIoControlCode, dwIoControlCode,
lpvInBuffer,cbInBuffer, lpvInBuffer,cbInBuffer,
lpvOutBuffer,cbOutBuffer, lpvOutBuffer,cbOutBuffer,
@ -963,6 +962,6 @@ static BOOL DeviceIo_MONODEBG(DWORD dwIoControlCode,
DWORD WINAPI OpenVxDHandle(DWORD pmt) DWORD WINAPI OpenVxDHandle(DWORD pmt)
{ {
FIXME(win32, "(0x%08lx) stub!\n", pmt); FIXME( "(0x%08lx) stub!\n", pmt);
return 0; return 0;
} }