advpub.h 12.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright 2004 Huw D M Davies
 *
 * 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
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 18 19 20
 */
#ifndef __WINE_ADVPUB_H
#define __WINE_ADVPUB_H

21
#include <setupapi.h>
22
#include <cfgmgr32.h>
23

24 25 26 27
#ifdef __cplusplus
extern "C" {
#endif

28
#ifndef S_ASYNCHRONOUS
29
#define S_ASYNCHRONOUS  _HRESULT_TYPEDEF_(0x401E8)
30 31
#endif

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
typedef struct _CabInfoA
{
    LPSTR  pszCab;
    LPSTR  pszInf;
    LPSTR  pszSection;
    CHAR   szSrcPath[MAX_PATH];
    DWORD  dwFlags;
} CABINFOA, *PCABINFOA;

typedef struct _CabInfoW
{
    LPWSTR pszCab;
    LPWSTR pszInf;
    LPWSTR pszSection;
    WCHAR  szSrcPath[MAX_PATH];
    DWORD  dwFlags;
} CABINFOW, *PCABINFOW;

DECL_WINELIB_TYPE_AW(CABINFO)
DECL_WINELIB_TYPE_AW(PCABINFO)

typedef struct _PERUSERSECTIONA
{
    CHAR  szGUID[39 /*MAX_GUID_STRING_LEN*/ + 20];
    CHAR  szDispName[128];
    CHAR  szLocale[10];
    CHAR  szStub[MAX_PATH * 4];
    CHAR  szVersion[32];
    CHAR  szCompID[128];
61 62
    DWORD dwIsInstalled;
    BOOL  bRollback;
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
} PERUSERSECTIONA, *PPERUSERSECTIONA;

typedef struct _PERUSERSECTIONW
{
    WCHAR szGUID[39 /*MAX_GUID_STRING_LEN*/ + 20];
    WCHAR szDispName[128];
    WCHAR szLocale[10];
    WCHAR szStub[MAX_PATH * 4];
    WCHAR szVersion[32];
    WCHAR szCompID[128];
    DWORD dwIsInstalled;
    BOOL  bRollback;
} PERUSERSECTIONW, *PPERUSERSECTIONW;

DECL_WINELIB_TYPE_AW(PERUSERSECTION)
DECL_WINELIB_TYPE_AW(PPERUSERSECTION)
79

80 81
typedef struct _StrEntryA
{
82 83
    LPSTR pszName;
    LPSTR pszValue;
84
} STRENTRYA, *LPSTRENTRYA;
85

86 87 88 89 90
typedef struct _StrEntryW
{
    LPWSTR pszName;
    LPWSTR pszValue;
} STRENTRYW, *LPSTRENTRYW;
91

92 93 94 95 96
DECL_WINELIB_TYPE_AW(STRENTRY)
DECL_WINELIB_TYPE_AW(LPSTRENTRY)

typedef struct _StrTableA
{
97
    DWORD cEntries;
98 99 100
    STRENTRYA* pse;
} STRTABLEA, *LPSTRTABLEA;
typedef const STRTABLEA CSTRTABLEA, *LPCSTRTABLEA;
101

102 103 104 105 106 107
typedef struct _StrTableW
{
    DWORD cEntries;
    STRENTRYW* pse;
} STRTABLEW, *LPSTRTABLEW;
typedef const STRTABLEW CSTRTABLEW, *LPCSTRTABLEW;
108

109 110 111 112
DECL_WINELIB_TYPE_AW(STRTABLE)
DECL_WINELIB_TYPE_AW(CSTRTABLE)
DECL_WINELIB_TYPE_AW(LPSTRTABLE)
DECL_WINELIB_TYPE_AW(LPCSTRTABLE)
113

114 115 116 117
/* Flags for AddDelBackupEntry */
#define AADBE_ADD_ENTRY             0x01
#define AADBE_DEL_ENTRY             0x02

118 119 120 121 122 123 124 125 126 127 128
/* Flags for AdvInstallFile */
#define AIF_WARNIFSKIP              0x00000001
#define AIF_NOSKIP                  0x00000002
#define AIF_NOVERSIONCHECK          0x00000004
#define AIF_FORCE_FILE_IN_USE       0x00000008
#define AIF_NOOVERWRITE             0x00000010
#define AIF_NO_VERSION_DIALOG       0x00000020
#define AIF_REPLACEONLY             0x00000400
#define AIF_NOLANGUAGECHECK         0x10000000
#define AIF_QUIET                   0x20000000

129 130 131 132 133 134 135 136 137
/* Flags for RunSetupCommand */
#define RSC_FLAG_INF                0x00000001
#define RSC_FLAG_SKIPDISKSPACECHECK 0x00000002
#define RSC_FLAG_QUIET              0x00000004
#define RSC_FLAG_NGCONV             0x00000008
#define RSC_FLAG_UPDHLPDLLS         0x00000010
#define RSC_FLAG_DELAYREGISTEROCX   0x00000200
#define RSC_FLAG_SETUPAPI           0x00000400

138 139 140 141
/* Flags for LaunchINFSection */
#define LIS_QUIET                   0x00000001
#define LIS_NOGRPCONV               0x00000002

142 143 144 145
/* Flags for DelNode */
#define ADN_DEL_IF_EMPTY            0x00000001
#define ADN_DONT_DEL_SUBDIRS        0x00000002
#define ADN_DONT_DEL_DIR            0x00000004
146
#define ADN_DEL_UNC_PATHS           0x00000008
147

148 149 150 151 152 153 154 155 156 157 158 159 160 161
/* 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

162 163 164 165 166 167 168 169 170 171
/* 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

172
HRESULT WINAPI AddDelBackupEntryA(LPCSTR lpcszFileList, LPCSTR lpcszBackupDir,
173
     LPCSTR lpcszBaseName, DWORD dwFlags);
174 175 176 177
HRESULT WINAPI AddDelBackupEntryW(LPCWSTR lpcszFileList, LPCWSTR lpcszBackupDir,
     LPCWSTR lpcszBaseName, DWORD dwFlags);
#define AddDelBackupEntry WINELIB_NAME_AW(AddDelBackupEntry)
HRESULT WINAPI AdvInstallFileA(HWND hwnd, LPCSTR lpszSourceDir,
178 179
     LPCSTR lpszSourceFile, LPCSTR lpszDestDir, LPCSTR lpszDestFile,
     DWORD dwFlags, DWORD dwReserved);
180 181 182 183
HRESULT WINAPI AdvInstallFileW(HWND hwnd, LPCWSTR lpszSourceDir,
     LPCWSTR lpszSourceFile, LPCWSTR lpszDestDir, LPCWSTR lpszDestFile,
     DWORD dwFlags, DWORD dwReserved);
#define AdvInstallFile WINELIB_NAME_AW(AdvInstallFile)
184
HRESULT WINAPI CloseINFEngine(HINF hInf);
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
HRESULT WINAPI DelNodeA(LPCSTR pszFileOrDirName, DWORD dwFlags);
HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags);
#define DelNode WINELIB_NAME_AW(DelNode)
HRESULT WINAPI DelNodeRunDLL32A(HWND,HINSTANCE,LPSTR,INT);
HRESULT WINAPI DelNodeRunDLL32W(HWND,HINSTANCE,LPWSTR,INT);
#define DelNodeRunDLL32 WINELIB_NAME_AW(DelNodeRunDLL32)
HRESULT WINAPI ExecuteCabA( HWND hwnd, CABINFOA* pCab, LPVOID pReserved );
HRESULT WINAPI ExecuteCabW( HWND hwnd, CABINFOW* pCab, LPVOID pReserved );
#define ExecuteCab WINELIB_NAME_AW(ExecuteCab)
HRESULT WINAPI ExtractFilesA(LPCSTR,LPCSTR,DWORD,LPCSTR,LPVOID,DWORD);
HRESULT WINAPI ExtractFilesW(LPCWSTR,LPCWSTR,DWORD,LPCWSTR,LPVOID,DWORD);
#define ExtractFiles WINELIB_NAME_AW(ExtractFiles)
HRESULT WINAPI FileSaveMarkNotExistA(LPSTR pszFileList, LPSTR pszDir, LPSTR pszBaseName);
HRESULT WINAPI FileSaveMarkNotExistW(LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName);
#define FileSaveMarkNotExist WINELIB_NAME_AW(FileSaveMarkNotExist)
HRESULT WINAPI FileSaveRestoreA(HWND hDlg, LPSTR pszFileList, LPSTR pszDir,
201
     LPSTR pszBaseName, DWORD dwFlags);
202 203 204 205 206 207 208 209 210 211 212 213 214 215
HRESULT WINAPI FileSaveRestoreW(HWND hDlg, LPWSTR pszFileList, LPWSTR pszDir,
     LPWSTR pszBaseName, DWORD dwFlags);
#define FileSaveRestore WINELIB_NAME_AW(FileSaveRestore)
HRESULT WINAPI FileSaveRestoreOnINFA(HWND hWnd, LPCSTR pszTitle, LPCSTR pszINF,
     LPCSTR pszSection, LPCSTR pszBackupDir, LPCSTR pszBaseBackupFile, DWORD dwFlags);
HRESULT WINAPI FileSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF,
     LPCWSTR pszSection, LPCWSTR pszBackupDir, LPCWSTR pszBaseBackupFile, DWORD dwFlags);
#define FileSaveRestoreOnINF WINELIB_NAME_AW(FileSaveRestoreOnINF)
HRESULT WINAPI GetVersionFromFileA(LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion);
HRESULT WINAPI GetVersionFromFileW(LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion);
#define GetVersionFromFile WINELIB_NAME_AW(GetVersionFromFile)
HRESULT WINAPI GetVersionFromFileExA(LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion);
HRESULT WINAPI GetVersionFromFileExW(LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion);
#define GetVersionFromFileEx WINELIB_NAME_AW(GetVersionFromFileEx)
216
BOOL WINAPI IsNTAdmin(DWORD,LPDWORD);
217 218 219 220 221 222
INT WINAPI LaunchINFSectionA(HWND,HINSTANCE,LPSTR,INT);
INT WINAPI LaunchINFSectionW(HWND,HINSTANCE,LPWSTR,INT);
#define LaunchINFSection WINELIB_NAME_AW(LaunchINFSection)
HRESULT WINAPI LaunchINFSectionExA(HWND,HINSTANCE,LPSTR,INT);
HRESULT WINAPI LaunchINFSectionExW(HWND,HINSTANCE,LPWSTR,INT);
#define LaunchINFSectionEx WINELIB_NAME_AW(LaunchINFSectionEx)
223 224
DWORD WINAPI NeedRebootInit(VOID);
BOOL WINAPI NeedReboot(DWORD dwRebootCheck);
225
HRESULT WINAPI OpenINFEngineA(LPCSTR pszInfFilename, LPCSTR pszInstallSection,
226
     DWORD dwFlags, HINF *phInf, PVOID pvReserved);
227 228 229
HRESULT WINAPI OpenINFEngineW(LPCWSTR pszInfFilename, LPCWSTR pszInstallSection,
     DWORD dwFlags, HINF *phInf, PVOID pvReserved);
#define OpenINFEngine WINELIB_NAME_AW(OpenINFEngine)
230 231
HRESULT WINAPI RebootCheckOnInstallA(HWND hWnd, LPCSTR pszINF, LPCSTR pszSec, DWORD dwReserved);
HRESULT WINAPI RebootCheckOnInstallW(HWND hWnd, LPCWSTR pszINF, LPCWSTR pszSec, DWORD dwReserved);
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
#define RebootCheckOnInstall WINELIB_NAME_AW(RebootCheckOnInstall)
HRESULT WINAPI RegInstallA(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
HRESULT WINAPI RegInstallW(HMODULE hm, LPCWSTR pszSection, const STRTABLEW* pstTable);
#define RegInstall WINELIB_NAME_AW(RegInstall)
HRESULT WINAPI RegRestoreAllA(HWND hWnd, LPSTR pszTitleString, HKEY hkBackupKey);
HRESULT WINAPI RegRestoreAllW(HWND hWnd, LPWSTR pszTitleString, HKEY hkBackupKey);
#define RegRestoreAll WINELIB_NAME_AW(RegRestoreAll)
HRESULT WINAPI RegSaveRestoreA(HWND hWnd, LPCSTR pszTitleString, HKEY hkBackupKey,
     LPCSTR pcszRootKey, LPCSTR pcszSubKey, LPCSTR pcszValueName, DWORD dwFlags);
HRESULT WINAPI RegSaveRestoreW(HWND hWnd, LPCWSTR pszTitleString, HKEY hkBackupKey,
     LPCWSTR pcszRootKey, LPCWSTR pcszSubKey, LPCWSTR pcszValueName, DWORD dwFlags);
#define RegSaveRestore WINELIB_NAME_AW(RegSaveRestore)
HRESULT WINAPI RegSaveRestoreOnINFA(HWND hWnd, LPCSTR pszTitle, LPCSTR pszINF,
     LPCSTR pszSection, HKEY hHKLMBackKey, HKEY hHKCUBackKey, DWORD dwFlags);
HRESULT WINAPI RegSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF,
     LPCWSTR pszSection, HKEY hHKLMBackKey, HKEY hHKCUBackKey, DWORD dwFlags);
#define RegSaveRestoreOnINF WINELIB_NAME_AW(RegSaveRestoreOnINF)
HRESULT WINAPI RunSetupCommandA(HWND hWnd,
250 251
     LPCSTR szCmdName, LPCSTR szInfSection, LPCSTR szDir, LPCSTR lpszTitle,
     HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved);
252 253 254 255
HRESULT WINAPI RunSetupCommandW(HWND hWnd,
     LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle,
     HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved);
#define RunSetupCommand WINELIB_NAME_AW(RunSetupCommand)
256 257
HRESULT WINAPI SetPerUserSecValuesA(PERUSERSECTIONA* pPerUser);
HRESULT WINAPI SetPerUserSecValuesW(PERUSERSECTIONW* pPerUser);
258 259 260
#define SetPerUserSecValues WINELIB_NAME_AW(SetPerUserSecValues)
HRESULT WINAPI TranslateInfStringA(LPCSTR pszInfFilename, LPCSTR pszInstallSection,
     LPCSTR pszTranslateSection, LPCSTR pszTranslateKey, LPSTR pszBuffer,
261
     DWORD dwBufferSize, PDWORD pdwRequiredSize, PVOID pvReserved);
262 263 264 265 266 267 268 269 270
HRESULT WINAPI TranslateInfStringW(LPCWSTR pszInfFilename, LPCWSTR pszInstallSection,
     LPCWSTR pszTranslateSection, LPCWSTR pszTranslateKey, LPWSTR pszBuffer,
     DWORD dwBufferSize, PDWORD pdwRequiredSize, PVOID pvReserved);
#define TranslateInfString WINELIB_NAME_AW(TranslateInfString)
HRESULT WINAPI TranslateInfStringExA(HINF hInf, LPCSTR pszInfFilename,
    LPCSTR pszTranslateSection, LPCSTR pszTranslateKey, LPSTR pszBuffer,
    DWORD dwBufferSize, PDWORD pdwRequiredSize, PVOID pvReserved);
HRESULT WINAPI TranslateInfStringExW(HINF hInf, LPCWSTR pszInfFilename,
    LPCWSTR pszTranslateSection, LPCWSTR pszTranslateKey, LPWSTR pszBuffer,
271
    DWORD dwBufferSize, PDWORD pdwRequiredSize, PVOID pvReserved);
272 273 274 275 276 277 278
#define TranslateInfStringEx WINELIB_NAME_AW(TranslateInfStringEx)
HRESULT WINAPI UserInstStubWrapperA(HWND hWnd, HINSTANCE hInstance, LPSTR pszParms, INT nShow);
HRESULT WINAPI UserInstStubWrapperW(HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow);
#define UserInstStubWrapper WINELIB_NAME_AW(UserInstStubWrapper)
HRESULT WINAPI UserUnInstStubWrapperA(HWND hWnd, HINSTANCE hInstance, LPSTR pszParms, INT nShow);
HRESULT WINAPI UserUnInstStubWrapperW(HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow);
#define UserUnInstStubWrapper WINELIB_NAME_AW(UserUnInstStubWrapper)
279 280 281 282 283 284

#ifdef __cplusplus
}
#endif

#endif /* __WINE_ADVPUB_H */