James Hawkins : advpack: Add stubs for the remaining registry functions.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jan 12 06:43:30 CST 2006


Module: wine
Branch: refs/heads/master
Commit: ee3194bee2d0684c3f29bd6e2a0bf333331cf0c1
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=ee3194bee2d0684c3f29bd6e2a0bf333331cf0c1

Author: James Hawkins <truiken at gmail.com>
Date:   Thu Jan 12 13:31:12 2006 +0100

advpack: Add stubs for the remaining registry functions.

---

 dlls/advpack/advpack.spec |    6 +--
 dlls/advpack/reg.c        |   97 +++++++++++++++++++++++++++++++++++++++++++++
 include/advpub.h          |   19 +++++++++
 3 files changed, 119 insertions(+), 3 deletions(-)

diff --git a/dlls/advpack/advpack.spec b/dlls/advpack/advpack.spec
index 0d238ba..f1e200f 100644
--- a/dlls/advpack/advpack.spec
+++ b/dlls/advpack/advpack.spec
@@ -20,9 +20,9 @@
 @ stub OpenINFEngine
 @ stub RebootCheckOnInstall
 @ stdcall RegInstall(ptr str ptr)
-@ stub RegRestoreAll
-@ stub RegSaveRestore
-@ stub RegSaveRestoreOnINF
+@ stdcall RegRestoreAll(ptr str long)
+@ stdcall RegSaveRestore(ptr str long str str str long)
+@ stdcall RegSaveRestoreOnINF(ptr str str str long long long)
 @ stdcall RegisterOCX(ptr ptr str long)
 @ stdcall RunSetupCommand(long str str str str ptr long ptr)
 @ stub SetPerUserSecValues
