Finished separation of advapi32.

oldstable
Alexandre Julliard 2000-11-30 20:31:41 +00:00
parent b2ed2528b4
commit 5ce2329a95
11 changed files with 259 additions and 178 deletions

View File

@ -5,7 +5,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = none
PROGRAMS = winedbg
IMPORTS = user32 gdi32 advapi32 kernel32 ntdll
IMPORTS = user32 gdi32 kernel32 ntdll
C_SRCS = \
break.c \

View File

@ -392,7 +392,7 @@ comctl32/libcomctl32.so: libuser32.so libgdi32.so libadvapi32.so libkernel32.so
commdlg/libcomdlg32.so: libshell32.so libshlwapi.so libcomctl32.so libwinspool.drv.so libuser32.so libgdi32.so libkernel32.so libntdll.so
crtdll/libcrtdll.so: libkernel32.so libntdll.so
dciman32/libdciman32.so: libntdll.so
ddraw/libddraw.so: libole32.so libuser32.so libx11drv.so libgdi32.so libkernel32.so
ddraw/libddraw.so: libuser32.so libx11drv.so libgdi32.so libkernel32.so
dinput/libdinput.so: libuser32.so libkernel32.so libntdll.so
dplay/libdplay.so: libdplayx.so
dplayx/libdplayx.so: libwinmm.so libole32.so libuser32.so libadvapi32.so libkernel32.so libntdll.so
@ -410,7 +410,7 @@ msvideo/libmsvfw32.so: libwinmm.so libuser32.so libgdi32.so libkernel32.so libnt
odbc32/libodbc32.so: libntdll.so
ole32/libole32.so: libadvapi32.so libuser32.so libgdi32.so librpcrt4.so libkernel32.so libntdll.so
oleaut32/liboleaut32.so: libole32.so libuser32.so libgdi32.so libadvapi32.so libkernel32.so libntdll.so
olecli/libolecli32.so: libole32.so libolesvr32.so libgdi32.so libkernel32.so libntdll.so
olecli/libolecli32.so: libole32.so libgdi32.so libkernel32.so libntdll.so
oledlg/liboledlg.so: libntdll.so
olepro32/libolepro32.so: liboleaut32.so libntdll.so
olesvr/libolesvr32.so: libkernel32.so libntdll.so
@ -433,8 +433,8 @@ win32s/libw32skrnl.so: libkernel32.so libntdll.so
winaspi/libwnaspi32.so: libadvapi32.so libkernel32.so libntdll.so
wineps/libwineps.so: libuser32.so libgdi32.so libkernel32.so libntdll.so
wininet/libwininet.so: libuser32.so libkernel32.so libntdll.so
winmm/joystick/libjoystick.drv.so: libwinmm.so libuser32.so libkernel32.so libntdll.so
winmm/libwinmm.so: libuser32.so libkernel32.so libntdll.so
winmm/joystick/libjoystick.drv.so: libwinmm.so libuser32.so libntdll.so
winmm/libwinmm.so: libuser32.so libadvapi32.so libkernel32.so libntdll.so
winmm/mcianim/libmcianim.drv.so: libwinmm.so libuser32.so libkernel32.so libntdll.so
winmm/mciavi/libmciavi.drv.so: libwinmm.so libuser32.so libkernel32.so libntdll.so
winmm/mcicda/libmcicda.drv.so: libwinmm.so libuser32.so libkernel32.so libntdll.so
@ -444,7 +444,7 @@ winmm/midimap/libmidimap.drv.so: libwinmm.so libuser32.so libkernel32.so libntdl
winmm/wavemap/libmsacm.drv.so: libwinmm.so libuser32.so libkernel32.so libntdll.so
winmm/wineoss/libwineoss.drv.so: libwinmm.so libuser32.so libkernel32.so libntdll.so
winsock/libws2_32.so: libuser32.so libkernel32.so libntdll.so
winspool/libwinspool.drv.so: libuser32.so libgdi32.so libadvapi32.so libkernel32.so libntdll.so
winspool/libwinspool.drv.so: libadvapi32.so libkernel32.so libntdll.so
wow32/libwow32.so: libkernel32.so
wsock32/libwsock32.so: libws2_32.so libkernel32.so libntdll.so
x11drv/libx11drv.so: libuser32.so libgdi32.so libkernel32.so

