ReactOS 0.4.15-dev-8207-gd73a838
advpub.h File Reference
#include <setupapi.h>
Include dependency graph for advpub.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _CabInfoA
 
struct  _CabInfoW
 
struct  _PERUSERSECTIONA
 
struct  _PERUSERSECTIONW
 
struct  _StrEntryA
 
struct  _StrEntryW
 
struct  _StrTableA
 
struct  _StrTableW
 

Macros

#define S_ASYNCHRONOUS   _HRESULT_TYPEDEF_(0x401E8L)
 
#define AADBE_ADD_ENTRY   0x01
 
#define AADBE_DEL_ENTRY   0x02
 
#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
 
#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
 
#define LIS_QUIET   0x00000001
 
#define LIS_NOGRPCONV   0x00000002
 
#define ADN_DEL_IF_EMPTY   0x00000001
 
#define ADN_DONT_DEL_SUBDIRS   0x00000002
 
#define ADN_DONT_DEL_DIR   0x00000004
 
#define ADN_DEL_UNC_PATHS   0x00000008
 
#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
 
#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
 
#define AddDelBackupEntry   WINELIB_NAME_AW(AddDelBackupEntry)
 
#define AdvInstallFile   WINELIB_NAME_AW(AdvInstallFile)
 
#define DelNode   WINELIB_NAME_AW(DelNode)
 
#define DelNodeRunDLL32   WINELIB_NAME_AW(DelNodeRunDLL32)
 
#define ExecuteCab   WINELIB_NAME_AW(ExecuteCab)
 
#define ExtractFiles   WINELIB_NAME_AW(ExtractFiles)
 
#define FileSaveMarkNotExist   WINELIB_NAME_AW(FileSaveMarkNotExist)
 
#define FileSaveRestore   WINELIB_NAME_AW(FileSaveRestore)
 
#define FileSaveRestoreOnINF   WINELIB_NAME_AW(FileSaveRestoreOnINF)
 
#define GetVersionFromFile   WINELIB_NAME_AW(GetVersionFromFile)
 
#define GetVersionFromFileEx   WINELIB_NAME_AW(GetVersionFromFileEx)
 
#define LaunchINFSection   WINELIB_NAME_AW(LaunchINFSection)
 
#define LaunchINFSectionEx   WINELIB_NAME_AW(LaunchINFSectionEx)
 
#define OpenINFEngine   WINELIB_NAME_AW(OpenINFEngine)
 
#define RebootCheckOnInstall   WINELIB_NAME_AW(RebootCheckOnInstall)
 
#define RegInstall   WINELIB_NAME_AW(RegInstall)
 
#define RegRestoreAll   WINELIB_NAME_AW(RegRestoreAll)
 
#define RegSaveRestore   WINELIB_NAME_AW(RegSaveRestore)
 
#define RegSaveRestoreOnINF   WINELIB_NAME_AW(RegSaveRestoreOnINF)
 
#define RunSetupCommand   WINELIB_NAME_AW(RunSetupCommand)
 
#define SetPerUserSecValues   WINELIB_NAME_AW(SetPerUserSecValues)
 
#define TranslateInfString   WINELIB_NAME_AW(TranslateInfString)
 
#define TranslateInfStringEx   WINELIB_NAME_AW(TranslateInfStringEx)
 
#define UserInstStubWrapper   WINELIB_NAME_AW(UserInstStubWrapper)
 
#define UserUnInstStubWrapper   WINELIB_NAME_AW(UserUnInstStubWrapper)
 

Typedefs

typedef struct _CabInfoA CABINFOA
 
typedef struct _CabInfoAPCABINFOA
 
typedef struct _CabInfoW CABINFOW
 
typedef struct _CabInfoWPCABINFOW
 
typedef struct _PERUSERSECTIONA PERUSERSECTIONA
 
typedef struct _PERUSERSECTIONAPPERUSERSECTIONA
 
typedef struct _PERUSERSECTIONW PERUSERSECTIONW
 
typedef struct _PERUSERSECTIONWPPERUSERSECTIONW
 
typedef struct _StrEntryA STRENTRYA
 
typedef struct _StrEntryALPSTRENTRYA
 
typedef struct _StrEntryW STRENTRYW
 
typedef struct _StrEntryWLPSTRENTRYW
 
typedef struct _StrTableA STRTABLEA
 
typedef struct _StrTableALPSTRTABLEA
 
typedef const STRTABLEA CSTRTABLEA
 
typedef const STRTABLEALPCSTRTABLEA
 
typedef struct _StrTableW STRTABLEW
 
typedef struct _StrTableWLPSTRTABLEW
 
typedef const STRTABLEW CSTRTABLEW
 
typedef const STRTABLEWLPCSTRTABLEW
 

Functions

HRESULT WINAPI AddDelBackupEntryA (LPCSTR lpcszFileList, LPCSTR lpcszBackupDir, LPCSTR lpcszBaseName, DWORD dwFlags)
 
HRESULT WINAPI AddDelBackupEntryW (LPCWSTR lpcszFileList, LPCWSTR lpcszBackupDir, LPCWSTR lpcszBaseName, DWORD dwFlags)
 
HRESULT WINAPI AdvInstallFileA (HWND hwnd, LPCSTR lpszSourceDir, LPCSTR lpszSourceFile, LPCSTR lpszDestDir, LPCSTR lpszDestFile, DWORD dwFlags, DWORD dwReserved)
 
HRESULT WINAPI AdvInstallFileW (HWND hwnd, LPCWSTR lpszSourceDir, LPCWSTR lpszSourceFile, LPCWSTR lpszDestDir, LPCWSTR lpszDestFile, DWORD dwFlags, DWORD dwReserved)
 
HRESULT WINAPI CloseINFEngine (HINF hInf)
 
HRESULT WINAPI DelNodeA (LPCSTR pszFileOrDirName, DWORD dwFlags)
 
HRESULT WINAPI DelNodeW (LPCWSTR pszFileOrDirName, DWORD dwFlags)
 
HRESULT WINAPI DelNodeRunDLL32A (HWND, HINSTANCE, LPSTR, INT)
 
HRESULT WINAPI DelNodeRunDLL32W (HWND, HINSTANCE, LPWSTR, INT)
 
HRESULT WINAPI ExecuteCabA (HWND hwnd, CABINFOA *pCab, LPVOID pReserved)
 
HRESULT WINAPI ExecuteCabW (HWND hwnd, CABINFOW *pCab, LPVOID pReserved)
 
HRESULT WINAPI ExtractFilesA (LPCSTR, LPCSTR, DWORD, LPCSTR, LPVOID, DWORD)
 
HRESULT WINAPI ExtractFilesW (LPCWSTR, LPCWSTR, DWORD, LPCWSTR, LPVOID, DWORD)
 
HRESULT WINAPI FileSaveMarkNotExistA (_In_opt_ LPSTR pszFileList, _In_opt_ LPSTR pszDir, _In_opt_ LPSTR pszBaseName)
 
HRESULT WINAPI FileSaveMarkNotExistW (_In_opt_ LPWSTR pszFileList, _In_opt_ LPWSTR pszDir, _In_opt_ LPWSTR pszBaseName)
 
HRESULT WINAPI FileSaveRestoreA (HWND hDlg, LPSTR pszFileList, LPSTR pszDir, LPSTR pszBaseName, DWORD dwFlags)
 
HRESULT WINAPI FileSaveRestoreW (HWND hDlg, LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName, DWORD dwFlags)
 
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)
 