diff --git a/dlls/advpack/reg.c b/dlls/advpack/reg.c
index 95922a3..84b696d 100644
--- a/dlls/advpack/reg.c
+++ b/dlls/advpack/reg.c
@@ -100,6 +100,17 @@ error:
 /***********************************************************************
  *          RegInstall (advpack.@)
  *
+ * Loads an INF from a string resource, adds entries to the string
+ * substitution table, and executes the INF.
+ *
+ * PARAMS
+ *   hm         [I] Module that contains the REGINST resouce.
+ *   pszSection [I] The INF section to execute.
+ *   pstTable   [I] Table of string substitutions.
+ * 
+ * RETURNS
+ *   Success: S_OK.
+ *   Failure: E_FAIL.
  */
 HRESULT WINAPI RegInstall(HMODULE hm, LPCSTR pszSection, LPCSTRTABLE pstTable)
 {
@@ -176,3 +187,89 @@ HRESULT WINAPI RegInstall(HMODULE hm, LP
 
     return S_OK;
 }
+
+/***********************************************************************
+ *          RegRestoreAll (advpack.@)
+ *
+ * Restores all saved registry entries.
+ *
+ * PARAMS
+ *   hWnd           [I] Handle to the window used for the display.
+ *   pszTitleString [I] Title of the window.
+ *   hkBackupKey    [I] Handle to the backup key.
+ *
+ * RETURNS
+ *   Success: S_OK.
+ *   Failure: E_FAIL.
+ *
+ * BUGS
+ *   Unimplemented.
+ */
+HRESULT WINAPI RegRestoreAll(HWND hWnd, PSTR pszTitleString, HKEY hkBackupKey)
+{
+    FIXME("(%p, %p, %p) stub\n", hWnd, pszTitleString, hkBackupKey);
+    
+    return E_FAIL;   
+}
+
+/***********************************************************************
+ *          RegSaveRestore (advpack.@)
+ *
+ * Saves or restores the specified registry value.
+ *
+ * PARAMS
+ *   hWnd           [I] Handle to the window used for the display.
+ *   pszTitleString [I] Title of the window.
+ *   hkBackupKey    [I] Key used to store the backup data.
+ *   pcszRootKey    [I] Root key of the registry value
+ *   pcszSubKey     [I] Sub key of the registry value.
+ *   pcszValueName  [I] Value to save or restore. 
+ *   dwFlags        [I] See advpub.h.
+ * 
+ * RETURNS
+ *   Success: S_OK.
+ *   Failure: E_FAIL.
+ *
+ * BUGS
+ *   Unimplemented.
+ */
+HRESULT WINAPI RegSaveRestore(HWND hWnd, PCSTR pszTitleString, HKEY hkBackupKey,
+                              PCSTR pcszRootKey, PCSTR pcszSubKey,
+                              PCSTR pcszValueName, DWORD dwFlags)
+{
+    FIXME("(%p, %p, %p, %p, %p, %p, %ld) stub\n", hWnd, pszTitleString,
+          hkBackupKey, pcszRootKey, pcszSubKey, pcszValueName, dwFlags);
+
+    return E_FAIL;   
+}
+
+/***********************************************************************
+ *          RegSaveRestoreOnINF (advpack.@)
+ *
+ * Saves or restores the specified INF Reg section.
+ *
+ * PARAMS
+ *   hWnd         [I] Handle to the window used for the display.
+ *   pszTitle     [I] Title of the window.
+ *   pszINF       [I] Filename of the INF.
+ *   pszSection   [I] Section to save or restore.
+ *   hHKLMBackKey [I] Opened key in HKLM to store data.
+ *   hHKCUBackKey [I] Opened key in HKCU to store data.
+ *   dwFlags      [I] See advpub.h
+ *
+ * RETURNS
+ *   Success: S_OK.
+ *   Failure: E_FAIL.
+ *
+ * BUGS
+ *   Unimplemented.
+ */
+HRESULT WINAPI RegSaveRestoreOnINF(HWND hWnd, PCSTR pszTitle, PCSTR pszINF,
+                                   PCSTR pszSection, HKEY hHKLMBackKey,
+                                   HKEY hHKCUBackKey, DWORD dwFlags)
+{
+    FIXME("(%p, %p, %p, %p, %p, %p, %ld) stub\n", hWnd, pszTitle, pszINF,
+          pszSection, hHKLMBackKey, hHKCUBackKey, dwFlags);
+
+    return E_FAIL;   
+}
diff --git a/include/advpub.h b/include/advpub.h
index 2d0139f..04c60fd 100644
--- a/include/advpub.h
+++ b/include/advpub.h
@@ -72,6 +72,20 @@ typedef CSTRTABLE *LPCSTRTABLE;
 #define ADN_DONT_DEL_DIR            0x00000004
 #define ADN_DEL_UNC_PATHS           0x00000008
 
+/* Flags for RegRestoreAll, RegSaveRestore, RegSaveRestoreOnINF */
+#define  IE4_RESTORE                0x00000001
+#define  IE4_BACKNEW                0x00000002
+#define  IE4_NODELETENEW            0x00000004
+#define  IE4_NOMESSAGES             0x00000008
+#define  IE4_NOPROGRESS             0x00000010
+#define  IE4_NOENUMKEY              0x00000020
+#define  IE4_NO_CRC_MAPPING         0x00000040
+#define  IE4_REGSECTION             0x00000080
+#define  IE4_FRDOALL                0x00000100
+#define  IE4_UPDREFCNT              0x00000200
+#define  IE4_USEREFCNT              0x00000400
+#define  IE4_EXTRAINCREFCNT         0x00000800
+
 HRESULT WINAPI AdvInstallFile(HWND hwnd, LPCSTR lpszSourceDir,
      LPCSTR lpszSourceFile, LPCSTR lpszDestDir, LPCSTR lpszDestFile,
      DWORD dwFlags, DWORD dwReserved);
@@ -87,6 +101,11 @@ HRESULT WINAPI LaunchINFSectionEx(HWND,H
 DWORD WINAPI NeedRebootInit(VOID);
 BOOL WINAPI NeedReboot(DWORD dwRebootCheck);
 HRESULT WINAPI RegInstall(HMODULE hm, LPCSTR pszSection, LPCSTRTABLE pstTable);
+HRESULT WINAPI RegRestoreAll(HWND hWnd, PSTR pszTitleString, HKEY hkBackupKey);
+HRESULT WINAPI RegSaveRestore(HWND hWnd, PCSTR pszTitleString, HKEY hkBackupKey,
+     PCSTR pcszRootKey, PCSTR pcszSubKey, PCSTR pcszValueName, DWORD dwFlags);
+HRESULT WINAPI RegSaveRestoreOnINF(HWND hWnd, PCSTR pszTitle, PCSTR pszINF,
+     PCSTR pszSection, HKEY hHKLMBackKey, HKEY hHKCUBackKey, DWORD dwFlags);
 HRESULT WINAPI RunSetupCommand(HWND hWnd,
      LPCSTR szCmdName, LPCSTR szInfSection, LPCSTR szDir, LPCSTR lpszTitle,
      HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved);




More information about the wine-cvs mailing list