James Hawkins : advpack: Add stubs for the file save/restore functions.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jan 13 07:31:22 CST 2006


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

Author: James Hawkins <truiken at gmail.com>
Date:   Fri Jan 13 14:16:02 2006 +0100

advpack: Add stubs for the file save/restore functions.

---

 dlls/advpack/Makefile.in  |    1 
 dlls/advpack/advpack.spec |    6 +-
 dlls/advpack/files.c      |  118 +++++++++++++++++++++++++++++++++++++++++++++
 include/advpub.h          |   15 ++++++
 4 files changed, 137 insertions(+), 3 deletions(-)
 create mode 100644 dlls/advpack/files.c

diff --git a/dlls/advpack/Makefile.in b/dlls/advpack/Makefile.in
index cf236f5..a14468d 100644
--- a/dlls/advpack/Makefile.in
+++ b/dlls/advpack/Makefile.in
@@ -9,6 +9,7 @@ EXTRALIBS = $(LIBUNICODE)
 
 C_SRCS = \
 	advpack.c \
+	files.c \
 	reg.c
 
 SUBDIRS = tests
diff --git a/dlls/advpack/advpack.spec b/dlls/advpack/advpack.spec
index f1e200f..2fe49fe 100644
--- a/dlls/advpack/advpack.spec
+++ b/dlls/advpack/advpack.spec
@@ -7,9 +7,9 @@
 @ stdcall DoInfInstall(ptr)
 @ stdcall ExecuteCab(ptr ptr ptr)
 @ stdcall ExtractFiles(str str long ptr ptr long)
-@ stub FileSaveMarkNotExist
-@ stub FileSaveRestore
-@ stub FileSaveRestoreOnINF
+@ stdcall FileSaveMarkNotExist(str str str)
+@ stdcall FileSaveRestore(ptr str str str long)
+@ stdcall FileSaveRestoreOnINF(ptr str str str str str long)
 @ stdcall GetVersionFromFile(str ptr ptr long)
 @ stdcall GetVersionFromFileEx(str ptr ptr long)
 @ stdcall IsNTAdmin(long ptr)
diff --git a/dlls/advpack/files.c b/dlls/advpack/files.c
new file mode 100644
index 0000000..46ff983
--- /dev/null
+++ b/dlls/advpack/files.c
@@ -0,0 +1,118 @@
+/*
+ * Advpack file functions
+ *
+ * Copyright 2006 James Hawkins
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "advpub.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(advpack);
+
+/***********************************************************************
+ *      FileSaveMarkNotExist (ADVPACK.@)
+ *
+ * Marks the files in the file list as not existing so they won't be
+ * backed up during a save.
+ *
+ * PARAMS
+ *   pszFileList [I] NULL-separated list of filenames.
+ *   pszDir      [I] Path of the backup directory.
+ *   pszBaseName [I] Basename of the backup files.
+ *
+ * RETURNS
+ *   Success: S_OK.
+ *   Failure: E_FAIL.
+ *
+ * BUGS
+ *   Unimplemented.
+ */
+HRESULT WINAPI FileSaveMarkNotExist(LPSTR pszFileList, LPSTR pszDir, LPSTR pszBaseName)
+{
+    FIXME("(%p, %p, %p) stub\n", pszFileList, pszDir, pszBaseName);
+
+    return E_FAIL;
+}
+
+/***********************************************************************
+ *      FileSaveRestore (ADVPACK.@)
+ *
+ * Saves or restores the files in the specified file list.
+ *
+ * PARAMS
+ *   hDlg        [I] Handle to the dialog used for the display.
+ *   pszFileList [I] NULL-separated list of filenames.
+ *   pszDir      [I] Path of the backup directory.
+ *   pszBaseName [I] Basename of the backup files.
+ *   dwFlags     [I] See advpub.h.
+ *
+ * RETURNS
+ *   Success: S_OK.
+ *   Failure: E_FAIL.
+ *
+ * NOTES
+ *   If pszFileList is NULL on restore, all files will be restored.
+ *
+ * BUGS
+ *   Unimplemented.
+ */
+HRESULT WINAPI FileSaveRestore(HWND hDlg, LPSTR pszFileList, LPSTR pszDir,
+                               LPSTR pszBaseName, DWORD dwFlags)
+{
+    FIXME("(%p, %p, %p, %p, %ld) stub\n", hDlg, pszFileList, pszDir,
+          pszBaseName, dwFlags);
+
+    return E_FAIL;
+}
+
+/***********************************************************************
+ *      FileSaveRestoreOnINF (ADVPACK.@)
+ *
+ *
+ * PARAMS
+ *   hWnd              [I] Handle to the window used for the display.
+ *   pszTitle          [I] Title of the window.
+ *   pszINF            [I] Fully-qualified INF filename.
+ *   pszSection        [I] GenInstall INF section name.
+ *   pszBackupDir      [I] Directory to store the backup file.
+ *   pszBaseBackupFile [I] Basename of the backup files.
+ *   dwFlags           [I] See advpub.h
+ *
+ * RETURNS
+ *   Success: S_OK.
+ *   Failure: E_FAIL.
+ *
+ * NOTES
+ *   If pszSection is NULL, the default section will be used.
+ *
+ * BUGS
+ *   Unimplemented.
+ */
+HRESULT WINAPI FileSaveRestoreOnINF(HWND hWnd, PCSTR pszTitle, PCSTR pszINF,
+                                    PCSTR pszSection, PCSTR pszBackupDir,
+                                    PCSTR pszBaseBackupFile, DWORD dwFlags)
+{
+    FIXME("(%p, %p, %p, %p, %p, %p, %ld) stub\n", hWnd, pszTitle, pszINF,
+          pszSection, pszBackupDir, pszBaseBackupFile, dwFlags);
+
+    return E_FAIL;
+}
diff --git a/include/advpub.h b/include/advpub.h
index 04c60fd..34893dc 100644
--- a/include/advpub.h
+++ b/include/advpub.h
@@ -86,6 +86,16 @@ typedef CSTRTABLE *LPCSTRTABLE;
 #define  IE4_USEREFCNT              0x00000400
 #define  IE4_EXTRAINCREFCNT         0x00000800
 