HRESULT WINAPI GetVersionFromFileA (LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
 
HRESULT WINAPI GetVersionFromFileW (LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
 
HRESULT WINAPI GetVersionFromFileExA (LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
 
HRESULT WINAPI GetVersionFromFileExW (LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
 
BOOL WINAPI IsNTAdmin (DWORD, LPDWORD)
 
INT WINAPI LaunchINFSectionA (HWND, HINSTANCE, LPSTR, INT)
 
INT WINAPI LaunchINFSectionW (HWND, HINSTANCE, LPWSTR, INT)
 
HRESULT WINAPI LaunchINFSectionExA (_In_opt_ HWND, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ INT)
 
HRESULT WINAPI LaunchINFSectionExW (_In_opt_ HWND, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ INT)
 
DWORD WINAPI NeedRebootInit (VOID)
 
BOOL WINAPI NeedReboot (DWORD dwRebootCheck)
 
HRESULT WINAPI OpenINFEngineA (LPCSTR pszInfFilename, LPCSTR pszInstallSection, DWORD dwFlags, HINF *phInf, PVOID pvReserved)
 
HRESULT WINAPI OpenINFEngineW (LPCWSTR pszInfFilename, LPCWSTR pszInstallSection, DWORD dwFlags, HINF *phInf, PVOID pvReserved)
 
HRESULT WINAPI RebootCheckOnInstallA (HWND hWnd, LPCSTR pszINF, LPCSTR pszSec, DWORD dwReserved)
 
HRESULT WINAPI RebootCheckOnInstallW (HWND hWnd, LPCWSTR pszINF, LPCWSTR pszSec, DWORD dwReserved)
 
HRESULT WINAPI RegInstallA (HMODULE hm, LPCSTR pszSection, const STRTABLEA *pstTable)
 
HRESULT WINAPI RegInstallW (HMODULE hm, LPCWSTR pszSection, const STRTABLEW *pstTable)
 
HRESULT WINAPI RegRestoreAllA (_In_opt_ HWND hWnd, _In_opt_ LPSTR pszTitleString, _In_ HKEY hkBackupKey)
 
HRESULT WINAPI RegRestoreAllW (_In_opt_ HWND hWnd, _In_opt_ LPWSTR pszTitleString, _In_ HKEY hkBackupKey)
 
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)
 
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)
 
HRESULT WINAPI RunSetupCommandA (HWND hWnd, LPCSTR szCmdName, LPCSTR szInfSection, LPCSTR szDir, LPCSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
 
HRESULT WINAPI RunSetupCommandW (HWND hWnd, LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
 
HRESULT WINAPI SetPerUserSecValuesA (PERUSERSECTIONA *pPerUser)
 
HRESULT WINAPI SetPerUserSecValuesW (PERUSERSECTIONW *pPerUser)
 
HRESULT WINAPI TranslateInfStringA (_In_ LPCSTR pszInfFilename, _In_ LPCSTR pszInstallSection, _In_ LPCSTR pszTranslateSection, _In_ LPCSTR pszTranslateKey, _Out_writes_opt_(dwBufferSize) LPSTR pszBuffer, _In_ DWORD dwBufferSize, _Out_ PDWORD pdwRequiredSize, _Reserved_ PVOID pvReserved)
 
HRESULT WINAPI TranslateInfStringW (_In_ LPCWSTR pszInfFilename, _In_ LPCWSTR pszInstallSection, _In_ LPCWSTR pszTranslateSection, _In_ LPCWSTR pszTranslateKey, _Out_writes_opt_(dwBufferSize) LPWSTR pszBuffer, _In_ DWORD dwBufferSize, _Out_ PDWORD pdwRequiredSize, _Reserved_ PVOID pvReserved)
 
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, DWORD dwBufferSize, PDWORD pdwRequiredSize, PVOID pvReserved)
 
HRESULT WINAPI UserInstStubWrapperA (HWND hWnd, HINSTANCE hInstance, LPSTR pszParms, INT nShow)
 
HRESULT WINAPI UserInstStubWrapperW (HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow)
 
HRESULT WINAPI UserUnInstStubWrapperA (HWND hWnd, HINSTANCE hInstance, LPSTR pszParms, INT nShow)
 
HRESULT WINAPI UserUnInstStubWrapperW (HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow)
 

Macro Definition Documentation

◆ AADBE_ADD_ENTRY

#define AADBE_ADD_ENTRY   0x01

Definition at line 115 of file advpub.h.

◆ AADBE_DEL_ENTRY

#define AADBE_DEL_ENTRY   0x02

Definition at line 116 of file advpub.h.

◆ AddDelBackupEntry

#define AddDelBackupEntry   WINELIB_NAME_AW(AddDelBackupEntry)

Definition at line 176 of file advpub.h.

◆ ADN_DEL_IF_EMPTY

#define ADN_DEL_IF_EMPTY   0x00000001

Definition at line 143 of file advpub.h.

◆ ADN_DEL_UNC_PATHS

#define ADN_DEL_UNC_PATHS   0x00000008

Definition at line 146 of file advpub.h.

◆ ADN_DONT_DEL_DIR

#define ADN_DONT_DEL_DIR   0x00000004

Definition at line 145 of file advpub.h.

◆ ADN_DONT_DEL_SUBDIRS

#define ADN_DONT_DEL_SUBDIRS   0x00000002

Definition at line 144 of file advpub.h.

◆ AdvInstallFile

#define AdvInstallFile   WINELIB_NAME_AW(AdvInstallFile)

Definition at line 183 of file advpub.h.

◆ AFSR_BACKNEW

#define AFSR_BACKNEW   IE4_BACKNEW

Definition at line 164 of file advpub.h.

◆ AFSR_EXTRAINCREFCNT

#define AFSR_EXTRAINCREFCNT   IE4_EXTRAINCREFCNT

Definition at line 170 of file advpub.h.

◆ AFSR_NODELETENEW

#define AFSR_NODELETENEW   IE4_NODELETENEW

Definition at line 165 of file advpub.h.

◆ AFSR_NOMESSAGES

#define AFSR_NOMESSAGES   IE4_NOMESSAGES

Definition at line 166 of file advpub.h.

◆ AFSR_NOPROGRESS

#define AFSR_NOPROGRESS   IE4_NOPROGRESS

Definition at line 167 of file advpub.h.

◆ AFSR_RESTORE

#define AFSR_RESTORE   IE4_RESTORE

Definition at line 163 of file advpub.h.

◆ AFSR_UPDREFCNT

#define AFSR_UPDREFCNT   IE4_UPDREFCNT

Definition at line 168 of file advpub.h.

◆ AFSR_USEREFCNT

#define AFSR_USEREFCNT   IE4_USEREFCNT

Definition at line 169 of file advpub.h.

◆ AIF_FORCE_FILE_IN_USE

#define AIF_FORCE_FILE_IN_USE   0x00000008

Definition at line 122 of file advpub.h.

◆ AIF_NO_VERSION_DIALOG

#define AIF_NO_VERSION_DIALOG   0x00000020

Definition at line 124 of file advpub.h.

◆ AIF_NOLANGUAGECHECK

#define AIF_NOLANGUAGECHECK   0x10000000

Definition at line 126 of file advpub.h.

◆ AIF_NOOVERWRITE

#define AIF_NOOVERWRITE   0x00000010

Definition at line 123 of file advpub.h.

◆ AIF_NOSKIP

#define AIF_NOSKIP   0x00000002

Definition at line 120 of file advpub.h.

◆ AIF_NOVERSIONCHECK

#define AIF_NOVERSIONCHECK   0x00000004

Definition at line 121 of file advpub.h.

◆ AIF_QUIET

#define AIF_QUIET   0x20000000

Definition at line 127 of file advpub.h.

◆ AIF_REPLACEONLY

#define AIF_REPLACEONLY   0x00000400

Definition at line 125 of file advpub.h.

◆ AIF_WARNIFSKIP

#define AIF_WARNIFSKIP   0x00000001

Definition at line 119 of file advpub.h.

◆ DelNode

#define DelNode   WINELIB_NAME_AW(DelNode)

Definition at line 187 of file advpub.h.

◆ DelNodeRunDLL32

#define DelNodeRunDLL32   WINELIB_NAME_AW(DelNodeRunDLL32)

Definition at line 190 of file advpub.h.

◆ ExecuteCab

#define ExecuteCab   WINELIB_NAME_AW(ExecuteCab)

Definition at line 193 of file advpub.h.

◆ ExtractFiles

#define ExtractFiles   WINELIB_NAME_AW(ExtractFiles)

Definition at line 196 of file advpub.h.

◆ FileSaveMarkNotExist

#define FileSaveMarkNotExist   WINELIB_NAME_AW(FileSaveMarkNotExist)

Definition at line 212 of file advpub.h.

◆ FileSaveRestore

#define FileSaveRestore   WINELIB_NAME_AW(FileSaveRestore)

Definition at line 218 of file advpub.h.

◆ FileSaveRestoreOnINF

#define FileSaveRestoreOnINF   WINELIB_NAME_AW(FileSaveRestoreOnINF)

Definition at line 223 of file advpub.h.

◆ GetVersionFromFile

#define GetVersionFromFile   WINELIB_NAME_AW(GetVersionFromFile)

Definition at line 226 of file advpub.h.

◆ GetVersionFromFileEx

#define GetVersionFromFileEx   WINELIB_NAME_AW(GetVersionFromFileEx)

Definition at line 229 of file advpub.h.

◆ IE4_BACKNEW

#define IE4_BACKNEW   0x00000002

Definition at line 150 of file advpub.h.

◆ IE4_EXTRAINCREFCNT

#define IE4_EXTRAINCREFCNT   0x00000800

Definition at line 160 of file advpub.h.

◆ IE4_FRDOALL

#define IE4_FRDOALL   0x00000100

Definition at line 157 of file advpub.h.

◆ IE4_NO_CRC_MAPPING

#define IE4_NO_CRC_MAPPING   0x00000040

Definition at line 155 of file advpub.h.

◆ IE4_NODELETENEW

#define IE4_NODELETENEW   0x00000004

Definition at line 151 of file advpub.h.

◆ IE4_NOENUMKEY

#define IE4_NOENUMKEY   0x00000020

Definition at line 154 of file advpub.h.

◆ IE4_NOMESSAGES

#define IE4_NOMESSAGES   0x00000008

Definition at line 152 of file advpub.h.

◆ IE4_NOPROGRESS

#define IE4_NOPROGRESS   0x00000010

Definition at line 153 of file advpub.h.

◆ IE4_REGSECTION

#define IE4_REGSECTION   0x00000080

Definition at line 156 of file advpub.h.

◆ IE4_RESTORE

#define IE4_RESTORE   0x00000001

Definition at line 149 of file advpub.h.

◆ IE4_UPDREFCNT

#define IE4_UPDREFCNT   0x00000200

Definition at line 158 of file advpub.h.

◆ IE4_USEREFCNT

#define IE4_USEREFCNT   0x00000400

Definition at line 159 of file advpub.h.

◆ LaunchINFSection

#define LaunchINFSection   WINELIB_NAME_AW(LaunchINFSection)

Definition at line 233 of file advpub.h.

◆ LaunchINFSectionEx

#define LaunchINFSectionEx   WINELIB_NAME_AW(LaunchINFSectionEx)

Definition at line 251 of file advpub.h.

◆ LIS_NOGRPCONV

#define LIS_NOGRPCONV   0x00000002

Definition at line 140 of file advpub.h.

◆ LIS_QUIET

#define LIS_QUIET   0x00000001

Definition at line 139 of file advpub.h.

◆ OpenINFEngine

#define OpenINFEngine   WINELIB_NAME_AW(OpenINFEngine)

Definition at line 259 of file advpub.h.

◆ RebootCheckOnInstall

#define RebootCheckOnInstall   WINELIB_NAME_AW(RebootCheckOnInstall)

Definition at line 262 of file advpub.h.

◆ RegInstall

#define RegInstall   WINELIB_NAME_AW(RegInstall)

Definition at line 265 of file advpub.h.

◆ RegRestoreAll

#define RegRestoreAll   WINELIB_NAME_AW(RegRestoreAll)

Definition at line 281 of file advpub.h.

◆ RegSaveRestore

#define RegSaveRestore   WINELIB_NAME_AW(RegSaveRestore)

Definition at line 287 of file advpub.h.

◆ RegSaveRestoreOnINF

#define RegSaveRestoreOnINF   WINELIB_NAME_AW(RegSaveRestoreOnINF)

Definition at line 292 of file advpub.h.

◆ RSC_FLAG_DELAYREGISTEROCX

#define RSC_FLAG_DELAYREGISTEROCX   0x00000200

Definition at line 135 of file advpub.h.

◆ RSC_FLAG_INF

#define RSC_FLAG_INF   0x00000001

Definition at line 130 of file advpub.h.

◆ RSC_FLAG_NGCONV

#define RSC_FLAG_NGCONV   0x00000008

Definition at line 133 of file advpub.h.

◆ RSC_FLAG_QUIET

#define RSC_FLAG_QUIET   0x00000004

Definition at line 132 of file advpub.h.

◆ RSC_FLAG_SETUPAPI

#define RSC_FLAG_SETUPAPI   0x00000400

Definition at line 136 of file advpub.h.

◆ RSC_FLAG_SKIPDISKSPACECHECK

#define RSC_FLAG_SKIPDISKSPACECHECK   0x00000002

Definition at line 131 of file advpub.h.

◆ RSC_FLAG_UPDHLPDLLS

#define RSC_FLAG_UPDHLPDLLS   0x00000010

Definition at line 134 of file advpub.h.

◆ RunSetupCommand

#define RunSetupCommand   WINELIB_NAME_AW(RunSetupCommand)

Definition at line 299 of file advpub.h.

◆ S_ASYNCHRONOUS

#define S_ASYNCHRONOUS   _HRESULT_TYPEDEF_(0x401E8L)

Definition at line 2120 of file urlmon.idl.

◆ SetPerUserSecValues

#define SetPerUserSecValues   WINELIB_NAME_AW(SetPerUserSecValues)

Definition at line 302 of file advpub.h.

◆ TranslateInfString

#define TranslateInfString   WINELIB_NAME_AW(TranslateInfString)

Definition at line 328 of file advpub.h.

◆ TranslateInfStringEx

#define TranslateInfStringEx   WINELIB_NAME_AW(TranslateInfStringEx)

Definition at line 335 of file advpub.h.

◆ UserInstStubWrapper

#define UserInstStubWrapper   WINELIB_NAME_AW(UserInstStubWrapper)

Definition at line 338 of file advpub.h.

◆ UserUnInstStubWrapper

#define UserUnInstStubWrapper   WINELIB_NAME_AW(UserUnInstStubWrapper)

Definition at line 341 of file advpub.h.

Typedef Documentation

◆ CABINFOA

◆ CABINFOW

◆ CSTRTABLEA

Definition at line 100 of file advpub.h.

◆ CSTRTABLEW

Definition at line 107 of file advpub.h.

◆ LPCSTRTABLEA

Definition at line 100 of file advpub.h.

◆ LPCSTRTABLEW

Definition at line 107 of file advpub.h.

◆ LPSTRENTRYA

◆ LPSTRENTRYW

◆ LPSTRTABLEA

◆ LPSTRTABLEW

◆ PCABINFOA

◆ PCABINFOW

◆ PERUSERSECTIONA

◆ PERUSERSECTIONW

◆ PPERUSERSECTIONA

◆ PPERUSERSECTIONW

◆ STRENTRYA

◆ STRENTRYW

◆ STRTABLEA

◆ STRTABLEW

Function Documentation

◆ AddDelBackupEntryA()

HRESULT WINAPI AddDelBackupEntryA ( LPCSTR  lpcszFileList,
LPCSTR  lpcszBackupDir,
LPCSTR  lpcszBaseName,
DWORD  dwFlags 
)

Definition at line 59 of file files.c.

61{
62 UNICODE_STRING backupdir, basename;
63 LPWSTR filelist;
66
67 TRACE("(%s, %s, %s, %d)\n", debugstr_a(lpcszFileList),
68 debugstr_a(lpcszBackupDir), debugstr_a(lpcszBaseName), dwFlags);
69
70 if (lpcszFileList)
71 filelist = ansi_to_unicode_list(lpcszFileList);
72 else
73 filelist = NULL;
74
75 RtlCreateUnicodeStringFromAsciiz(&backupdir, lpcszBackupDir);
77
78 if (lpcszBackupDir)
79 backup = backupdir.Buffer;
80 else
81 backup = NULL;
82
83 res = AddDelBackupEntryW(filelist, backup, basename.Buffer, dwFlags);
84
85 HeapFree(GetProcessHeap(), 0, filelist);
86
87 RtlFreeUnicodeString(&backupdir);
89
90 return res;
91}
static long backup()
Definition: maze.c:403
#define NULL
Definition: types.h:112
static LPWSTR ansi_to_unicode_list(LPCSTR ansi_list)
Definition: files.c:40
HRESULT WINAPI AddDelBackupEntryW(LPCWSTR lpcszFileList, LPCWSTR lpcszBackupDir, LPCWSTR lpcszBaseName, DWORD dwFlags)
Definition: files.c:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
static void basename(LPCWSTR path, LPWSTR name)
Definition: profile.c:38
GLuint res
Definition: glext.h:9613
#define debugstr_a
Definition: kernel32.h:31
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define TRACE(s)
Definition: solgame.cpp:4
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by FileSaveMarkNotExistA().

◆ AddDelBackupEntryW()

HRESULT WINAPI AddDelBackupEntryW ( LPCWSTR  lpcszFileList,
LPCWSTR  lpcszBackupDir,
LPCWSTR  lpcszBaseName,
DWORD  dwFlags 
)

Definition at line 117 of file files.c.

119{
120 WCHAR szIniPath[MAX_PATH];
121 LPCWSTR szString = NULL;
122
123 static const WCHAR szBackupEntry[] = {
124 '-','1',',','0',',','0',',','0',',','0',',','0',',','-','1',0
125 };
126
127 static const WCHAR backslash[] = {'\\',0};
128 static const WCHAR ini[] = {'.','i','n','i',0};
129 static const WCHAR backup[] = {'b','a','c','k','u','p',0};
130
131 TRACE("(%s, %s, %s, %d)\n", debugstr_w(lpcszFileList),
132 debugstr_w(lpcszBackupDir), debugstr_w(lpcszBaseName), dwFlags);
133
134 if (!lpcszFileList || !*lpcszFileList)
135 return S_OK;
136
137 if (lpcszBackupDir)
138 lstrcpyW(szIniPath, lpcszBackupDir);
139 else
140 GetWindowsDirectoryW(szIniPath, MAX_PATH);
141
142 lstrcatW(szIniPath, backslash);
143 lstrcatW(szIniPath, lpcszBaseName);
144 lstrcatW(szIniPath, ini);
145
147
149 szString = szBackupEntry;
150 else if (dwFlags & AADBE_DEL_ENTRY)
151 szString = NULL;
152
153 /* add or delete the INI entries */
154 while (*lpcszFileList)
155 {
156 WritePrivateProfileStringW(backup, lpcszFileList, szString, szIniPath);
157 lpcszFileList += lstrlenW(lpcszFileList) + 1;
158 }
159
160 /* hide the INI file */
162
163 return S_OK;
164}
#define AADBE_DEL_ENTRY
Definition: advpub.h:116
#define AADBE_ADD_ENTRY
Definition: advpub.h:115
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:794
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
Definition: profile.c:1453
#define S_OK
Definition: intsafe.h:52
#define debugstr_w
Definition: kernel32.h:32
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
TConfig ini
Definition: tnconfig.cpp:45
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by AddDelBackupEntryA(), and FileSaveMarkNotExistW().

◆ AdvInstallFileA()

HRESULT WINAPI AdvInstallFileA ( HWND  hwnd,
LPCSTR  lpszSourceDir,
LPCSTR  lpszSourceFile,
LPCSTR  lpszDestDir,
LPCSTR  lpszDestFile,
DWORD  dwFlags,
DWORD  dwReserved 
)

Definition at line 196 of file files.c.

199{
200 UNICODE_STRING sourcedir, sourcefile;
201 UNICODE_STRING destdir, destfile;
202 HRESULT res;
203
204 TRACE("(%p, %s, %s, %s, %s, %d, %d)\n", hwnd, debugstr_a(lpszSourceDir),
205 debugstr_a(lpszSourceFile), debugstr_a(lpszDestDir),
206 debugstr_a(lpszDestFile), dwFlags, dwReserved);
207
208 if (!lpszSourceDir || !lpszSourceFile || !lpszDestDir)
209 return E_INVALIDARG;
210
211 RtlCreateUnicodeStringFromAsciiz(&sourcedir, lpszSourceDir);
212 RtlCreateUnicodeStringFromAsciiz(&sourcefile, lpszSourceFile);
213 RtlCreateUnicodeStringFromAsciiz(&destdir, lpszDestDir);
214 RtlCreateUnicodeStringFromAsciiz(&destfile, lpszDestFile);
215
216 res = AdvInstallFileW(hwnd, sourcedir.Buffer, sourcefile.Buffer,
217 destdir.Buffer, destfile.Buffer, dwFlags, dwReserved);
218
219 RtlFreeUnicodeString(&sourcedir);
220 RtlFreeUnicodeString(&sourcefile);
221 RtlFreeUnicodeString(&destdir);
222 RtlFreeUnicodeString(&destfile);
223
224 return res;
225}
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT WINAPI AdvInstallFileW(HWND hwnd, LPCWSTR lpszSourceDir, LPCWSTR lpszSourceFile, LPCWSTR lpszDestDir, LPCWSTR lpszDestFile, DWORD dwFlags, DWORD dwReserved)
Definition: files.c:249
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ AdvInstallFileW()

HRESULT WINAPI AdvInstallFileW ( HWND  hwnd,
LPCWSTR  lpszSourceDir,
LPCWSTR  lpszSourceFile,
LPCWSTR  lpszDestDir,
LPCWSTR  lpszDestFile,
DWORD  dwFlags,
DWORD  dwReserved 
)

Definition at line 249 of file files.c.

252{
253 PSP_FILE_CALLBACK_W pFileCallback;
254 LPWSTR szDestFilename;
256 WCHAR szRootPath[ROOT_LENGTH];
257 DWORD dwLen, dwLastError;
258 HSPFILEQ fileQueue;
259 PVOID pContext;
260
261 TRACE("(%p, %s, %s, %s, %s, %d, %d)\n", hwnd, debugstr_w(lpszSourceDir),
262 debugstr_w(lpszSourceFile), debugstr_w(lpszDestDir),
263 debugstr_w(lpszDestFile), dwFlags, dwReserved);
264
265 if (!lpszSourceDir || !lpszSourceFile || !lpszDestDir)
266 return E_INVALIDARG;
267
268 fileQueue = SetupOpenFileQueue();
269 if (fileQueue == INVALID_HANDLE_VALUE)
271
272 pContext = NULL;
273 dwLastError = ERROR_SUCCESS;
274
275 lstrcpynW(szRootPath, lpszSourceDir, ROOT_LENGTH);
276 szPath = lpszSourceDir + ROOT_LENGTH;
277
278 /* use lpszSourceFile as destination filename if lpszDestFile is NULL */
279 if (lpszDestFile)
280 {
281 dwLen = lstrlenW(lpszDestFile);
282 szDestFilename = HeapAlloc(GetProcessHeap(), 0, (dwLen+1) * sizeof(WCHAR));
283 lstrcpyW(szDestFilename, lpszDestFile);
284 }
285 else
286 {
287 dwLen = lstrlenW(lpszSourceFile);
288 szDestFilename = HeapAlloc(GetProcessHeap(), 0, (dwLen+1) * sizeof(WCHAR));
289 lstrcpyW(szDestFilename, lpszSourceFile);
290 }
291
292 /* add the file copy operation to the setup queue */
293 if (!SetupQueueCopyW(fileQueue, szRootPath, szPath, lpszSourceFile, NULL,
294 NULL, lpszDestDir, szDestFilename, dwFlags))
295 {
296 dwLastError = GetLastError();
297 goto done;
298 }
299
301 0, 0, NULL);
302 if (!pContext)
303 {
304 dwLastError = GetLastError();
305 goto done;
306 }
307
308 /* don't output anything for AIF_QUIET */
309 if (dwFlags & AIF_QUIET)
310 pFileCallback = pQuietQueueCallback;
311 else
312 pFileCallback = pQueueCallback;
313
314 /* perform the file copy */
315 if (!SetupCommitFileQueueW(hwnd, fileQueue, pFileCallback, pContext))
316 {
317 dwLastError = GetLastError();
318 goto done;
319 }
320
321done:
323 SetupCloseFileQueue(fileQueue);
324
325 HeapFree(GetProcessHeap(), 0, szDestFilename);
326
327 return HRESULT_FROM_WIN32(dwLastError);
328}
#define AIF_QUIET
Definition: advpub.h:127
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT CALLBACK pQuietQueueCallback(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
Definition: files.c:169
static UINT CALLBACK pQueueCallback(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
Definition: files.c:175
#define ROOT_LENGTH
Definition: files.c:167
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define HeapAlloc
Definition: compat.h:733
#define lstrcpynW
Definition: compat.h:738
PVOID WINAPI SetupInitDefaultQueueCallbackEx(HWND owner, HWND progress, UINT msg, DWORD reserved1, PVOID reserved2)
Definition: queue.c:1638
void WINAPI SetupTermDefaultQueueCallback(PVOID context)
Definition: queue.c:1656
BOOL WINAPI SetupQueueCopyW(HSPFILEQ queue, PCWSTR src_root, PCWSTR src_path, PCWSTR src_file, PCWSTR src_descr, PCWSTR src_tag, PCWSTR dst_dir, PCWSTR dst_file, DWORD style)
Definition: queue.c:574
UINT(CALLBACK * PSP_FILE_CALLBACK_W)(IN PVOID Context, IN UINT Notification, IN UINT_PTR Param1, IN UINT_PTR Param2)
Definition: fileqsup.h:66
unsigned long DWORD
Definition: ntddk_ex.h:95
LPCWSTR szPath
Definition: env.c:37
#define SetupOpenFileQueue
Definition: fileqsup.c:29
#define SetupCommitFileQueueW
Definition: fileqsup.c:33
#define SetupCloseFileQueue
Definition: fileqsup.c:30
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92

Referenced by AdvInstallFileA().

◆ CloseINFEngine()

HRESULT WINAPI CloseINFEngine ( HINF  hInf)

Definition at line 199 of file advpack.c.

200{
201 TRACE("(%p)\n", hInf);
202
203 if (!hInf)
204 return E_INVALIDARG;
205
206 SetupCloseInfFile(hInf);
207 return S_OK;
208}
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
Definition: infsupp.c:45

◆ DelNodeA()

HRESULT WINAPI DelNodeA ( LPCSTR  pszFileOrDirName,
DWORD  dwFlags 
)

Definition at line 417 of file files.c.

418{
419 UNICODE_STRING fileordirname;
420 HRESULT res;
421
422 TRACE("(%s, %d)\n", debugstr_a(pszFileOrDirName), dwFlags);
423
424 RtlCreateUnicodeStringFromAsciiz(&fileordirname, pszFileOrDirName);
425
426 res = DelNodeW(fileordirname.Buffer, dwFlags);
427
428 RtlFreeUnicodeString(&fileordirname);
429
430 return res;
431}
HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
Definition: files.c:451

◆ DelNodeRunDLL32A()

HRESULT WINAPI DelNodeRunDLL32A ( HWND  hWnd,
HINSTANCE  hInst,
LPSTR  cmdline,
INT  show 
)

Definition at line 483 of file files.c.

484{
486 HRESULT hr;
487
488 TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_a(cmdline), show);
489
491
492 hr = DelNodeRunDLL32W(hWnd, hInst, params.Buffer, show);
493
495
496 return hr;
497}
HWND hWnd
Definition: settings.c:17
HRESULT WINAPI DelNodeRunDLL32W(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
Definition: files.c:514
HINSTANCE hInst
Definition: dxdiag.c:13
GLenum const GLfloat * params
Definition: glext.h:5645
HRESULT hr
Definition: shlfolder.c:183
TCHAR * cmdline
Definition: stretchblt.cpp:32

◆ DelNodeRunDLL32W()

HRESULT WINAPI DelNodeRunDLL32W ( HWND  hWnd,
HINSTANCE  hInst,
LPWSTR  cmdline,
INT  show 
)

Definition at line 514 of file files.c.

515{
516 LPWSTR szFilename, szFlags;
517 LPWSTR cmdline_copy, cmdline_ptr;
518 DWORD dwFlags = 0;
519 HRESULT res;
520
521 TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_w(cmdline), show);
522
523 cmdline_copy = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(cmdline) + 1) * sizeof(WCHAR));
524 cmdline_ptr = cmdline_copy;
525 lstrcpyW(cmdline_copy, cmdline);
526
527 /* get the parameters at indexes 0 and 1 respectively */
528 szFilename = get_parameter(&cmdline_ptr, ',', TRUE);
529 szFlags = get_parameter(&cmdline_ptr, ',', TRUE);
530
531 if (szFlags)
532 dwFlags = wcstol(szFlags, NULL, 10);
533
534 res = DelNodeW(szFilename, dwFlags);
535
536 HeapFree(GetProcessHeap(), 0, cmdline_copy);
537
538 return res;
539}
LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted) DECLSPEC_HIDDEN
Definition: install.c:200
#define TRUE
Definition: types.h:120
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)