View File

@ -3,13 +3,15 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = advapi32
SOVERSION = 1.0
IMPORTS = kernel32 ntdll
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
advapi.c \
crypt.c \
eventlog.c \
registry.c \
security.c \
service.c

View File

@ -4,7 +4,7 @@ type win32
import kernel32.dll
import ntdll.dll
debug_channels (advapi)
debug_channels (advapi reg)
@ stub AbortSystemShutdownA
@ stub AbortSystemShutdownW
@ -122,7 +122,7 @@ debug_channels (advapi)
@ stdcall InitializeSid(ptr ptr long) InitializeSid
@ stub InitiateSystemShutdownA
@ stub InitiateSystemShutdownW
@ stdcall IsTextUnicode(ptr long ptr) RtlIsTextUnicode
@ forward IsTextUnicode ntdll.RtlIsTextUnicode
@ stub IsValidAcl
@ stdcall IsValidSecurityDescriptor(ptr) IsValidSecurityDescriptor
@ stdcall IsValidSid(ptr) IsValidSid

View File

@ -19,7 +19,6 @@
#include "winbase.h"
#include "winreg.h"
#include "winerror.h"
#include "wine/winbase16.h"
#include "wine/unicode.h"
#include "heap.h"
#include "server.h"
@ -1303,3 +1302,240 @@ LONG WINAPI RegSaveKeyW( HKEY hkey, LPCWSTR file, LPSECURITY_ATTRIBUTES sa )
if (fileA) HeapFree( GetProcessHeap(), 0, fileA );
return ret;
}
/******************************************************************************
* RegRestoreKeyW [ADVAPI32.164]
*
* PARAMS
* hkey [I] Handle of key where restore begins
* lpFile [I] Address of filename containing saved tree
* dwFlags [I] Optional flags
*/
LONG WINAPI RegRestoreKeyW( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
{
TRACE("(%x,%s,%ld)\n",hkey,debugstr_w(lpFile),dwFlags);
/* It seems to do this check before the hkey check */
if (!lpFile || !*lpFile)
return ERROR_INVALID_PARAMETER;
FIXME("(%x,%s,%ld): stub\n",hkey,debugstr_w(lpFile),dwFlags);
/* Check for file existence */
return ERROR_SUCCESS;
}
/******************************************************************************
* RegRestoreKeyA [ADVAPI32.163]
*/
LONG WINAPI RegRestoreKeyA( HKEY hkey, LPCSTR lpFile, DWORD dwFlags )
{
LPWSTR lpFileW = HEAP_strdupAtoW( GetProcessHeap(), 0, lpFile );
LONG ret = RegRestoreKeyW( hkey, lpFileW, dwFlags );
HeapFree( GetProcessHeap(), 0, lpFileW );
return ret;
}
/******************************************************************************
* RegUnLoadKeyW [ADVAPI32.173]
*
* PARAMS
* hkey [I] Handle of open key
* lpSubKey [I] Address of name of subkey to unload
*/
LONG WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey )
{
FIXME("(%x,%s): stub\n",hkey, debugstr_w(lpSubKey));
return ERROR_SUCCESS;
}
/******************************************************************************
* RegUnLoadKeyA [ADVAPI32.172]
*/
LONG WINAPI RegUnLoadKeyA( HKEY hkey, LPCSTR lpSubKey )
{
LPWSTR lpSubKeyW = HEAP_strdupAtoW( GetProcessHeap(), 0, lpSubKey );
LONG ret = RegUnLoadKeyW( hkey, lpSubKeyW );
if(lpSubKeyW) HeapFree( GetProcessHeap(), 0, lpSubKeyW);
return ret;
}
/******************************************************************************
* RegReplaceKeyW [ADVAPI32.162]
*
* PARAMS
* hkey [I] Handle of open key
* lpSubKey [I] Address of name of subkey
* lpNewFile [I] Address of filename for file with new data
* lpOldFile [I] Address of filename for backup file
*/
LONG WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile,
LPCWSTR lpOldFile )
{
FIXME("(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey),
debugstr_w(lpNewFile),debugstr_w(lpOldFile));
return ERROR_SUCCESS;
}
/******************************************************************************
* RegReplaceKeyA [ADVAPI32.161]
*/
LONG WINAPI RegReplaceKeyA( HKEY hkey, LPCSTR lpSubKey, LPCSTR lpNewFile,
LPCSTR lpOldFile )
{
LPWSTR lpSubKeyW = HEAP_strdupAtoW( GetProcessHeap(), 0, lpSubKey );
LPWSTR lpNewFileW = HEAP_strdupAtoW( GetProcessHeap(), 0, lpNewFile );
LPWSTR lpOldFileW = HEAP_strdupAtoW( GetProcessHeap(), 0, lpOldFile );
LONG ret = RegReplaceKeyW( hkey, lpSubKeyW, lpNewFileW, lpOldFileW );
HeapFree( GetProcessHeap(), 0, lpOldFileW );
HeapFree( GetProcessHeap(), 0, lpNewFileW );
HeapFree( GetProcessHeap(), 0, lpSubKeyW );
return ret;
}
/******************************************************************************
* RegSetKeySecurity [ADVAPI32.167]
*
* PARAMS
* hkey [I] Open handle of key to set
* SecurityInfo [I] Descriptor contents
* pSecurityDesc [I] Address of descriptor for key
*/
LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
PSECURITY_DESCRIPTOR pSecurityDesc )
{
TRACE("(%x,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc);
/* It seems to perform this check before the hkey check */
if ((SecurityInfo & OWNER_SECURITY_INFORMATION) ||
(SecurityInfo & GROUP_SECURITY_INFORMATION) ||
(SecurityInfo & DACL_SECURITY_INFORMATION) ||
(SecurityInfo & SACL_SECURITY_INFORMATION)) {
/* Param OK */
} else
return ERROR_INVALID_PARAMETER;
if (!pSecurityDesc)
return ERROR_INVALID_PARAMETER;
FIXME(":(%x,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc);
return ERROR_SUCCESS;
}
/******************************************************************************
* RegGetKeySecurity [ADVAPI32.144]
* Retrieves a copy of security descriptor protecting the registry key
*
* PARAMS
* hkey [I] Open handle of key to set
* SecurityInformation [I] Descriptor contents
* pSecurityDescriptor [O] Address of descriptor for key
* lpcbSecurityDescriptor [I/O] Address of size of buffer and description
*
* RETURNS
* Success: ERROR_SUCCESS
* Failure: Error code
*/
LONG WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
LPDWORD lpcbSecurityDescriptor )
{
TRACE("(%x,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor,
lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
/* FIXME: Check for valid SecurityInformation values */
if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR))
return ERROR_INSUFFICIENT_BUFFER;
FIXME("(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation,
pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
return ERROR_SUCCESS;
}
/******************************************************************************
* RegFlushKey [ADVAPI32.143]
* Immediately writes key to registry.
* Only returns after data has been written to disk.
*
* FIXME: does it really wait until data is written ?
*
* PARAMS
* hkey [I] Handle of key to write
*
* RETURNS
* Success: ERROR_SUCCESS
* Failure: Error code
*/
DWORD WINAPI RegFlushKey( HKEY hkey )
{
FIXME( "(%x): stub\n", hkey );
return ERROR_SUCCESS;
}
/******************************************************************************
* RegConnectRegistryW [ADVAPI32.128]
*
* PARAMS
* lpMachineName [I] Address of name of remote computer
* hHey [I] Predefined registry handle
* phkResult [I] Address of buffer for remote registry handle
*/
LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
LPHKEY phkResult )
{
TRACE("(%s,%x,%p): stub\n",debugstr_w(lpMachineName),hKey,phkResult);
if (!lpMachineName || !*lpMachineName) {
/* Use the local machine name */
return RegOpenKeyA( hKey, "", phkResult );
}
FIXME("Cannot connect to %s\n",debugstr_w(lpMachineName));
return ERROR_BAD_NETPATH;
}
/******************************************************************************
* RegConnectRegistryA [ADVAPI32.127]
*/
LONG WINAPI RegConnectRegistryA( LPCSTR machine, HKEY hkey, LPHKEY reskey )
{
LPWSTR machineW = HEAP_strdupAtoW( GetProcessHeap(), 0, machine );
DWORD ret = RegConnectRegistryW( machineW, hkey, reskey );
HeapFree( GetProcessHeap(), 0, machineW );
return ret;
}
/******************************************************************************
* RegNotifyChangeKeyValue [ADVAPI32.???]
*
* PARAMS
* hkey [I] Handle of key to watch
* fWatchSubTree [I] Flag for subkey notification
* fdwNotifyFilter [I] Changes to be reported
* hEvent [I] Handle of signaled event
* fAsync [I] Flag for asynchronous reporting
*/
LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
DWORD fdwNotifyFilter, HANDLE hEvent,
BOOL fAsync )
{
FIXME("(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter,
hEvent,fAsync);
return ERROR_SUCCESS;
}