+/* Flags for file save and restore functions */
+#define  AFSR_RESTORE               IE4_RESTORE
+#define  AFSR_BACKNEW               IE4_BACKNEW
+#define  AFSR_NODELETENEW           IE4_NODELETENEW
+#define  AFSR_NOMESSAGES            IE4_NOMESSAGES
+#define  AFSR_NOPROGRESS            IE4_NOPROGRESS
+#define  AFSR_UPDREFCNT             IE4_UPDREFCNT
+#define  AFSR_USEREFCNT             IE4_USEREFCNT
+#define  AFSR_EXTRAINCREFCNT        IE4_EXTRAINCREFCNT
+
 HRESULT WINAPI AdvInstallFile(HWND hwnd, LPCSTR lpszSourceDir,
      LPCSTR lpszSourceFile, LPCSTR lpszDestDir, LPCSTR lpszDestFile,
      DWORD dwFlags, DWORD dwReserved);
@@ -93,6 +103,11 @@ HRESULT WINAPI DelNode(LPCSTR pszFileOrD
 HRESULT WINAPI DelNodeRunDLL32(HWND,HINSTANCE,LPSTR,INT);
 HRESULT WINAPI ExecuteCab( HWND hwnd, PCABINFO pCab, LPVOID pReserved );
 HRESULT WINAPI ExtractFiles(LPCSTR,LPCSTR,DWORD,LPCSTR,LPVOID,DWORD);
+HRESULT WINAPI FileSaveMarkNotExist(LPSTR pszFileList, LPSTR pszDir, LPSTR pszBaseName);
+HRESULT WINAPI FileSaveRestore(HWND hDlg, LPSTR pszFileList, LPSTR pszDir,
+     LPSTR pszBaseName, DWORD dwFlags);
+HRESULT WINAPI FileSaveRestoreOnINF(HWND hWnd, PCSTR pszTitle, PCSTR pszINF,
+     PCSTR pszSection, PCSTR pszBackupDir, PCSTR pszBaseBackupFile, DWORD dwFlags);
 HRESULT WINAPI GetVersionFromFile(LPSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion);
 HRESULT WINAPI GetVersionFromFileEx(LPSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion);
 BOOL WINAPI IsNTAdmin(DWORD,LPDWORD);




More information about the wine-cvs mailing list