Referenced by DelNodeRunDLL32A().

◆ DelNodeW()

HRESULT WINAPI DelNodeW ( LPCWSTR  pszFileOrDirName,
DWORD  dwFlags 
)

Definition at line 451 of file files.c.

452{
453 WCHAR fname[MAX_PATH];
455
456 TRACE("(%s, %d)\n", debugstr_w(pszFileOrDirName), dwFlags);
457
458#ifdef __REACTOS__
460 FIXME("Flags %#x ignored!\n", dwFlags & ~ADN_DEL_IF_EMPTY);
461#else
462 if (dwFlags)
463 FIXME("Flags ignored!\n");
464#endif
465
466 if (pszFileOrDirName && *pszFileOrDirName)
467 {
468 lstrcpyW(fname, pszFileOrDirName);
469
470 /* TODO: Should check for system directory deletion etc. here */
471
473 }
474
475 return ret;
476}
#define ADN_DEL_IF_EMPTY
Definition: DelNode.c:13
#define FIXME(fmt,...)
Definition: debug.h:114
#define E_FAIL
Definition: ddrawi.h:102
static HRESULT DELNODE_recurse_dirtree(LPWSTR fname, DWORD flags)
Definition: files.c:330
int ret

Referenced by del_dirs_callback(), DelNodeA(), and DelNodeRunDLL32W().

