Finished separation of advapi32.

diff --git a/misc/registry.c b/misc/registry.c
index c443c7a..438963a 100644
--- a/misc/registry.c
+++ b/misc/registry.c
@@ -1677,148 +1677,13 @@
     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;
 }
 
@@ -1860,37 +1725,14 @@
 
 
 /******************************************************************************
- * 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;
 }