View File

@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE = gdi32
SOVERSION = 1.0
ALTNAMES = gdi dispdib wing
IMPORTS = advapi32 kernel32 ntdll
IMPORTS = kernel32 ntdll
C_SRCS = \
bidi16.c \

View File

@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE = shell32
ALTNAMES = shell
EXTRALIBS = -lwine_unicode
IMPORTS = user32 gdi32 advapi32 kernel32 ntdll
IMPORTS = user32 gdi32 kernel32 ntdll
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o

View File

@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE = user32
SOVERSION = 1.0
ALTNAMES = user keyboard ddeml display mouse
IMPORTS = gdi32 advapi32 kernel32 ntdll
IMPORTS = gdi32 kernel32 ntdll
C_SRCS = \
bidi16.c \

View File

@ -368,7 +368,7 @@ static BOOL MCI_DeleteCommandTable(UINT uTbl)
if (uTbl >= MAX_MCICMDTABLE || !S_MciCmdTable[uTbl].hMem)
return FALSE;
FreeResource16(S_MciCmdTable[uTbl].hMem);
FreeResource(S_MciCmdTable[uTbl].hMem);
S_MciCmdTable[uTbl].hMem = 0;
if (S_MciCmdTable[uTbl].aVerbs) {
HeapFree(GetProcessHeap(), 0, S_MciCmdTable[uTbl].aVerbs);

View File

@ -4,8 +4,9 @@ init WINMM_LibMain
rsrc winmm_res.res
import user32.dll
import advapi32.dll
import kernel32.dll
import ntdll.dll
import ntdll.dll
debug_channels (mci mmio mmsys mmtime sound)

View File

@ -1677,148 +1677,13 @@ DWORD WINAPI RegFlushKey( HKEY hkey )
return ERROR_SUCCESS;
}
/******************************************************************************
* RegConnectRegistryW [ADVAPI32.128]
*
* PARAMS
* lpMachineName [I] Address of name of remote computer
* hHey [I] Predefined registry handle
* phkResult [I] Address of buffer for remote registry handle
*/
LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
LPHKEY phkResult )
{
TRACE("(%s,%x,%p): stub\n",debugstr_w(lpMachineName),hKey,phkResult);
if (!lpMachineName || !*lpMachineName) {
/* Use the local machine name */
return RegOpenKey16( hKey, "", phkResult );
}
FIXME("Cannot connect to %s\n",debugstr_w(lpMachineName));
return ERROR_BAD_NETPATH;
}
/******************************************************************************
* RegConnectRegistryA [ADVAPI32.127]
*/
LONG WINAPI RegConnectRegistryA( LPCSTR machine, HKEY hkey, LPHKEY reskey )
{
LPWSTR machineW = HEAP_strdupAtoW( GetProcessHeap(), 0, machine );
DWORD ret = RegConnectRegistryW( machineW, hkey, reskey );
HeapFree( GetProcessHeap(), 0, machineW );
return ret;
}
/******************************************************************************
* RegGetKeySecurity [ADVAPI32.144]
* Retrieves a copy of security descriptor protecting the registry key
*
* PARAMS
* hkey [I] Open handle of key to set
* SecurityInformation [I] Descriptor contents
* pSecurityDescriptor [O] Address of descriptor for key
* lpcbSecurityDescriptor [I/O] Address of size of buffer and description
*
* RETURNS
* Success: ERROR_SUCCESS
* Failure: Error code
*/
LONG WINAPI RegGetKeySecurity( HKEY hkey,
SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
LPDWORD lpcbSecurityDescriptor )
{
TRACE("(%x,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor,
lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
/* FIXME: Check for valid SecurityInformation values */
if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR))
return ERROR_INSUFFICIENT_BUFFER;
FIXME("(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation,
pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
return ERROR_SUCCESS;
}
/******************************************************************************
* RegNotifyChangeKeyValue [ADVAPI32.???]
*
* PARAMS
* hkey [I] Handle of key to watch
* fWatchSubTree [I] Flag for subkey notification
* fdwNotifyFilter [I] Changes to be reported
* hEvent [I] Handle of signaled event
* fAsync [I] Flag for asynchronous reporting
*/
LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
DWORD fdwNotifyFilter, HANDLE hEvent,
BOOL fAsync )
{
FIXME("(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter,
hEvent,fAsync);
return ERROR_SUCCESS;
}
/******************************************************************************
* RegUnLoadKeyW [ADVAPI32.173]
*
* PARAMS
* hkey [I] Handle of open key
* lpSubKey [I] Address of name of subkey to unload
*/
LONG WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey )
{
FIXME("(%x,%s): stub\n",hkey, debugstr_w(lpSubKey));
return ERROR_SUCCESS;
}
/******************************************************************************
* RegUnLoadKeyA [ADVAPI32.172]
*/
LONG WINAPI RegUnLoadKeyA( HKEY hkey, LPCSTR lpSubKey )
{
LPWSTR lpSubKeyW = HEAP_strdupAtoW( GetProcessHeap(), 0, lpSubKey );
LONG ret = RegUnLoadKeyW( hkey, lpSubKeyW );
if(lpSubKeyW) HeapFree( GetProcessHeap(), 0, lpSubKeyW);
return ret;
}
/******************************************************************************
* RegSetKeySecurity [ADVAPI32.167]
*
* PARAMS
* hkey [I] Open handle of key to set
* SecurityInfo [I] Descriptor contents
* pSecurityDesc [I] Address of descriptor for key
*/
LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
PSECURITY_DESCRIPTOR pSecurityDesc )
{
TRACE("(%x,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc);
/* It seems to perform this check before the hkey check */
if ((SecurityInfo & OWNER_SECURITY_INFORMATION) ||
(SecurityInfo & GROUP_SECURITY_INFORMATION) ||
(SecurityInfo & DACL_SECURITY_INFORMATION) ||
(SecurityInfo & SACL_SECURITY_INFORMATION)) {
/* Param OK */
} else
return ERROR_INVALID_PARAMETER;
if (!pSecurityDesc)
return ERROR_INVALID_PARAMETER;
FIXME(":(%x,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc);
FIXME("(%x,%s): stub\n",hkey, debugstr_a(lpSubKey));
return ERROR_SUCCESS;
}
@ -1859,38 +1724,15 @@ LONG WINAPI RegRestoreKeyA( HKEY hkey, LPCSTR lpFile, DWORD dwFlags )
}
/******************************************************************************
* RegReplaceKeyW [ADVAPI32.162]
*
* PARAMS
* hkey [I] Handle of open key
* lpSubKey [I] Address of name of subkey
* lpNewFile [I] Address of filename for file with new data
* lpOldFile [I] Address of filename for backup file
*/
LONG WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile,
LPCWSTR lpOldFile )
{
FIXME("(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey),
debugstr_w(lpNewFile),debugstr_w(lpOldFile));
return ERROR_SUCCESS;
}
/******************************************************************************
* RegReplaceKeyA [ADVAPI32.161]
*/
LONG WINAPI RegReplaceKeyA( HKEY hkey, LPCSTR lpSubKey, LPCSTR lpNewFile,
LPCSTR lpOldFile )
{
LPWSTR lpSubKeyW = HEAP_strdupAtoW( GetProcessHeap(), 0, lpSubKey );
LPWSTR lpNewFileW = HEAP_strdupAtoW( GetProcessHeap(), 0, lpNewFile );
LPWSTR lpOldFileW = HEAP_strdupAtoW( GetProcessHeap(), 0, lpOldFile );
LONG ret = RegReplaceKeyW( hkey, lpSubKeyW, lpNewFileW, lpOldFileW );
HeapFree( GetProcessHeap(), 0, lpOldFileW );
HeapFree( GetProcessHeap(), 0, lpNewFileW );
HeapFree( GetProcessHeap(), 0, lpSubKeyW );
return ret;
FIXME("(%x,%s,%s,%s): stub\n", hkey, debugstr_a(lpSubKey),
debugstr_a(lpNewFile),debugstr_a(lpOldFile));
return ERROR_SUCCESS;
}