◆ ExecuteCabA()

HRESULT WINAPI ExecuteCabA ( HWND  hwnd,
CABINFOA pCab,
LPVOID  pReserved 
)

Definition at line 618 of file install.c.

619{
620 UNICODE_STRING cab, inf, section;
621 CABINFOW cabinfo;
622 HRESULT hr;
623
624 TRACE("(%p, %p, %p)\n", hwnd, pCab, pReserved);
625
626 if (!pCab)
627 return E_INVALIDARG;
628
629 if (pCab->pszCab)
630 {
632 cabinfo.pszCab = cab.Buffer;
633 }
634 else
635 cabinfo.pszCab = NULL;
636
639
640 MultiByteToWideChar(CP_ACP, 0, pCab->szSrcPath, -1, cabinfo.szSrcPath, ARRAY_SIZE(cabinfo.szSrcPath));
641
642 cabinfo.pszInf = inf.Buffer;
643 cabinfo.pszSection = section.Buffer;
644 cabinfo.dwFlags = pCab->dwFlags;
645
646 hr = ExecuteCabW(hwnd, &cabinfo, pReserved);
647
648 if (pCab->pszCab)
650
653
654 return hr;
655}
#define ARRAY_SIZE(A)
Definition: main.h:33
HRESULT WINAPI ExecuteCabW(HWND hwnd, CABINFOW *pCab, LPVOID pReserved)
Definition: install.c:671
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
LPSTR pszCab
Definition: advpub.h:34
DWORD dwFlags
Definition: advpub.h:38
LPSTR pszSection
Definition: advpub.h:36
LPSTR pszInf
Definition: advpub.h:35
CHAR szSrcPath[MAX_PATH]
Definition: advpub.h:37
LPWSTR pszSection
Definition: advpub.h:45
WCHAR szSrcPath[MAX_PATH]
Definition: advpub.h:46
LPWSTR pszCab
Definition: advpub.h:43
LPWSTR pszInf
Definition: advpub.h:44
DWORD dwFlags
Definition: advpub.h:47
Definition: parser.c:56

◆ ExecuteCabW()

HRESULT WINAPI ExecuteCabW ( HWND  hwnd,
CABINFOW pCab,
LPVOID  pReserved 
)

Definition at line 671 of file install.c.

672{
674 HRESULT hr;
675
676 TRACE("(%p, %p, %p)\n", hwnd, pCab, pReserved);
677
678 ZeroMemory(&info, sizeof(ADVInfo));
679
680 if (pCab->pszCab && *pCab->pszCab)
681 FIXME("Cab archive not extracted!\n");
682
683 hr = install_init(pCab->pszInf, pCab->pszSection, pCab->szSrcPath, pCab->dwFlags, &info);
684 if (hr != S_OK)
685 goto done;
686
688 if (hr != S_OK)
689 goto done;
690
691 hr = adv_install(&info);
692
693done:
695
696 return hr;
697}
static void install_release(const ADVInfo *info)
Definition: install.c:516
static HRESULT spapi_install(const ADVInfo *info)
Definition: install.c:316
static HRESULT adv_install(ADVInfo *info)
Definition: install.c:351
static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, LPCWSTR working_dir, DWORD flags, ADVInfo *info)
Definition: install.c:441
#define ZeroMemory
Definition: winbase.h:1712

Referenced by ExecuteCabA(), LaunchINFSectionExW(), and RegInstallW().

◆ ExtractFilesA()

HRESULT WINAPI ExtractFilesA ( LPCSTR  CabName,
LPCSTR  ExpandDir,
DWORD  Flags,
LPCSTR  FileList,
LPVOID  LReserved,
DWORD  Reserved 
)

Definition at line 712 of file files.c.

714{
717 HRESULT res = S_OK;
718 DWORD dwFileCount = 0;
719 DWORD dwFilesFound = 0;
720 LPSTR szConvertedList = NULL;
721
722 TRACE("(%s, %s, %d, %s, %p, %d)\n", debugstr_a(CabName), debugstr_a(ExpandDir),
723 Flags, debugstr_a(FileList), LReserved, Reserved);
724
725 if (!CabName || !ExpandDir)
726 return E_INVALIDARG;
727
730
731 hCabinet = LoadLibraryA("cabinet.dll");
732 if (!hCabinet)
733 return E_FAIL;
734
735 ZeroMemory(&session, sizeof(SESSION));
736
737 pExtract = (void *)GetProcAddress(hCabinet, "Extract");
738 if (!pExtract)
739 {
740 res = E_FAIL;
741 goto done;
742 }
743
744 lstrcpyA(session.Destination, ExpandDir);
745
746 if (FileList)
747 {
748 szConvertedList = convert_file_list(FileList, &dwFileCount);
749 if (!szConvertedList)
750 {
751 res = E_FAIL;
752 goto done;
753 }
754
755 dwFilesFound = fill_file_list(&session, CabName, szConvertedList);
756 if (dwFilesFound != dwFileCount)
757 {
758 res = E_FAIL;
759 goto done;
760 }
761 }
762 else
763 session.Operation |= EXTRACT_FILLFILELIST;
764
765 session.Operation |= EXTRACT_EXTRACTFILES;
766 res = pExtract(&session, CabName);
767
768done:
771 HeapFree(GetProcessHeap(), 0, szConvertedList);
772
773 return res;
774}
vector< FileInfo > FileList
Definition: DriveVolume.h:63
static LPSTR convert_file_list(LPCSTR FileList, DWORD *dwNumFiles)
Definition: files.c:570
#define EXTRACT_EXTRACTFILES
Definition: files.c:545
static void free_file_list(SESSION *session)
Definition: files.c:675
static DWORD fill_file_list(SESSION *session, LPCSTR szCabName, LPCSTR szFileList)
Definition: files.c:648
#define EXTRACT_FILLFILELIST
Definition: files.c:544
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:636
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
Definition: files.c:553
static HMODULE hCabinet
Definition: urlmon_main.c:45
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
char * LPSTR
Definition: xmlstorage.h:182

Referenced by ExtractFilesW().

◆ ExtractFilesW()

HRESULT WINAPI ExtractFilesW ( LPCWSTR  CabName,
LPCWSTR  ExpandDir,
DWORD  Flags,
LPCWSTR  FileList,
LPVOID  LReserved,
DWORD  Reserved 
)

Definition at line 804 of file files.c.

806{
807 char *cab_name = NULL, *expand_dir = NULL, *file_list = NULL;
808 HRESULT hres = S_OK;
809
810 TRACE("(%s, %s, %d, %s, %p, %d)\n", debugstr_w(CabName), debugstr_w(ExpandDir),
811 Flags, debugstr_w(FileList), LReserved, Reserved);
812
813 if(CabName) {
814 cab_name = heap_strdupWtoA(CabName);
815 if(!cab_name)
816 return E_OUTOFMEMORY;
817 }
818
819 if(ExpandDir) {
820 expand_dir = heap_strdupWtoA(ExpandDir);
821 if(!expand_dir)
823 }
824
825 if(SUCCEEDED(hres) && FileList) {
826 file_list = heap_strdupWtoA(FileList);
827 if(!file_list)
829 }
830
831 /* cabinet.dll, which does the real job of extracting files, doesn't have UNICODE API,
832 so we need W->A conversion at some point anyway. */
833 if(SUCCEEDED(hres))
834 hres = ExtractFilesA(cab_name, expand_dir, Flags, file_list, LReserved, Reserved);
835
836 heap_free(cab_name);
837 heap_free(expand_dir);
838 heap_free(file_list);
839 return hres;
840}
static char * heap_strdupWtoA(const WCHAR *str)
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
HRESULT WINAPI ExtractFilesA(LPCSTR CabName, LPCSTR ExpandDir, DWORD Flags, LPCSTR FileList, LPVOID LReserved, DWORD Reserved)
Definition: files.c:712
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hres
Definition: protocol.c:465

Referenced by extract_cab_file().

◆ FileSaveMarkNotExistA()

