diff --git a/dlls/advpack/Makefile.in b/dlls/advpack/Makefile.in index cf236f54d97..a14468dfaa5 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 f1e200f4a84..2fe49fee476 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 00000000000..46ff983e656 --- /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 + +#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 04c60fdf2a0..34893dcefc6 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 pszFileOrDirName, DWORD dwFlags); 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);