HRESULT WINAPI FileSaveMarkNotExistA ( _In_opt_ LPSTR  pszFileList,
_In_opt_ LPSTR  pszDir,
_In_opt_ LPSTR  pszBaseName 
)

◆ FileSaveMarkNotExistW()

HRESULT WINAPI FileSaveMarkNotExistW ( _In_opt_ LPWSTR  pszFileList,
_In_opt_ LPWSTR  pszDir,
_In_opt_ LPWSTR  pszBaseName 
)

◆ FileSaveRestoreA()

HRESULT WINAPI FileSaveRestoreA ( HWND  hDlg,
LPSTR  pszFileList,
LPSTR  pszDir,
LPSTR  pszBaseName,
DWORD  dwFlags 
)

Definition at line 883 of file files.c.

885{
886 UNICODE_STRING filelist, dir, basename;
887 HRESULT hr;
888
889 TRACE("(%p, %s, %s, %s, %d)\n", hDlg, debugstr_a(pszFileList),
890 debugstr_a(pszDir), debugstr_a(pszBaseName), dwFlags);
891
892 RtlCreateUnicodeStringFromAsciiz(&filelist, pszFileList);
895
896 hr = FileSaveRestoreW(hDlg, filelist.Buffer, dir.Buffer,
897 basename.Buffer, dwFlags);
898
899 RtlFreeUnicodeString(&filelist);
902
903 return hr;
904}
unsigned int dir
Definition: maze.c:112
HRESULT WINAPI FileSaveRestoreW(HWND hDlg, LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName, DWORD dwFlags)
Definition: files.c:928
_In_ LPCSTR pszDir
Definition: shellapi.h:584

◆ FileSaveRestoreOnINFA()

HRESULT WINAPI FileSaveRestoreOnINFA ( HWND  hWnd,
LPCSTR  pszTitle,
LPCSTR  pszINF,
LPCSTR  pszSection,
LPCSTR  pszBackupDir,
LPCSTR  pszBaseBackupFile,
DWORD  dwFlags 
)

Definition at line 942 of file files.c.

945{
947 UNICODE_STRING backupdir, backupfile;
948 HRESULT hr;
949
950 TRACE("(%p, %s, %s, %s, %s, %s, %d)\n", hWnd, debugstr_a(pszTitle),
951 debugstr_a(pszINF), debugstr_a(pszSection), debugstr_a(pszBackupDir),
952 debugstr_a(pszBaseBackupFile), dwFlags);
953
957 RtlCreateUnicodeStringFromAsciiz(&backupdir, pszBackupDir);
958 RtlCreateUnicodeStringFromAsciiz(&backupfile, pszBaseBackupFile);
959
960 hr = FileSaveRestoreOnINFW(hWnd, title.Buffer, inf.Buffer, section.Buffer,
961 backupdir.Buffer, backupfile.Buffer, dwFlags);
962
966 RtlFreeUnicodeString(&backupdir);
967 RtlFreeUnicodeString(&backupfile);
968
969 return hr;
970}
HRESULT WINAPI FileSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, LPCWSTR pszSection, LPCWSTR pszBackupDir, LPCWSTR pszBaseBackupFile, DWORD dwFlags)
Definition: files.c:995
static char title[]
Definition: ps.c:92

◆ FileSaveRestoreOnINFW()

HRESULT WINAPI FileSaveRestoreOnINFW ( HWND  hWnd,
LPCWSTR  pszTitle,
LPCWSTR  pszINF,
LPCWSTR  pszSection,
LPCWSTR  pszBackupDir,
LPCWSTR  pszBaseBackupFile,
DWORD  dwFlags 
)

Definition at line 995 of file files.c.

998{
999 FIXME("(%p, %s, %s, %s, %s, %s, %d): stub\n", hWnd, debugstr_w(pszTitle),
1000 debugstr_w(pszINF), debugstr_w(pszSection), debugstr_w(pszBackupDir),
1001 debugstr_w(pszBaseBackupFile), dwFlags);
1002
1003 return E_FAIL;
1004}

Referenced by FileSaveRestoreOnINFA().

◆ FileSaveRestoreW()

HRESULT WINAPI FileSaveRestoreW ( HWND  hDlg,
LPWSTR  pszFileList,
LPWSTR  pszDir,
LPWSTR  pszBaseName,
DWORD  dwFlags 
)

Definition at line 928 of file files.c.

930{
931 FIXME("(%p, %s, %s, %s, %d) stub\n", hDlg, debugstr_w(pszFileList),
932 debugstr_w(pszDir), debugstr_w(pszBaseName), dwFlags);
933
934 return E_FAIL;
935}

Referenced by FileSaveRestoreA().

◆ GetVersionFromFileA()

HRESULT WINAPI GetVersionFromFileA ( LPCSTR  lpszFilename,
LPDWORD  pdwMSVer,
LPDWORD  pdwLSVer,
BOOL  bVersion 
)

Definition at line 1011 of file files.c.

1013{
1014 TRACE("(%s, %p, %p, %d)\n", debugstr_a(Filename), MajorVer, MinorVer, Version);
1015 return GetVersionFromFileExA(Filename, MajorVer, MinorVer, Version);
1016}
HRESULT WINAPI GetVersionFromFileExA(LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
Definition: files.c:1042
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:939
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469

◆ GetVersionFromFileExA()

HRESULT WINAPI GetVersionFromFileExA ( LPCSTR  lpszFilename,
LPDWORD  pdwMSVer,
LPDWORD  pdwLSVer,
BOOL  bVersion 
)

Definition at line 1042 of file files.c.

1044{
1046 HRESULT res;
1047
1048 TRACE("(%s, %p, %p, %d)\n", debugstr_a(lpszFilename),
1049 pdwMSVer, pdwLSVer, bVersion);
1050
1052
1053 res = GetVersionFromFileExW(filename.Buffer, pdwMSVer, pdwLSVer, bVersion);
1054
1056
1057 return res;
1058}
HRESULT WINAPI GetVersionFromFileExW(LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
Definition: files.c:1078
const char * filename
Definition: ioapi.h:137

Referenced by GetVersionFromFileA().

◆ GetVersionFromFileExW()

HRESULT WINAPI GetVersionFromFileExW ( LPCWSTR  lpszFilename,
LPDWORD  pdwMSVer,
LPDWORD  pdwLSVer,
BOOL  bVersion 
)

Definition at line 1078 of file files.c.

1080{
1081 VS_FIXEDFILEINFO *pFixedVersionInfo;
1082 LANGANDCODEPAGE *pLangAndCodePage;
1083 DWORD dwHandle, dwInfoSize;
1084 WCHAR szWinDir[MAX_PATH];
1085 WCHAR szFile[MAX_PATH];
1086 LPVOID pVersionInfo = NULL;
1087 BOOL bFileCopied = FALSE;
1088 UINT uValueLen;
1089
1090 static const WCHAR backslash[] = {'\\',0};
1091 static const WCHAR translation[] = {
1092 '\\','V','a','r','F','i','l','e','I','n','f','o',
1093 '\\','T','r','a','n','s','l','a','t','i','o','n',0
1094 };
1095
1096 TRACE("(%s, %p, %p, %d)\n", debugstr_w(lpszFilename),
1097 pdwMSVer, pdwLSVer, bVersion);
1098
1099 *pdwLSVer = 0;
1100 *pdwMSVer = 0;
1101
1102 lstrcpynW(szFile, lpszFilename, MAX_PATH);
1103
1104 dwInfoSize = GetFileVersionInfoSizeW(szFile, &dwHandle);
1105 if (!dwInfoSize)
1106 {
1107 /* check that the file exists */
1109 return S_OK;
1110
1111 /* file exists, but won't be found by GetFileVersionInfoSize,
1112 * so copy it to the temp dir where it will be found.
1113 */
1114 GetWindowsDirectoryW(szWinDir, MAX_PATH);
1115 GetTempFileNameW(szWinDir, NULL, 0, szFile);
1116 CopyFileW(lpszFilename, szFile, FALSE);
1117 bFileCopied = TRUE;
1118
1119 dwInfoSize = GetFileVersionInfoSizeW(szFile, &dwHandle);
1120 if (!dwInfoSize)
1121 goto done;
1122 }
1123
1124 pVersionInfo = HeapAlloc(GetProcessHeap(), 0, dwInfoSize);
1125 if (!pVersionInfo)
1126 goto done;
1127
1128 if (!GetFileVersionInfoW(szFile, dwHandle, dwInfoSize, pVersionInfo))
1129 goto done;
1130
1131 if (bVersion)
1132 {
1133 if (!VerQueryValueW(pVersionInfo, backslash,
1134 (LPVOID *)&pFixedVersionInfo, &uValueLen))
1135 goto done;
1136
1137 if (!uValueLen)
1138 goto done;
1139
1140 *pdwMSVer = pFixedVersionInfo->dwFileVersionMS;
1141 *pdwLSVer = pFixedVersionInfo->dwFileVersionLS;
1142 }
1143 else
1144 {
1145 if (!VerQueryValueW(pVersionInfo, translation,
1146 (LPVOID *)&pLangAndCodePage, &uValueLen))
1147 goto done;
1148
1149 if (!uValueLen)
1150 goto done;
1151
1152 *pdwMSVer = pLangAndCodePage->wLanguage;
1153 *pdwLSVer = pLangAndCodePage->wCodePage;
1154 }
1155
1156done:
1157 HeapFree(GetProcessHeap(), 0, pVersionInfo);
1158
1159 if (bFileCopied)
1160 DeleteFileW(szFile);
1161
1162 return S_OK;
1163}
#define FALSE
Definition: types.h:117
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:439
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:845
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1049
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:611
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
Definition: filename.c:84
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned int UINT
Definition: ndis.h:50

Referenced by GetVersionFromFileExA(), and GetVersionFromFileW().

◆ GetVersionFromFileW()

HRESULT WINAPI GetVersionFromFileW ( LPCWSTR  lpszFilename,
LPDWORD  pdwMSVer,
LPDWORD  pdwLSVer,
BOOL  bVersion 
)

Definition at line 1023 of file files.c.

1025{
1026 TRACE("(%s, %p, %p, %d)\n", debugstr_w(Filename), MajorVer, MinorVer, Version);
1027 return GetVersionFromFileExW(Filename, MajorVer, MinorVer, Version);
1028}

◆ IsNTAdmin()

BOOL WINAPI IsNTAdmin ( DWORD  reserved,
LPDWORD  pReserved 
)

Definition at line 222 of file advpack.c.

223{
225 PTOKEN_GROUPS pTokenGroups;
226 BOOL bSidFound = FALSE;
227 DWORD dwSize, i;
228 HANDLE hToken;
229 PSID pSid;
230
231 TRACE("(%d, %p)\n", reserved, pReserved);
232
234 return FALSE;
235
236 if (!GetTokenInformation(hToken, TokenGroups, NULL, 0, &dwSize))
237 {
239 {
240 CloseHandle(hToken);
241 return FALSE;
242 }
243 }
244
245 pTokenGroups = HeapAlloc(GetProcessHeap(), 0, dwSize);
246 if (!pTokenGroups)
247 {
248 CloseHandle(hToken);
249 return FALSE;
250 }
251
252 if (!GetTokenInformation(hToken, TokenGroups, pTokenGroups, dwSize, &dwSize))
253 {
254 HeapFree(GetProcessHeap(), 0, pTokenGroups);
255 CloseHandle(hToken);
256 return FALSE;
257 }
258
259 CloseHandle(hToken);
260
262 DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &pSid))
263 {
264 HeapFree(GetProcessHeap(), 0, pTokenGroups);
265 return FALSE;
266 }
267
268 for (i = 0; i < pTokenGroups->GroupCount; i++)
269 {
270 if (EqualSid(pSid, pTokenGroups->Groups[i].Sid))
271 {
272 bSidFound = TRUE;
273 break;
274 }
275 }
276
277 HeapFree(GetProcessHeap(), 0, pTokenGroups);
278 FreeSid(pSid);
279
280 return bSidFound;
281}
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
Definition: security.c:411
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:294
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
Definition: security.c:674
PVOID WINAPI FreeSid(PSID pSid)
Definition: security.c:698
BOOL WINAPI EqualSid(PSID pSid1, PSID pSid2)
Definition: security.c:829
#define CloseHandle
Definition: compat.h:739
#define GetCurrentProcess()
Definition: compat.h:759
r reserved
Definition: btrfs.c:3006
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static PSID pSid
Definition: security.c:74
SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]
Definition: setypes.h:1018
$ULONG GroupCount
Definition: setypes.h:1014
#define SECURITY_BUILTIN_DOMAIN_RID
Definition: setypes.h:581
#define TOKEN_QUERY
Definition: setypes.h:928
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:554
@ TokenGroups
Definition: setypes.h:967
#define DOMAIN_ALIAS_RID_ADMINS
Definition: setypes.h:652

Referenced by check_admin_rights(), and START_TEST().

◆ LaunchINFSectionA()

INT WINAPI LaunchINFSectionA ( HWND  hWnd,
HINSTANCE  hInst,
LPSTR  cmdline,
INT  show 
)

Definition at line 704 of file install.c.

705{
707 HRESULT hr;
708
709 TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_a(cmdline), show);
710
711 if (!cmdline)
712 return ADV_FAILURE;
713
715
716 hr = LaunchINFSectionW(hWnd, hInst, cmd.Buffer, show);
717
719
720 return hr;
721}
INT WINAPI LaunchINFSectionW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
Definition: install.c:747
#define ADV_FAILURE
Definition: install.c:46
Definition: ftp_var.h:139

◆ LaunchINFSectionExA()

HRESULT WINAPI LaunchINFSectionExA ( _In_opt_  HWND,
_In_opt_  HINSTANCE,
_In_  LPSTR,
_In_  INT 
)

◆ LaunchINFSectionExW()

HRESULT WINAPI LaunchINFSectionExW ( _In_opt_  HWND,
_In_opt_  HINSTANCE,
_In_  LPWSTR,
_In_  INT 
)

◆ LaunchINFSectionW()

INT WINAPI LaunchINFSectionW ( HWND  hWnd,
HINSTANCE  hInst,
LPWSTR  cmdline,
INT  show 
)

Definition at line 747 of file install.c.

748{
750 LPWSTR cmdline_copy, cmdline_ptr;
751 LPWSTR inf_filename, install_sec;
752 LPWSTR str_flags;
753 DWORD flags = 0;
754 HRESULT hr = S_OK;
755
756 TRACE("(%p, %p, %s, %d)\n", hWnd, hInst, debugstr_w(cmdline), show);
757
758 if (!cmdline)
759 return ADV_FAILURE;
760
761 cmdline_copy = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(cmdline) + 1) * sizeof(WCHAR));
762 cmdline_ptr = cmdline_copy;
763 lstrcpyW(cmdline_copy, cmdline);
764
765 inf_filename = get_parameter(&cmdline_ptr, ',', TRUE);
766 install_sec = get_parameter(&cmdline_ptr, ',', TRUE);
767
768 str_flags = get_parameter(&cmdline_ptr, ',', TRUE);
769 if (str_flags)
770 {
771 DWORD inf_flags = wcstol(str_flags, NULL, 10);
772 if (inf_flags & LIS_QUIET) flags |= RSC_FLAG_QUIET;
773 if (inf_flags & LIS_NOGRPCONV) flags |= RSC_FLAG_NGCONV;
774 }
775
776 ZeroMemory(&info, sizeof(ADVInfo));
777
778 hr = install_init(inf_filename, install_sec, NULL, flags, &info);
779 if (hr != S_OK)
780 goto done;
781
783 if (hr != S_OK)
784 goto done;
785
786 hr = adv_install(&info);
787
788done:
790 HeapFree(GetProcessHeap(), 0, cmdline_copy);
791
793}
#define LIS_QUIET
Definition: advpub.h:139
#define RSC_FLAG_NGCONV
Definition: advpub.h:133
#define LIS_NOGRPCONV
Definition: advpub.h:140
#define RSC_FLAG_QUIET
Definition: advpub.h:132
LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted)
Definition: install.c:200
#define ADV_SUCCESS
Definition: install.c:45
GLbitfield flags
Definition: glext.h:7161

Referenced by LaunchINFSectionA().

◆ NeedReboot()

BOOL WINAPI NeedReboot ( DWORD  dwRebootCheck)

Definition at line 311 of file advpack.c.

312{
313 FIXME("(%d): stub\n", dwRebootCheck);
314 return FALSE;
315}

Referenced by ApplyGeneralSettings(), and UpdateDriver().

◆ NeedRebootInit()

DWORD WINAPI NeedRebootInit ( VOID  )

Definition at line 291 of file advpack.c.

292{
293 FIXME("(VOID): stub\n");
294 return 0;
295}

◆ OpenINFEngineA()

HRESULT WINAPI OpenINFEngineA ( LPCSTR  pszInfFilename,
LPCSTR  pszInstallSection,
DWORD  dwFlags,
HINF phInf,
PVOID  pvReserved 
)

Definition at line 322 of file advpack.c.

324{
325 UNICODE_STRING filenameW, installW;
326 HRESULT res;
327
328 TRACE("(%s, %s, %d, %p, %p)\n", debugstr_a(pszInfFilename),
329 debugstr_a(pszInstallSection), dwFlags, phInf, pvReserved);
330
331 if (!pszInfFilename || !phInf)
332 return E_INVALIDARG;
333
335 RtlCreateUnicodeStringFromAsciiz(&installW, pszInstallSection);
336
337 res = OpenINFEngineW(filenameW.Buffer, installW.Buffer,
338 dwFlags, phInf, pvReserved);
339
341 RtlFreeUnicodeString(&installW);
342
343 return res;
344}
HRESULT WINAPI OpenINFEngineW(LPCWSTR pszInfFilename, LPCWSTR pszInstallSection, DWORD dwFlags, HINF *phInf, PVOID pvReserved)
Definition: advpack.c:363
static const WCHAR filenameW[]
Definition: amstream.c:41
static LPCSTR DWORD void * pvReserved
Definition: str.c:196

◆ OpenINFEngineW()

HRESULT WINAPI OpenINFEngineW ( LPCWSTR  pszInfFilename,
LPCWSTR  pszInstallSection,
DWORD  dwFlags,
HINF phInf,
PVOID  pvReserved 
)

Definition at line 363 of file advpack.c.

365{
366 TRACE("(%s, %s, %d, %p, %p)\n", debugstr_w(pszInfFilename),
367 debugstr_w(pszInstallSection), dwFlags, phInf, pvReserved);
368
369 if (!pszInfFilename || !phInf)
370 return E_INVALIDARG;
371
372 *phInf = SetupOpenInfFileW(pszInfFilename, NULL, INF_STYLE_WIN4, NULL);
373 if (*phInf == INVALID_HANDLE_VALUE)
375
376 set_ldids(*phInf, pszInstallSection, NULL);
377
378 return S_OK;
379}
void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir)
Definition: advpack.c:109
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
#define INF_STYLE_WIN4
Definition: infsupp.h:41
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79

Referenced by OpenINFEngineA().

◆ RebootCheckOnInstallA()

HRESULT WINAPI RebootCheckOnInstallA ( HWND  hWnd,
LPCSTR  pszINF,
LPCSTR  pszSec,
DWORD  dwReserved 
)

Definition at line 386 of file advpack.c.

388{
389 UNICODE_STRING infW, secW;
390 HRESULT res;
391
392 TRACE("(%p, %s, %s, %d)\n", hWnd, debugstr_a(pszINF),
393 debugstr_a(pszSec), dwReserved);
394
395 if (!pszINF || !pszSec)
396 return E_INVALIDARG;
397
400
402
405
406 return res;
407}
static const WCHAR infW[]
Definition: axinstall.c:35
HRESULT WINAPI RebootCheckOnInstallW(HWND hWnd, LPCWSTR pszINF, LPCWSTR pszSec, DWORD dwReserved)
Definition: advpack.c:432

◆ RebootCheckOnInstallW()

HRESULT WINAPI RebootCheckOnInstallW ( HWND  hWnd,
LPCWSTR  pszINF,
LPCWSTR  pszSec,
DWORD  dwReserved 
)

Definition at line 432 of file advpack.c.

434{
435 FIXME("(%p, %s, %s, %d): stub\n", hWnd, debugstr_w(pszINF),
436 debugstr_w(pszSec), dwReserved);
437
438 return E_FAIL;
439}

Referenced by RebootCheckOnInstallA().

◆ RegInstallA()

HRESULT WINAPI RegInstallA ( HMODULE  hm,
LPCSTR  pszSection,
const STRTABLEA pstTable 
)

Definition at line 148 of file reg.c.

149{
151 STRTABLEW *wtable;
152 HRESULT hr;
153
154 TRACE("(%p, %s, %p)\n", hm, debugstr_a(pszSection), pstTable);
155
156 if (pstTable)
157 wtable = strtable_atow(pstTable);
158 else
159 wtable = NULL;
160
162
163 hr = RegInstallW(hm, section.Buffer, wtable);
164
165 if (pstTable)
166 free_strtable(wtable);
167
169
170 return hr;
171}
HRESULT WINAPI RegInstallW(HMODULE hm, LPCWSTR pszSection, const STRTABLEW *pstTable)
Definition: reg.c:221
static void free_strtable(STRTABLEW *wtable)
Definition: reg.c:129
static STRTABLEW * strtable_atow(const STRTABLEA *atable)
Definition: reg.c:114

Referenced by register_iexplore().

◆ RegInstallW()

HRESULT WINAPI RegInstallW ( HMODULE  hm,
LPCWSTR  pszSection,
const STRTABLEW pstTable 
)

Definition at line 221 of file reg.c.

222{
223 unsigned int i;
224 CABINFOW cabinfo;
225 WCHAR tmp_ini_path[MAX_PATH];
226 HRESULT hr = E_FAIL;
227
228 TRACE("(%p, %s, %p)\n", hm, debugstr_w(pszSection), pstTable);
229
230 if(!create_tmp_ini_file(hm, tmp_ini_path))
231 return E_FAIL;
232
233 if (write_predefined_strings(hm, tmp_ini_path) != S_OK)
234 goto done;
235
236 /* Write the additional string table */
237 if (pstTable)
238 {
239 for(i = 0; i < pstTable->cEntries; i++)
240 {
241 WCHAR tmp_value[MAX_PATH + 2];
242
243 tmp_value[0] = '\"';
244 lstrcpyW(tmp_value + 1, pstTable->pse[i].pszValue);
245 lstrcatW(tmp_value, quote);
246
247 WritePrivateProfileStringW(Strings, pstTable->pse[i].pszName, tmp_value, tmp_ini_path);
248 }
249 }
250
251 /* flush cache */
252 WritePrivateProfileStringW(NULL, NULL, NULL, tmp_ini_path);
253
254 /* FIXME: read AdvOptions val for dwFlags */
255 ZeroMemory(&cabinfo, sizeof(CABINFOW));
256 cabinfo.pszInf = tmp_ini_path;
257 cabinfo.pszSection = (LPWSTR)pszSection;
258 cabinfo.dwFlags = 0;
259
260 hr = ExecuteCabW(NULL, &cabinfo, NULL);
261
262done:
263
264 DeleteFileW(tmp_ini_path);
265
266 return hr;
267}
static HRESULT write_predefined_strings(HMODULE hm, LPCWSTR ini_path)
Definition: reg.c:173
static const WCHAR quote[]
Definition: reg.c:40
static BOOL create_tmp_ini_file(HMODULE hm, WCHAR *ini_file)
Definition: reg.c:55
static const WCHAR Strings[]
Definition: reg.c:35
LPWSTR pszValue
Definition: advpub.h:89
LPWSTR pszName
Definition: advpub.h:88
DWORD cEntries
Definition: advpub.h:104
STRENTRYW * pse
Definition: advpub.h:105

Referenced by RegInstallA().

◆ RegRestoreAllA()

HRESULT WINAPI RegRestoreAllA ( _In_opt_ HWND  hWnd,
_In_opt_ LPSTR  pszTitleString,
_In_ HKEY  hkBackupKey 
)

◆ RegRestoreAllW()

HRESULT WINAPI RegRestoreAllW ( _In_opt_ HWND  hWnd,
_In_opt_ LPWSTR  pszTitleString,
_In_ HKEY  hkBackupKey 
)

◆ RegSaveRestoreA()

HRESULT WINAPI RegSaveRestoreA ( HWND  hWnd,
LPCSTR  pszTitleString,
HKEY  hkBackupKey,
LPCSTR  pcszRootKey,
LPCSTR  pcszSubKey,
LPCSTR  pcszValueName,
DWORD  dwFlags 
)

Definition at line 319 of file reg.c.

322{
323 UNICODE_STRING title, root, subkey, value;
324 HRESULT hr;
325
326 TRACE("(%p, %s, %p, %s, %s, %s, %d)\n", hWnd, debugstr_a(pszTitleString),
327 hkBackupKey, debugstr_a(pcszRootKey), debugstr_a(pcszSubKey),
328 debugstr_a(pcszValueName), dwFlags);
329
330 RtlCreateUnicodeStringFromAsciiz(&title, pszTitleString);
332 RtlCreateUnicodeStringFromAsciiz(&subkey, pcszSubKey);
334
335 hr = RegSaveRestoreW(hWnd, title.Buffer, hkBackupKey, root.Buffer,
336 subkey.Buffer, value.Buffer, dwFlags);
337
340 RtlFreeUnicodeString(&subkey);
342
343 return hr;
344}
struct _root root
HRESULT WINAPI RegSaveRestoreW(HWND hWnd, LPCWSTR pszTitleString, HKEY hkBackupKey, LPCWSTR pcszRootKey, LPCWSTR pcszSubKey, LPCWSTR pcszValueName, DWORD dwFlags)
Definition: reg.c:367
Definition: pdh_main.c:94

◆ RegSaveRestoreOnINFA()

HRESULT WINAPI RegSaveRestoreOnINFA ( HWND  hWnd,
LPCSTR  pszTitle,
LPCSTR  pszINF,
LPCSTR  pszSection,
HKEY  hHKLMBackKey,
HKEY  hHKCUBackKey,
DWORD  dwFlags 
)

Definition at line 383 of file reg.c.

386{
388 HRESULT hr;
389
390 TRACE("(%p, %s, %s, %s, %p, %p, %d)\n", hWnd, debugstr_a(pszTitle),
391 debugstr_a(pszINF), debugstr_a(pszSection),
392 hHKLMBackKey, hHKCUBackKey, dwFlags);
393
397
398 hr = RegSaveRestoreOnINFW(hWnd, title.Buffer, inf.Buffer, section.Buffer,
399 hHKLMBackKey, hHKCUBackKey, dwFlags);
400
404
405 return hr;
406}
HRESULT WINAPI RegSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, LPCWSTR pszSection, HKEY hHKLMBackKey, HKEY hHKCUBackKey, DWORD dwFlags)
Definition: reg.c:429

◆ RegSaveRestoreOnINFW()

HRESULT WINAPI RegSaveRestoreOnINFW ( HWND  hWnd,
LPCWSTR  pszTitle,
LPCWSTR  pszINF,
LPCWSTR  pszSection,
HKEY  hHKLMBackKey,
HKEY  hHKCUBackKey,
DWORD  dwFlags 
)

Definition at line 429 of file reg.c.

432{
433 FIXME("(%p, %s, %s, %s, %p, %p, %d): stub\n", hWnd, debugstr_w(pszTitle),
434 debugstr_w(pszINF), debugstr_w(pszSection),
435 hHKLMBackKey, hHKCUBackKey, dwFlags);
436
437 return E_FAIL;
438}

Referenced by RegSaveRestoreOnINFA().

◆ RegSaveRestoreW()

HRESULT WINAPI RegSaveRestoreW ( HWND  hWnd,
LPCWSTR  pszTitleString,
HKEY  hkBackupKey,
LPCWSTR  pcszRootKey,
LPCWSTR  pcszSubKey,
LPCWSTR  pcszValueName,
DWORD  dwFlags 
)

Definition at line 367 of file reg.c.

370{
371 FIXME("(%p, %s, %p, %s, %s, %s, %d): stub\n", hWnd, debugstr_w(pszTitleString),
372 hkBackupKey, debugstr_w(pcszRootKey), debugstr_w(pcszSubKey),
373 debugstr_w(pcszValueName), dwFlags);
374
375 return E_FAIL;
376}

Referenced by RegSaveRestoreA().

◆ RunSetupCommandA()

HRESULT WINAPI RunSetupCommandA ( HWND  hWnd,
LPCSTR  szCmdName,
LPCSTR  szInfSection,
LPCSTR  szDir,
LPCSTR  lpszTitle,
HANDLE phEXE,
DWORD  dwFlags,
LPVOID  pvReserved 
)

Definition at line 932 of file install.c.

936{
937 UNICODE_STRING cmdname, infsec;
939 HRESULT hr;
940
941 TRACE("(%p, %s, %s, %s, %s, %p, %d, %p)\n",
942 hWnd, debugstr_a(szCmdName), debugstr_a(szInfSection),
943 debugstr_a(szDir), debugstr_a(lpszTitle),
944 phEXE, dwFlags, pvReserved);
945
946 if (!szCmdName || !szDir)
947 return E_INVALIDARG;
948
949 RtlCreateUnicodeStringFromAsciiz(&cmdname, szCmdName);
950 RtlCreateUnicodeStringFromAsciiz(&infsec, szInfSection);
953
954 hr = RunSetupCommandW(hWnd, cmdname.Buffer, infsec.Buffer, dir.Buffer,
955 title.Buffer, phEXE, dwFlags, pvReserved);
956
957 RtlFreeUnicodeString(&cmdname);
958 RtlFreeUnicodeString(&infsec);
961
962 return hr;
963}
HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
Definition: install.c:990

◆ RunSetupCommandW()

HRESULT WINAPI RunSetupCommandW ( HWND  hWnd,
LPCWSTR  szCmdName,
LPCWSTR  szInfSection,
LPCWSTR  szDir,
LPCWSTR  lpszTitle,
HANDLE phEXE,
DWORD  dwFlags,
LPVOID  pvReserved 
)

Definition at line 990 of file install.c.

994{
996 HRESULT hr;
997
998 TRACE("(%p, %s, %s, %s, %s, %p, %d, %p)\n",
999 hWnd, debugstr_w(szCmdName), debugstr_w(szInfSection),
1000 debugstr_w(szDir), debugstr_w(lpszTitle),
1001 phEXE, dwFlags, pvReserved);
1002
1004 FIXME("Unhandled flag: RSC_FLAG_UPDHLPDLLS\n");
1005
1006 if (!szCmdName || !szDir)
1007 return E_INVALIDARG;
1008
1009 if (!(dwFlags & RSC_FLAG_INF))
1010 return launch_exe(szCmdName, szDir, phEXE);
1011
1012 ZeroMemory(&info, sizeof(ADVInfo));
1013
1014 hr = install_init(szCmdName, szInfSection, szDir, dwFlags, &info);
1015 if (hr != S_OK)
1016 goto done;
1017
1018 hr = spapi_install(&info);
1019 if (hr != S_OK)
1020 goto done;
1021
1022 hr = adv_install(&info);
1023
1024done:
1026
1027 return hr;
1028}
#define RSC_FLAG_UPDHLPDLLS
Definition: advpub.h:134
#define RSC_FLAG_INF
Definition: advpub.h:130
HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE)
Definition: install.c:894

Referenced by install_inf_file(), process_hook_section(), and RunSetupCommandA().

◆ SetPerUserSecValuesA()

HRESULT WINAPI SetPerUserSecValuesA ( PERUSERSECTIONA pPerUser)

Definition at line 524 of file advpack.c.

525{
526 PERUSERSECTIONW perUserW;
527
528 TRACE("(%p)\n", pPerUser);
529
530 if (!pPerUser)
531 return E_INVALIDARG;
532
533 MultiByteToWideChar(CP_ACP, 0, pPerUser->szGUID, -1, perUserW.szGUID, ARRAY_SIZE(perUserW.szGUID));
534 MultiByteToWideChar(CP_ACP, 0, pPerUser->szDispName, -1, perUserW.szDispName, ARRAY_SIZE(perUserW.szDispName));
535 MultiByteToWideChar(CP_ACP, 0, pPerUser->szLocale, -1, perUserW.szLocale, ARRAY_SIZE(perUserW.szLocale));
536 MultiByteToWideChar(CP_ACP, 0, pPerUser->szStub, -1, perUserW.szStub, ARRAY_SIZE(perUserW.szStub));
537 MultiByteToWideChar(CP_ACP, 0, pPerUser->szVersion, -1, perUserW.szVersion, ARRAY_SIZE(perUserW.szVersion));
538 MultiByteToWideChar(CP_ACP, 0, pPerUser->szCompID, -1, perUserW.szCompID, ARRAY_SIZE(perUserW.szCompID));
539 perUserW.dwIsInstalled = pPerUser->dwIsInstalled;
540 perUserW.bRollback = pPerUser->bRollback;
541
542 return SetPerUserSecValuesW(&perUserW);
543}
HRESULT WINAPI SetPerUserSecValuesW(PERUSERSECTIONW *pPerUser)
Definition: advpack.c:558
CHAR szVersion[32]
Definition: advpub.h:59
CHAR szDispName[128]
Definition: advpub.h:56
DWORD dwIsInstalled
Definition: advpub.h:61
CHAR szCompID[128]
Definition: advpub.h:60
CHAR szGUID[39+20]
Definition: advpub.h:55
CHAR szStub[MAX_PATH *4]
Definition: advpub.h:58
CHAR szLocale[10]
Definition: advpub.h:57
BOOL bRollback
Definition: advpub.h:62
WCHAR szStub[MAX_PATH *4]
Definition: advpub.h:70
BOOL bRollback
Definition: advpub.h:74
DWORD dwIsInstalled
Definition: advpub.h:73
WCHAR szLocale[10]
Definition: advpub.h:69
WCHAR szGUID[39+20]
Definition: advpub.h:67
WCHAR szVersion[32]
Definition: advpub.h:71
WCHAR szDispName[128]
Definition: advpub.h:68
WCHAR szCompID[128]
Definition: advpub.h:72

◆ SetPerUserSecValuesW()

HRESULT WINAPI SetPerUserSecValuesW ( PERUSERSECTIONW pPerUser)

Definition at line 558 of file advpack.c.

559{
560 HKEY setup, guid;
561
562 static const WCHAR stub_path[] = {'S','t','u','b','P','a','t','h',0};
563 static const WCHAR version[] = {'V','e','r','s','i','o','n',0};
564 static const WCHAR locale[] = {'L','o','c','a','l','e',0};
565 static const WCHAR compid[] = {'C','o','m','p','o','n','e','n','t','I','D',0};
566 static const WCHAR isinstalled[] = {'I','s','I','n','s','t','a','l','l','e','d',0};
567
568 TRACE("(%p)\n", pPerUser);
569
570 if (!pPerUser || !*pPerUser->szGUID)
571 return S_OK;
572
574 NULL, &setup, NULL))
575 {
576 return E_FAIL;
577 }
578
579 if (RegCreateKeyExW(setup, pPerUser->szGUID, 0, NULL, 0, KEY_ALL_ACCESS,
580 NULL, &guid, NULL))
581 {
583 return E_FAIL;
584 }
585
586 if (*pPerUser->szStub)
587 {
588 RegSetValueExW(guid, stub_path, 0, REG_SZ, (LPBYTE)pPerUser->szStub,
589 (lstrlenW(pPerUser->szStub) + 1) * sizeof(WCHAR));
590 }
591
592 if (*pPerUser->szVersion)
593 {
595 (lstrlenW(pPerUser->szVersion) + 1) * sizeof(WCHAR));
596 }
597
598 if (*pPerUser->szLocale)
599 {
601 (lstrlenW(pPerUser->szLocale) + 1) * sizeof(WCHAR));
602 }
603
604 if (*pPerUser->szCompID)
605 {
606 RegSetValueExW(guid, compid, 0, REG_SZ, (LPBYTE)pPerUser->szCompID,
607 (lstrlenW(pPerUser->szCompID) + 1) * sizeof(WCHAR));
608 }
609
610 if (*pPerUser->szDispName)
611 {
613 (lstrlenW(pPerUser->szDispName) + 1) * sizeof(WCHAR));
614 }
615
616 RegSetValueExW(guid, isinstalled, 0, REG_DWORD,
617 (LPBYTE)&pPerUser->dwIsInstalled, sizeof(DWORD));
618
621
622 return S_OK;
623}
#define RegCloseKey(hKey)
Definition: registry.h:49
Definition: _locale.h:75
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
static const WCHAR setup_key[]
Definition: advpack.c:44
static const WCHAR version[]
Definition: asmname.c:66
#define REG_SZ
Definition: layer.c:22
const GUID * guid
static BOOL setup(void)
Definition: enum_files.c:97
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
#define KEY_WRITE
Definition: nt_native.h:1031
#define REG_DWORD
Definition: sdbapi.c:596
unsigned char * LPBYTE
Definition: typedefs.h:53
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by per_user_install_callback(), and SetPerUserSecValuesA().

◆ TranslateInfStringA()

HRESULT WINAPI TranslateInfStringA ( _In_ LPCSTR  pszInfFilename,
_In_ LPCSTR  pszInstallSection,
_In_ LPCSTR  pszTranslateSection,
_In_ LPCSTR  pszTranslateKey,
_Out_writes_opt_(dwBufferSize) LPSTR  pszBuffer,
_In_ DWORD  dwBufferSize,
_Out_ PDWORD  pdwRequiredSize,
_Reserved_ PVOID  pvReserved 
)

◆ TranslateInfStringExA()

HRESULT WINAPI TranslateInfStringExA ( HINF  hInf,
LPCSTR  pszInfFilename,
LPCSTR  pszTranslateSection,
LPCSTR  pszTranslateKey,
LPSTR  pszBuffer,
DWORD  dwBufferSize,
PDWORD  pdwRequiredSize,
PVOID  pvReserved 
)

Definition at line 750 of file advpack.c.

754{
755 UNICODE_STRING filenameW, sectionW, keyW;
756 LPWSTR bufferW;
757 HRESULT res;
758 DWORD len = 0;
759
760 TRACE("(%p, %s, %s, %s, %p, %d, %p, %p)\n", hInf, debugstr_a(pszInfFilename),
761 debugstr_a(pszTranslateSection), debugstr_a(pszTranslateKey),
762 pszBuffer, dwBufferSize, pdwRequiredSize, pvReserved);
763
764 if (!pszInfFilename || !pszTranslateSection ||
765 !pszTranslateKey || !pdwRequiredSize)
766 return E_INVALIDARG;
767
769 RtlCreateUnicodeStringFromAsciiz(&sectionW, pszTranslateSection);
770 RtlCreateUnicodeStringFromAsciiz(&keyW, pszTranslateKey);
771
772 res = TranslateInfStringExW(hInf, filenameW.Buffer, sectionW.Buffer,
773 keyW.Buffer, NULL, 0, &len, NULL);
774
775 if (res == S_OK)
776 {
777 bufferW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
778
779 res = TranslateInfStringExW(hInf, filenameW.Buffer, sectionW.Buffer,
780 keyW.Buffer, bufferW, len, &len, NULL);
781
782 if (res == S_OK)
783 {
784 *pdwRequiredSize = WideCharToMultiByte(CP_ACP, 0, bufferW, -1,
785 NULL, 0, NULL, NULL);
786
787 if (dwBufferSize >= *pdwRequiredSize)
788 {
789 WideCharToMultiByte(CP_ACP, 0, bufferW, -1, pszBuffer,
790 dwBufferSize, NULL, NULL);
791 }
792 else
794 }
795
796 HeapFree(GetProcessHeap(), 0, bufferW);
797 }
798
800 RtlFreeUnicodeString(&sectionW);
802
803 return res;
804}
HRESULT WINAPI TranslateInfStringExW(HINF hInf, LPCWSTR pszInfFilename, LPCWSTR pszTranslateSection, LPCWSTR pszTranslateKey, LPWSTR pszBuffer, DWORD dwBufferSize, PDWORD pdwRequiredSize, PVOID pvReserved)
Definition: advpack.c:835
#define WideCharToMultiByte
Definition: compat.h:111
GLenum GLsizei len
Definition: glext.h:6722
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345

◆ TranslateInfStringExW()

HRESULT WINAPI TranslateInfStringExW ( HINF  hInf,
LPCWSTR  pszInfFilename,
LPCWSTR  pszTranslateSection,
LPCWSTR  pszTranslateKey,
LPWSTR  pszBuffer,
DWORD  dwBufferSize,
PDWORD  pdwRequiredSize,
PVOID  pvReserved 
)

Definition at line 835 of file advpack.c.

839{
840 TRACE("(%p, %s, %s, %s, %p, %d, %p, %p)\n", hInf, debugstr_w(pszInfFilename),
841 debugstr_w(pszTranslateSection), debugstr_w(pszTranslateKey),
842 pszBuffer, dwBufferSize, pdwRequiredSize, pvReserved);
843
844 if (!hInf || !pszInfFilename || !pszTranslateSection || !pszTranslateKey)
845 return E_INVALIDARG;
846
847 if (!SetupGetLineTextW(NULL, hInf, pszTranslateSection, pszTranslateKey,
848 pszBuffer, dwBufferSize, pdwRequiredSize))
849 {
850 if (dwBufferSize < *pdwRequiredSize)
852
854 }
855
856 return S_OK;
857}
BOOL WINAPI SetupGetLineTextW(PINFCONTEXT context, HINF hinf, PCWSTR section_name, PCWSTR key_name, PWSTR buffer, DWORD size, PDWORD required)
Definition: parser.c:1756
#define SPAPI_E_LINE_NOT_FOUND
Definition: winerror.h:3144

Referenced by TranslateInfStringExA().

◆ TranslateInfStringW()

HRESULT WINAPI TranslateInfStringW ( _In_ LPCWSTR  pszInfFilename,
_In_ LPCWSTR  pszInstallSection,
_In_ LPCWSTR  pszTranslateSection,
_In_ LPCWSTR  pszTranslateKey,
_Out_writes_opt_(dwBufferSize) LPWSTR  pszBuffer,
_In_ DWORD  dwBufferSize,
_Out_ PDWORD  pdwRequiredSize,
_Reserved_ PVOID  pvReserved 
)

◆ UserInstStubWrapperA()

HRESULT WINAPI UserInstStubWrapperA ( HWND  hWnd,
HINSTANCE  hInstance,
LPSTR  pszParms,
INT  nShow 
)

Definition at line 864 of file advpack.c.

866{
867 UNICODE_STRING parmsW;
868 HRESULT res;
869
870 TRACE("(%p, %p, %s, %i)\n", hWnd, hInstance, debugstr_a(pszParms), nShow);
871
872 if (!pszParms)
873 return E_INVALIDARG;
874
875 RtlCreateUnicodeStringFromAsciiz(&parmsW, pszParms);
876
877 res = UserInstStubWrapperW(hWnd, hInstance, parmsW.Buffer, nShow);
878
879 RtlFreeUnicodeString(&parmsW);
880
881 return res;
882}
HINSTANCE hInstance
Definition: charmap.c:19
HRESULT WINAPI UserInstStubWrapperW(HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow)
Definition: advpack.c:905

◆ UserInstStubWrapperW()

HRESULT WINAPI UserInstStubWrapperW ( HWND  hWnd,
HINSTANCE  hInstance,
LPWSTR  pszParms,
INT  nShow 
)

Definition at line 905 of file advpack.c.

907{
908 HKEY setup, guid;
910 DWORD size = sizeof(stub);
911 HRESULT hr = S_OK;
912 BOOL res;
913
914 static const WCHAR real_stub_path[] = {
915 'R','e','a','l','S','t','u','b','P','a','t','h',0
916 };
917
918 TRACE("(%p, %p, %s, %i)\n", hWnd, hInstance, debugstr_w(pszParms), nShow);
919
920 if (!pszParms || !*pszParms)
921 return E_INVALIDARG;
922
924 {
925 return E_FAIL;
926 }
927
928 if (RegOpenKeyExW(setup, pszParms, 0, KEY_READ, &guid))
929 {
931 return E_FAIL;
932 }
933
934 res = RegQueryValueExW(guid, real_stub_path, NULL, NULL, (LPBYTE)stub, &size);
935 if (res || !*stub)
936 goto done;
937
938 /* launch the user stub wrapper */
940
941done:
944
945 return hr;
946}
HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE) DECLSPEC_HIDDEN
Definition: install.c:894
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
GLsizeiptr size
Definition: glext.h:5919
#define KEY_READ
Definition: nt_native.h:1023
Definition: stubgen.c:11
struct _stub stub

Referenced by UserInstStubWrapperA().

◆ UserUnInstStubWrapperA()

HRESULT WINAPI UserUnInstStubWrapperA ( HWND  hWnd,
HINSTANCE  hInstance,
LPSTR  pszParms,
INT  nShow 
)

Definition at line 953 of file advpack.c.

955{
956 UNICODE_STRING parmsW;
957 HRESULT res;
958
959 TRACE("(%p, %p, %s, %i)\n", hWnd, hInstance, debugstr_a(pszParms), nShow);
960
961 if (!pszParms)
962 return E_INVALIDARG;
963
964 RtlCreateUnicodeStringFromAsciiz(&parmsW, pszParms);
965
967
968 RtlFreeUnicodeString(&parmsW);
969
970 return res;
971}
HRESULT WINAPI UserUnInstStubWrapperW(HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow)
Definition: advpack.c:976

◆ UserUnInstStubWrapperW()

HRESULT WINAPI UserUnInstStubWrapperW ( HWND  hWnd,
HINSTANCE  hInstance,
LPWSTR  pszParms,
INT  nShow 
)

Definition at line 976 of file advpack.c.

978{
979 FIXME("(%p, %p, %s, %i): stub\n", hWnd, hInstance, debugstr_w(pszParms), nShow);
980
981 return E_FAIL;
982}

Referenced by UserUnInstStubWrapperA().