ReactOS 0.4.17-dev-804-g023d8af
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 2172 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, %ld)\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 free(filelist);
86
87 RtlFreeUnicodeString(&backupdir);
89
90 return res;
91}
static long backup()
Definition: maze.c:403
#define free
Definition: debug_ros.c:5
#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
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)
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define TRACE(s)
Definition: solgame.cpp:4
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint16_t * LPWSTR
Definition: typedefs.h:56

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 TRACE("(%s, %s, %s, %ld)\n", debugstr_w(lpcszFileList),
124 debugstr_w(lpcszBackupDir), debugstr_w(lpcszBaseName), dwFlags);
125
126 if (!lpcszFileList || !*lpcszFileList)
127 return S_OK;
128
129 if (lpcszBackupDir)
130 lstrcpyW(szIniPath, lpcszBackupDir);
131 else
132 GetWindowsDirectoryW(szIniPath, MAX_PATH);
133
134 lstrcatW(szIniPath, L"\\");
135 lstrcatW(szIniPath, lpcszBaseName);
136 lstrcatW(szIniPath, L".ini");
137
139
141 szString = L"-1,0,0,0,0,0,-1";
142 else if (dwFlags & AADBE_DEL_ENTRY)
143 szString = NULL;
144
145 /* add or delete the INI entries */
146 while (*lpcszFileList)
147 {
148 WritePrivateProfileStringW(L"backup", lpcszFileList, szString, szIniPath);
149 lpcszFileList += lstrlenW(lpcszFileList) + 1;
150 }
151
152 /* hide the INI file */
154
155 return S_OK;
156}
#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:779
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2271
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
Definition: profile.c:1453
#define L(x)
Definition: resources.c:13
#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
short WCHAR
Definition: pedump.c:58

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 188 of file files.c.

191{
192 UNICODE_STRING sourcedir, sourcefile;
193 UNICODE_STRING destdir, destfile;
194 HRESULT res;
195
196 TRACE("(%p, %s, %s, %s, %s, %ld, %ld)\n", hwnd, debugstr_a(lpszSourceDir),
197 debugstr_a(lpszSourceFile), debugstr_a(lpszDestDir),
198 debugstr_a(lpszDestFile), dwFlags, dwReserved);
199
200 if (!lpszSourceDir || !lpszSourceFile || !lpszDestDir)
201 return E_INVALIDARG;
202
203 RtlCreateUnicodeStringFromAsciiz(&sourcedir, lpszSourceDir);
204 RtlCreateUnicodeStringFromAsciiz(&sourcefile, lpszSourceFile);
205 RtlCreateUnicodeStringFromAsciiz(&destdir, lpszDestDir);
206 RtlCreateUnicodeStringFromAsciiz(&destfile, lpszDestFile);
207
208 res = AdvInstallFileW(hwnd, sourcedir.Buffer, sourcefile.Buffer,
209 destdir.Buffer, destfile.Buffer, dwFlags, dwReserved);
210
211 RtlFreeUnicodeString(&sourcedir);
212 RtlFreeUnicodeString(&sourcefile);
213 RtlFreeUnicodeString(&destdir);
214 RtlFreeUnicodeString(&destfile);
215
216 return res;
217}
#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:241
_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 241 of file files.c.

244{
245 PSP_FILE_CALLBACK_W pFileCallback;
246 LPWSTR szDestFilename;
248 WCHAR szRootPath[ROOT_LENGTH];
249 DWORD dwLastError;
250 HSPFILEQ fileQueue;
251 PVOID pContext;
252
253 TRACE("(%p, %s, %s, %s, %s, %ld, %ld)\n", hwnd, debugstr_w(lpszSourceDir),
254 debugstr_w(lpszSourceFile), debugstr_w(lpszDestDir),
255 debugstr_w(lpszDestFile), dwFlags, dwReserved);
256
257 if (!lpszSourceDir || !lpszSourceFile || !lpszDestDir)
258 return E_INVALIDARG;
259
260 fileQueue = SetupOpenFileQueue();
261 if (fileQueue == INVALID_HANDLE_VALUE)
263
264 pContext = NULL;
265 dwLastError = ERROR_SUCCESS;
266
267 lstrcpynW(szRootPath, lpszSourceDir, ROOT_LENGTH);
268 szPath = lpszSourceDir + ROOT_LENGTH;
269
270 /* use lpszSourceFile as destination filename if lpszDestFile is NULL */
271 szDestFilename = wcsdup(lpszDestFile ? lpszDestFile : lpszSourceFile);
272
273 /* add the file copy operation to the setup queue */
274 if (!SetupQueueCopyW(fileQueue, szRootPath, szPath, lpszSourceFile, NULL,
275 NULL, lpszDestDir, szDestFilename, dwFlags))
276 {
277 dwLastError = GetLastError();
278 goto done;
279 }
280
282 0, 0, NULL);
283 if (!pContext)
284 {
285 dwLastError = GetLastError();
286 goto done;
287 }
288
289 /* don't output anything for AIF_QUIET */
290 if (dwFlags & AIF_QUIET)
291 pFileCallback = pQuietQueueCallback;
292 else
293 pFileCallback = pQueueCallback;
294
295 /* perform the file copy */
296 if (!SetupCommitFileQueueW(hwnd, fileQueue, pFileCallback, pContext))
297 {
298 dwLastError = GetLastError();
299 goto done;
300 }
301
302done:
304 SetupCloseFileQueue(fileQueue);
305
306 free(szDestFilename);
307
308 return HRESULT_FROM_WIN32(dwLastError);
309}
#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:161
static UINT CALLBACK pQueueCallback(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
Definition: files.c:167
#define ROOT_LENGTH
Definition: files.c:159
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define lstrcpynW
Definition: compat.h:738
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
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
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210

Referenced by AdvInstallFileA().

◆ CloseINFEngine()

HRESULT WINAPI CloseINFEngine ( HINF  hInf)

Definition at line 184 of file advpack.c.

185{
186 TRACE("(%p)\n", hInf);
187
188 if (!hInf)
189 return E_INVALIDARG;
190
191 SetupCloseInfFile(hInf);
192 return S_OK;
193}
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
Definition: infsupp.c:45

◆ DelNodeA()

HRESULT WINAPI DelNodeA ( LPCSTR  pszFileOrDirName,
DWORD  dwFlags 
)

Definition at line 391 of file files.c.

392{
393 UNICODE_STRING fileordirname;
394 HRESULT res;
395
396 TRACE("(%s, %ld)\n", debugstr_a(pszFileOrDirName), dwFlags);
397
398 RtlCreateUnicodeStringFromAsciiz(&fileordirname, pszFileOrDirName);
399
400 res = DelNodeW(fileordirname.Buffer, dwFlags);
401
402 RtlFreeUnicodeString(&fileordirname);
403
404 return res;
405}
HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
Definition: files.c:425

◆ DelNodeRunDLL32A()

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

Definition at line 457 of file files.c.

458{
460 HRESULT hr;
461
462 TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_a(cmdline), show);
463
465
466 hr = DelNodeRunDLL32W(hWnd, hInst, params.Buffer, show);
467
469
470 return hr;
471}
HWND hWnd
Definition: settings.c:17
HRESULT hr
Definition: delayimp.cpp:582
HRESULT WINAPI DelNodeRunDLL32W(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
Definition: files.c:488
HINSTANCE hInst
Definition: dxdiag.c:13
GLenum const GLfloat * params
Definition: glext.h:5645
TCHAR * cmdline
Definition: stretchblt.cpp:32

◆ DelNodeRunDLL32W()

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

Definition at line 488 of file files.c.

489{
490 LPWSTR szFilename, szFlags;
491 LPWSTR cmdline_copy, cmdline_ptr;
492 DWORD dwFlags = 0;
493 HRESULT res;
494
495 TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_w(cmdline), show);
496
497 cmdline_copy = wcsdup(cmdline);
498 cmdline_ptr = cmdline_copy;
499
500 /* get the parameters at indexes 0 and 1 respectively */
501 szFilename = get_parameter(&cmdline_ptr, ',', TRUE);
502 szFlags = get_parameter(&cmdline_ptr, ',', TRUE);
503
504 if (szFlags)
505 dwFlags = wcstol(szFlags, NULL, 10);
506
507 res = DelNodeW(szFilename, dwFlags);
508
509 free(cmdline_copy);
510
511 return res;
512}
LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted)
Definition: install.c:178
#define TRUE
Definition: types.h:120
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2752

Referenced by DelNodeRunDLL32A().

◆ DelNodeW()

HRESULT WINAPI DelNodeW ( LPCWSTR  pszFileOrDirName,
DWORD  dwFlags 
)

Definition at line 425 of file files.c.

426{
427 WCHAR fname[MAX_PATH];
429
430 TRACE("(%s, %ld)\n", debugstr_w(pszFileOrDirName), dwFlags);
431
432#ifdef __REACTOS__
434 FIXME("Flags %#x ignored!\n", dwFlags & ~ADN_DEL_IF_EMPTY);
435#else
436 if (dwFlags)
437 FIXME("Flags ignored!\n");
438#endif
439
440 if (pszFileOrDirName && *pszFileOrDirName)
441 {
442 lstrcpyW(fname, pszFileOrDirName);
443
444 /* TODO: Should check for system directory deletion etc. here */
445
447 }
448
449 return ret;
450}
#define ADN_DEL_IF_EMPTY
Definition: DelNode.c:13
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_FAIL
Definition: ddrawi.h:102
static HRESULT DELNODE_recurse_dirtree(LPWSTR fname, DWORD flags)
Definition: files.c:311
return ret
Definition: mutex.c:147

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

◆ ExecuteCabA()

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

Definition at line 569 of file install.c.

570{
571 UNICODE_STRING cab, inf, section;
572 CABINFOW cabinfo;
573 HRESULT hr;
574
575 TRACE("(%p, %p, %p)\n", hwnd, pCab, pReserved);
576
577 if (!pCab)
578 return E_INVALIDARG;
579
580 if (pCab->pszCab)
581 {
583 cabinfo.pszCab = cab.Buffer;
584 }
585 else
586 cabinfo.pszCab = NULL;
587
590
591 MultiByteToWideChar(CP_ACP, 0, pCab->szSrcPath, -1, cabinfo.szSrcPath, ARRAY_SIZE(cabinfo.szSrcPath));
592
593 cabinfo.pszInf = inf.Buffer;
594 cabinfo.pszSection = section.Buffer;
595 cabinfo.dwFlags = pCab->dwFlags;
596
597 hr = ExecuteCabW(hwnd, &cabinfo, pReserved);
598
599 if (pCab->pszCab)
601
604
605 return hr;
606}
#define ARRAY_SIZE(A)
Definition: main.h:20
HRESULT WINAPI ExecuteCabW(HWND hwnd, CABINFOW *pCab, LPVOID pReserved)
Definition: install.c:622
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
_Out_ PVOID pReserved
Definition: netsh.h:77
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 622 of file install.c.

623{
625 HRESULT hr;
626
627 TRACE("(%p, %p, %p)\n", hwnd, pCab, pReserved);
628
629 ZeroMemory(&info, sizeof(ADVInfo));
630
631 if ((pCab->pszCab && *pCab->pszCab) && (pCab->pszInf && *pCab->pszInf) && *pCab->szSrcPath)
632 {
633 TRACE("pszCab: %s, pszInf: %s, szSrcPath: %s\n", debugstr_w(pCab->pszCab), debugstr_w(pCab->pszInf),
634 debugstr_w(pCab->szSrcPath));
635
636 hr = ExtractFilesW(pCab->pszCab, pCab->szSrcPath, 0, pCab->pszInf, NULL, 0);
637 if (FAILED(hr))
638 ERR("Failed to extract .inf file!\n");
639 }
640
641 hr = install_init(pCab->pszInf, pCab->pszSection, pCab->szSrcPath, pCab->dwFlags, &info);
642 if (hr != S_OK)
643 goto done;
644
646 if (hr != S_OK)
647 goto done;
648
649 hr = adv_install(&info);
650
651done:
653
654 return hr;
655}
#define ERR(fmt,...)
Definition: precomp.h:57
HRESULT WINAPI ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags, LPCWSTR FileList, LPVOID LReserved, DWORD Reserved)
Definition: files.c:777
static void install_release(const ADVInfo *info)
Definition: install.c:467
static HRESULT spapi_install(const ADVInfo *info)
Definition: install.c:293
static HRESULT adv_install(ADVInfo *info)
Definition: install.c:328
static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, LPCWSTR working_dir, DWORD flags, ADVInfo *info)
Definition: install.c:414
#define FAILED(hr)
Definition: intsafe.h:51
#define ZeroMemory
Definition: minwinbase.h:31

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 685 of file files.c.

687{
690 HRESULT res = S_OK;
691 DWORD dwFileCount = 0;
692 DWORD dwFilesFound = 0;
693 LPSTR szConvertedList = NULL;
694
695 TRACE("(%s, %s, %ld, %s, %p, %ld)\n", debugstr_a(CabName), debugstr_a(ExpandDir),
696 Flags, debugstr_a(FileList), LReserved, Reserved);
697
698 if (!CabName || !ExpandDir)
699 return E_INVALIDARG;
700
703
704 hCabinet = LoadLibraryA("cabinet.dll");
705 if (!hCabinet)
706 return E_FAIL;
707
708 ZeroMemory(&session, sizeof(SESSION));
709
710 pExtract = (void *)GetProcAddress(hCabinet, "Extract");
711 if (!pExtract)
712 {
713 res = E_FAIL;
714 goto done;
715 }
716
717 lstrcpyA(session.Destination, ExpandDir);
718
719 if (FileList)
720 {
721 szConvertedList = convert_file_list(FileList, &dwFileCount);
722 if (!szConvertedList)
723 {
724 res = E_FAIL;
725 goto done;
726 }
727
728 dwFilesFound = fill_file_list(&session, CabName, szConvertedList);
729 if (dwFilesFound != dwFileCount)
730 {
731 res = E_FAIL;
732 goto done;
733 }
734 }
735 else
736 session.Operation |= EXTRACT_FILLFILELIST;
737
738 session.Operation |= EXTRACT_EXTRACTFILES;
739 res = pExtract(&session, CabName);
740
741done:
744 free(szConvertedList);
745
746 return res;
747}
vector< FileInfo > FileList
Definition: DriveVolume.h:63
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG Flags
Definition: dispmprt.h:245
static LPSTR convert_file_list(LPCSTR FileList, DWORD *dwNumFiles)
Definition: files.c:543
#define EXTRACT_EXTRACTFILES
Definition: files.c:518
static void free_file_list(SESSION *session)
Definition: files.c:648
static DWORD fill_file_list(SESSION *session, LPCSTR szCabName, LPCSTR szFileList)
Definition: files.c:621
#define EXTRACT_FILLFILELIST
Definition: files.c:517
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:620
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:526
char * LPSTR
Definition: typedefs.h:51
static HMODULE hCabinet
Definition: urlmon_main.c:43
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:228

Referenced by ExtractFilesW().

◆ ExtractFilesW()

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

Definition at line 777 of file files.c.

779{
780 char *cab_name = NULL, *expand_dir = NULL, *file_list = NULL;
781 HRESULT hres = S_OK;
782
783 TRACE("(%s, %s, %ld, %s, %p, %ld)\n", debugstr_w(CabName), debugstr_w(ExpandDir),
784 Flags, debugstr_w(FileList), LReserved, Reserved);
785
786 if(CabName) {
787 cab_name = strdupWtoA(CabName);
788 if(!cab_name)
789 return E_OUTOFMEMORY;
790 }
791
792 if(ExpandDir) {
793 expand_dir = strdupWtoA(ExpandDir);
794 if(!expand_dir)
796 }
797
798 if(SUCCEEDED(hres) && FileList) {
800 if(!file_list)
802 }
803
804 /* cabinet.dll, which does the real job of extracting files, doesn't have UNICODE API,
805 so we need W->A conversion at some point anyway. */
806 if(SUCCEEDED(hres))
807 hres = ExtractFilesA(cab_name, expand_dir, Flags, file_list, LReserved, Reserved);
808
809 free(cab_name);
810 free(expand_dir);
812 return hres;
813}
static char * strdupWtoA(const WCHAR *str)
#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:685
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hres
Definition: protocol.c:465

Referenced by ExecuteCabW(), and 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 856 of file files.c.

858{
859 UNICODE_STRING filelist, dir, basename;
860 HRESULT hr;
861
862 TRACE("(%p, %s, %s, %s, %ld)\n", hDlg, debugstr_a(pszFileList),
863 debugstr_a(pszDir), debugstr_a(pszBaseName), dwFlags);
864
865 RtlCreateUnicodeStringFromAsciiz(&filelist, pszFileList);
868
869 hr = FileSaveRestoreW(hDlg, filelist.Buffer, dir.Buffer,
870 basename.Buffer, dwFlags);
871
872 RtlFreeUnicodeString(&filelist);
875
876 return hr;
877}
unsigned int dir
Definition: maze.c:112
HRESULT WINAPI FileSaveRestoreW(HWND hDlg, LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName, DWORD dwFlags)
Definition: files.c:901
_In_ LPCSTR pszDir
Definition: shellapi.h:609

◆ FileSaveRestoreOnINFA()

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

Definition at line 915 of file files.c.

918{
920 UNICODE_STRING backupdir, backupfile;
921 HRESULT hr;
922
923 TRACE("(%p, %s, %s, %s, %s, %s, %ld)\n", hWnd, debugstr_a(pszTitle),
924 debugstr_a(pszINF), debugstr_a(pszSection), debugstr_a(pszBackupDir),
925 debugstr_a(pszBaseBackupFile), dwFlags);
926
930 RtlCreateUnicodeStringFromAsciiz(&backupdir, pszBackupDir);
931 RtlCreateUnicodeStringFromAsciiz(&backupfile, pszBaseBackupFile);
932
933 hr = FileSaveRestoreOnINFW(hWnd, title.Buffer, inf.Buffer, section.Buffer,
934 backupdir.Buffer, backupfile.Buffer, dwFlags);
935
939 RtlFreeUnicodeString(&backupdir);
940 RtlFreeUnicodeString(&backupfile);
941
942 return hr;
943}
HRESULT WINAPI FileSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, LPCWSTR pszSection, LPCWSTR pszBackupDir, LPCWSTR pszBaseBackupFile, DWORD dwFlags)
Definition: files.c:968
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 968 of file files.c.

971{
972 FIXME("(%p, %s, %s, %s, %s, %s, %ld): stub\n", hWnd, debugstr_w(pszTitle),
973 debugstr_w(pszINF), debugstr_w(pszSection), debugstr_w(pszBackupDir),
974 debugstr_w(pszBaseBackupFile), dwFlags);
975
976 return E_FAIL;
977}

Referenced by FileSaveRestoreOnINFA().

◆ FileSaveRestoreW()

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

Definition at line 901 of file files.c.

903{
904 FIXME("(%p, %s, %s, %s, %ld) stub\n", hDlg, debugstr_w(pszFileList),
905 debugstr_w(pszDir), debugstr_w(pszBaseName), dwFlags);
906
907 return E_FAIL;
908}

Referenced by FileSaveRestoreA().

◆ GetVersionFromFileA()

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

Definition at line 984 of file files.c.

986{
987 TRACE("(%s, %p, %p, %d)\n", debugstr_a(Filename), MajorVer, MinorVer, Version);
988 return GetVersionFromFileExA(Filename, MajorVer, MinorVer, Version);
989}
HRESULT WINAPI GetVersionFromFileExA(LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
Definition: files.c:1015
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:940
_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 1015 of file files.c.

1017{
1019 HRESULT res;
1020
1021 TRACE("(%s, %p, %p, %d)\n", debugstr_a(lpszFilename),
1022 pdwMSVer, pdwLSVer, bVersion);
1023
1025
1026 res = GetVersionFromFileExW(filename.Buffer, pdwMSVer, pdwLSVer, bVersion);
1027
1029
1030 return res;
1031}
HRESULT WINAPI GetVersionFromFileExW(LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
Definition: files.c:1051
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 1051 of file files.c.

1053{
1054 VS_FIXEDFILEINFO *pFixedVersionInfo;
1055 LANGANDCODEPAGE *pLangAndCodePage;
1056 DWORD dwHandle, dwInfoSize;
1057 WCHAR szWinDir[MAX_PATH];
1058 WCHAR szFile[MAX_PATH];
1059 LPVOID pVersionInfo = NULL;
1060 BOOL bFileCopied = FALSE;
1061 UINT uValueLen;
1062
1063 TRACE("(%s, %p, %p, %d)\n", debugstr_w(lpszFilename),
1064 pdwMSVer, pdwLSVer, bVersion);
1065
1066 *pdwLSVer = 0;
1067 *pdwMSVer = 0;
1068
1069 lstrcpynW(szFile, lpszFilename, MAX_PATH);
1070
1071 dwInfoSize = GetFileVersionInfoSizeW(szFile, &dwHandle);
1072 if (!dwInfoSize)
1073 {
1074 /* check that the file exists */
1076 return S_OK;
1077
1078 /* file exists, but won't be found by GetFileVersionInfoSize,
1079 * so copy it to the temp dir where it will be found.
1080 */
1081 GetWindowsDirectoryW(szWinDir, MAX_PATH);
1082 GetTempFileNameW(szWinDir, NULL, 0, szFile);
1083 CopyFileW(lpszFilename, szFile, FALSE);
1084 bFileCopied = TRUE;
1085
1086 dwInfoSize = GetFileVersionInfoSizeW(szFile, &dwHandle);
1087 if (!dwInfoSize)
1088 goto done;
1089 }
1090
1091 pVersionInfo = malloc(dwInfoSize);
1092 if (!pVersionInfo)
1093 goto done;
1094
1095 if (!GetFileVersionInfoW(szFile, dwHandle, dwInfoSize, pVersionInfo))
1096 goto done;
1097
1098 if (bVersion)
1099 {
1100 if (!VerQueryValueW(pVersionInfo, L"\\", (void **)&pFixedVersionInfo, &uValueLen))
1101 goto done;
1102
1103 if (!uValueLen)
1104 goto done;
1105
1106 *pdwMSVer = pFixedVersionInfo->dwFileVersionMS;
1107 *pdwLSVer = pFixedVersionInfo->dwFileVersionLS;
1108 }
1109 else
1110 {
1111 if (!VerQueryValueW(pVersionInfo, L"\\VarFileInfo\\Translation",
1112 (LPVOID *)&pLangAndCodePage, &uValueLen))
1113 goto done;
1114
1115 if (!uValueLen)
1116 goto done;
1117
1118 *pdwMSVer = pLangAndCodePage->wLanguage;
1119 *pdwLSVer = pLangAndCodePage->wCodePage;
1120 }
1121
1122done:
1123 free(pVersionInfo);
1124
1125 if (bFileCopied)
1126 DeleteFileW(szFile);
1127
1128 return S_OK;
1129}
#define malloc
Definition: debug_ros.c:4
#define FALSE
Definition: types.h:117
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:367
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:636
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:967
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1171
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:738
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: sysinfo.c:13

Referenced by GetVersionFromFileExA(), and GetVersionFromFileW().

◆ GetVersionFromFileW()

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

Definition at line 996 of file files.c.

998{
999 TRACE("(%s, %p, %p, %d)\n", debugstr_w(Filename), MajorVer, MinorVer, Version);
1000 return GetVersionFromFileExW(Filename, MajorVer, MinorVer, Version);
1001}

◆ IsNTAdmin()

BOOL WINAPI IsNTAdmin ( DWORD  reserved,
LPDWORD  pReserved 
)

Definition at line 207 of file advpack.c.

208{
210 PTOKEN_GROUPS pTokenGroups;
211 BOOL bSidFound = FALSE;
212 DWORD dwSize, i;
213 HANDLE hToken;
214 PSID pSid;
215
216 TRACE("(%ld, %p)\n", reserved, pReserved);
217
219 return FALSE;
220
221 if (!GetTokenInformation(hToken, TokenGroups, NULL, 0, &dwSize))
222 {
224 {
225 CloseHandle(hToken);
226 return FALSE;
227 }
228 }
229
230 pTokenGroups = malloc(dwSize);
231 if (!pTokenGroups)
232 {
233 CloseHandle(hToken);
234 return FALSE;
235 }
236
237 if (!GetTokenInformation(hToken, TokenGroups, pTokenGroups, dwSize, &dwSize))
238 {
239 free(pTokenGroups);
240 CloseHandle(hToken);
241 return FALSE;
242 }
243
244 CloseHandle(hToken);
245
247 DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &pSid))
248 {
249 free(pTokenGroups);
250 return FALSE;
251 }
252
253 for (i = 0; i < pTokenGroups->GroupCount; i++)
254 {
255 if (EqualSid(pSid, pTokenGroups->Groups[i].Sid))
256 {
257 bSidFound = TRUE;
258 break;
259 }
260 }
261
262 free(pTokenGroups);
263 FreeSid(pSid);
264
265 return bSidFound;
266}
#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:85
SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]
Definition: setypes.h:1030
$ULONG GroupCount
Definition: setypes.h:1026
#define SECURITY_BUILTIN_DOMAIN_RID
Definition: setypes.h:581
#define TOKEN_QUERY
Definition: setypes.h:940
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:554
@ TokenGroups
Definition: setypes.h:979
#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 662 of file install.c.

663{
665 HRESULT hr;
666
667 TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_a(cmdline), show);
668
669 if (!cmdline)
670 return ADV_FAILURE;
671
673
674 hr = LaunchINFSectionW(hWnd, hInst, cmd.Buffer, show);
675
677
678 return hr;
679}
INT WINAPI LaunchINFSectionW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
Definition: install.c:705
#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 705 of file install.c.

706{
708 LPWSTR cmdline_copy, cmdline_ptr;
709 LPWSTR inf_filename, install_sec;
710 LPWSTR str_flags;
711 DWORD flags = 0;
712 HRESULT hr = S_OK;
713
714 TRACE("(%p, %p, %s, %d)\n", hWnd, hInst, debugstr_w(cmdline), show);
715
716 if (!cmdline)
717 return ADV_FAILURE;
718
719 cmdline_copy = wcsdup(cmdline);
720 cmdline_ptr = cmdline_copy;
721
722 inf_filename = get_parameter(&cmdline_ptr, ',', TRUE);
723 install_sec = get_parameter(&cmdline_ptr, ',', TRUE);
724
725 str_flags = get_parameter(&cmdline_ptr, ',', TRUE);
726 if (str_flags)
727 {
728 DWORD inf_flags = wcstol(str_flags, NULL, 10);
729 if (inf_flags & LIS_QUIET) flags |= RSC_FLAG_QUIET;
730 if (inf_flags & LIS_NOGRPCONV) flags |= RSC_FLAG_NGCONV;
731 }
732
733 ZeroMemory(&info, sizeof(ADVInfo));
734
735 hr = install_init(inf_filename, install_sec, NULL, flags, &info);
736 if (hr != S_OK)
737 goto done;
738
740 if (hr != S_OK)
741 goto done;
742
743 hr = adv_install(&info);
744
745done:
747 free(cmdline_copy);
748
750}
#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:178
#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 296 of file advpack.c.

297{
298 FIXME("(%ld): stub\n", dwRebootCheck);
299 return FALSE;
300}

Referenced by ApplyGeneralSettings(), and UpdateDriver().

◆ NeedRebootInit()

DWORD WINAPI NeedRebootInit ( VOID  )

Definition at line 276 of file advpack.c.

277{
278 FIXME("(VOID): stub\n");
279 return 0;
280}

◆ OpenINFEngineA()

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

Definition at line 307 of file advpack.c.

309{
310 UNICODE_STRING filenameW, installW;
311 HRESULT res;
312
313 TRACE("(%s, %s, %ld, %p, %p)\n", debugstr_a(pszInfFilename),
314 debugstr_a(pszInstallSection), dwFlags, phInf, pvReserved);
315
316 if (!pszInfFilename || !phInf)
317 return E_INVALIDARG;
318
320 RtlCreateUnicodeStringFromAsciiz(&installW, pszInstallSection);
321
322 res = OpenINFEngineW(filenameW.Buffer, installW.Buffer,
323 dwFlags, phInf, pvReserved);
324
326 RtlFreeUnicodeString(&installW);
327
328 return res;
329}
HRESULT WINAPI OpenINFEngineW(LPCWSTR pszInfFilename, LPCWSTR pszInstallSection, DWORD dwFlags, HINF *phInf, PVOID pvReserved)
Definition: advpack.c:348
static const WCHAR filenameW[]
Definition: amstream.c:41
static LPCWSTR LPVOID pvReserved
Definition: asmcache.c:749

◆ OpenINFEngineW()

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

Definition at line 348 of file advpack.c.

350{
351 TRACE("(%s, %s, %ld, %p, %p)\n", debugstr_w(pszInfFilename),
352 debugstr_w(pszInstallSection), dwFlags, phInf, pvReserved);
353
354 if (!pszInfFilename || !phInf)
355 return E_INVALIDARG;
356
357 *phInf = SetupOpenInfFileW(pszInfFilename, NULL, INF_STYLE_WIN4, NULL);
358 if (*phInf == INVALID_HANDLE_VALUE)
360
361 set_ldids(*phInf, pszInstallSection, NULL);
362
363 return S_OK;
364}
void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir)
Definition: advpack.c:100
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
#define INF_STYLE_WIN4
Definition: infsupp.h:43
#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 371 of file advpack.c.

373{
374 UNICODE_STRING infW, secW;
375 HRESULT res;
376
377 TRACE("(%p, %s, %s, %ld)\n", hWnd, debugstr_a(pszINF),
378 debugstr_a(pszSec), dwReserved);
379
380 if (!pszINF || !pszSec)
381 return E_INVALIDARG;
382
385
387
390
391 return res;
392}
HRESULT WINAPI RebootCheckOnInstallW(HWND hWnd, LPCWSTR pszINF, LPCWSTR pszSec, DWORD dwReserved)
Definition: advpack.c:417

◆ RebootCheckOnInstallW()

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

Definition at line 417 of file advpack.c.

419{
420 FIXME("(%p, %s, %s, %ld): stub\n", hWnd, debugstr_w(pszINF),
421 debugstr_w(pszSec), dwReserved);
422
423 return E_FAIL;
424}

Referenced by RebootCheckOnInstallA().

◆ RegInstallA()

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

Definition at line 139 of file reg.c.

140{
142 STRTABLEW *wtable;
143 HRESULT hr;
144
145 TRACE("(%p, %s, %p)\n", hm, debugstr_a(pszSection), pstTable);
146
147 if (pstTable)
148 wtable = strtable_atow(pstTable);
149 else
150 wtable = NULL;
151
153
154 hr = RegInstallW(hm, section.Buffer, wtable);
155
156 if (pstTable)
157 free_strtable(wtable);
158
160
161 return hr;
162}
HRESULT WINAPI RegInstallW(HMODULE hm, LPCWSTR pszSection, const STRTABLEW *pstTable)
Definition: reg.c:212
static void free_strtable(STRTABLEW *wtable)
Definition: reg.c:120
static STRTABLEW * strtable_atow(const STRTABLEA *atable)
Definition: reg.c:105

Referenced by register_iexplore().

◆ RegInstallW()

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

Definition at line 212 of file reg.c.

213{
214 unsigned int i;
215 CABINFOW cabinfo;
216 WCHAR tmp_ini_path[MAX_PATH];
217 HRESULT hr = E_FAIL;
218
219 TRACE("(%p, %s, %p)\n", hm, debugstr_w(pszSection), pstTable);
220
221 if(!create_tmp_ini_file(hm, tmp_ini_path))
222 return E_FAIL;
223
224 if (write_predefined_strings(hm, tmp_ini_path) != S_OK)
225 goto done;
226
227 /* Write the additional string table */
228 if (pstTable)
229 {
230 for(i = 0; i < pstTable->cEntries; i++)
231 {
232 WCHAR tmp_value[MAX_PATH + 2];
233
234 tmp_value[0] = '\"';
235 lstrcpyW(tmp_value + 1, pstTable->pse[i].pszValue);
236 lstrcatW(tmp_value, L"\"");
237
238 WritePrivateProfileStringW(L"Strings", pstTable->pse[i].pszName, tmp_value, tmp_ini_path);
239 }
240 }
241
242 /* flush cache */
243 WritePrivateProfileStringW(NULL, NULL, NULL, tmp_ini_path);
244
245 /* FIXME: read AdvOptions val for dwFlags */
246 ZeroMemory(&cabinfo, sizeof(CABINFOW));
247 cabinfo.pszInf = tmp_ini_path;
248 cabinfo.pszSection = (LPWSTR)pszSection;
249 cabinfo.dwFlags = 0;
250
251 hr = ExecuteCabW(NULL, &cabinfo, NULL);
252
253done:
254
255 DeleteFileW(tmp_ini_path);
256
257 return hr;
258}
static HRESULT write_predefined_strings(HMODULE hm, LPCWSTR ini_path)
Definition: reg.c:164
static BOOL create_tmp_ini_file(HMODULE hm, WCHAR *ini_file)
Definition: reg.c:46
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 310 of file reg.c.

313{
314 UNICODE_STRING title, root, subkey, value;
315 HRESULT hr;
316
317 TRACE("(%p, %s, %p, %s, %s, %s, %ld)\n", hWnd, debugstr_a(pszTitleString),
318 hkBackupKey, debugstr_a(pcszRootKey), debugstr_a(pcszSubKey),
319 debugstr_a(pcszValueName), dwFlags);
320
321 RtlCreateUnicodeStringFromAsciiz(&title, pszTitleString);
323 RtlCreateUnicodeStringFromAsciiz(&subkey, pcszSubKey);
325
326 hr = RegSaveRestoreW(hWnd, title.Buffer, hkBackupKey, root.Buffer,
327 subkey.Buffer, value.Buffer, dwFlags);
328
331 RtlFreeUnicodeString(&subkey);
333
334 return hr;
335}
struct _root root
HRESULT WINAPI RegSaveRestoreW(HWND hWnd, LPCWSTR pszTitleString, HKEY hkBackupKey, LPCWSTR pcszRootKey, LPCWSTR pcszSubKey, LPCWSTR pcszValueName, DWORD dwFlags)
Definition: reg.c:358
Definition: pdh_main.c:96

◆ RegSaveRestoreOnINFA()

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

Definition at line 374 of file reg.c.

377{
379 HRESULT hr;
380
381 TRACE("(%p, %s, %s, %s, %p, %p, %ld)\n", hWnd, debugstr_a(pszTitle),
382 debugstr_a(pszINF), debugstr_a(pszSection),
383 hHKLMBackKey, hHKCUBackKey, dwFlags);
384
388
389 hr = RegSaveRestoreOnINFW(hWnd, title.Buffer, inf.Buffer, section.Buffer,
390 hHKLMBackKey, hHKCUBackKey, dwFlags);
391
395
396 return hr;
397}
HRESULT WINAPI RegSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, LPCWSTR pszSection, HKEY hHKLMBackKey, HKEY hHKCUBackKey, DWORD dwFlags)
Definition: reg.c:420

◆ RegSaveRestoreOnINFW()

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

Definition at line 420 of file reg.c.

423{
424 FIXME("(%p, %s, %s, %s, %p, %p, %ld): stub\n", hWnd, debugstr_w(pszTitle),
425 debugstr_w(pszINF), debugstr_w(pszSection),
426 hHKLMBackKey, hHKCUBackKey, dwFlags);
427
428 return E_FAIL;
429}

Referenced by RegSaveRestoreOnINFA().

◆ RegSaveRestoreW()

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

Definition at line 358 of file reg.c.

361{
362 FIXME("(%p, %s, %p, %s, %s, %s, %ld): stub\n", hWnd, debugstr_w(pszTitleString),
363 hkBackupKey, debugstr_w(pcszRootKey), debugstr_w(pcszSubKey),
364 debugstr_w(pcszValueName), dwFlags);
365
366 return E_FAIL;
367}

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 888 of file install.c.

892{
893 UNICODE_STRING cmdname, infsec;
895 HRESULT hr;
896
897 TRACE("(%p, %s, %s, %s, %s, %p, %ld, %p)\n",
898 hWnd, debugstr_a(szCmdName), debugstr_a(szInfSection),
899 debugstr_a(szDir), debugstr_a(lpszTitle),
900 phEXE, dwFlags, pvReserved);
901
902 if (!szCmdName || !szDir)
903 return E_INVALIDARG;
904
905 RtlCreateUnicodeStringFromAsciiz(&cmdname, szCmdName);
906 RtlCreateUnicodeStringFromAsciiz(&infsec, szInfSection);
909
910 hr = RunSetupCommandW(hWnd, cmdname.Buffer, infsec.Buffer, dir.Buffer,
911 title.Buffer, phEXE, dwFlags, pvReserved);
912
913 RtlFreeUnicodeString(&cmdname);
914 RtlFreeUnicodeString(&infsec);
917
918 return hr;
919}
HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
Definition: install.c:946

◆ RunSetupCommandW()

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

Definition at line 946 of file install.c.

950{
952 HRESULT hr;
953
954 TRACE("(%p, %s, %s, %s, %s, %p, %ld, %p)\n",
955 hWnd, debugstr_w(szCmdName), debugstr_w(szInfSection),
956 debugstr_w(szDir), debugstr_w(lpszTitle),
957 phEXE, dwFlags, pvReserved);
958
960 FIXME("Unhandled flag: RSC_FLAG_UPDHLPDLLS\n");
961
962 if (!szCmdName || !szDir)
963 return E_INVALIDARG;
964
965 if (!(dwFlags & RSC_FLAG_INF))
966 return launch_exe(szCmdName, szDir, phEXE);
967
968 ZeroMemory(&info, sizeof(ADVInfo));
969
970 hr = install_init(szCmdName, szInfSection, szDir, dwFlags, &info);
971 if (hr != S_OK)
972 goto done;
973
975 if (hr != S_OK)
976 goto done;
977
978 hr = adv_install(&info);
979
980done:
982
983 return hr;
984}
#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:850

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

◆ SetPerUserSecValuesA()

HRESULT WINAPI SetPerUserSecValuesA ( PERUSERSECTIONA pPerUser)

Definition at line 506 of file advpack.c.

507{
508 PERUSERSECTIONW perUserW;
509
510 TRACE("(%p)\n", pPerUser);
511
512 if (!pPerUser)
513 return E_INVALIDARG;
514
515 MultiByteToWideChar(CP_ACP, 0, pPerUser->szGUID, -1, perUserW.szGUID, ARRAY_SIZE(perUserW.szGUID));
516 MultiByteToWideChar(CP_ACP, 0, pPerUser->szDispName, -1, perUserW.szDispName, ARRAY_SIZE(perUserW.szDispName));
517 MultiByteToWideChar(CP_ACP, 0, pPerUser->szLocale, -1, perUserW.szLocale, ARRAY_SIZE(perUserW.szLocale));
518 MultiByteToWideChar(CP_ACP, 0, pPerUser->szStub, -1, perUserW.szStub, ARRAY_SIZE(perUserW.szStub));
519 MultiByteToWideChar(CP_ACP, 0, pPerUser->szVersion, -1, perUserW.szVersion, ARRAY_SIZE(perUserW.szVersion));
520 MultiByteToWideChar(CP_ACP, 0, pPerUser->szCompID, -1, perUserW.szCompID, ARRAY_SIZE(perUserW.szCompID));
521 perUserW.dwIsInstalled = pPerUser->dwIsInstalled;
522 perUserW.bRollback = pPerUser->bRollback;
523
524 return SetPerUserSecValuesW(&perUserW);
525}
HRESULT WINAPI SetPerUserSecValuesW(PERUSERSECTIONW *pPerUser)
Definition: advpack.c:540
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 540 of file advpack.c.

541{
542 HKEY setup, guid;
543
544 TRACE("(%p)\n", pPerUser);
545
546 if (!pPerUser || !*pPerUser->szGUID)
547 return S_OK;
548
550 NULL, &setup, NULL))
551 {
552 return E_FAIL;
553 }
554
555 if (RegCreateKeyExW(setup, pPerUser->szGUID, 0, NULL, 0, KEY_ALL_ACCESS,
556 NULL, &guid, NULL))
557 {
559 return E_FAIL;
560 }
561
562 if (*pPerUser->szStub)
563 {
564 RegSetValueExW(guid, L"StubPath", 0, REG_SZ, (BYTE *)pPerUser->szStub,
565 (lstrlenW(pPerUser->szStub) + 1) * sizeof(WCHAR));
566 }
567
568 if (*pPerUser->szVersion)
569 {
570 RegSetValueExW(guid, L"Version", 0, REG_SZ, (BYTE *)pPerUser->szVersion,
571 (lstrlenW(pPerUser->szVersion) + 1) * sizeof(WCHAR));
572 }
573
574 if (*pPerUser->szLocale)
575 {
576 RegSetValueExW(guid, L"Locale", 0, REG_SZ, (BYTE *)pPerUser->szLocale,
577 (lstrlenW(pPerUser->szLocale) + 1) * sizeof(WCHAR));
578 }
579
580 if (*pPerUser->szCompID)
581 {
582 RegSetValueExW(guid, L"ComponentID", 0, REG_SZ, (BYTE *)pPerUser->szCompID,
583 (lstrlenW(pPerUser->szCompID) + 1) * sizeof(WCHAR));
584 }
585
586 if (*pPerUser->szDispName)
587 {
589 (lstrlenW(pPerUser->szDispName) + 1) * sizeof(WCHAR));
590 }
591
592 RegSetValueExW(guid, L"IsInstalled", 0, REG_DWORD,
593 (LPBYTE)&pPerUser->dwIsInstalled, sizeof(DWORD));
594
597
598 return S_OK;
599}
#define RegCloseKey(hKey)
Definition: registry.h:49
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
GUID guid
Definition: version.c:147
#define REG_SZ
Definition: layer.c:22
static BOOL setup(void)
Definition: enum_files.c:97
#define KEY_ALL_ACCESS
Definition: nt_native.h:1044
#define KEY_WRITE
Definition: nt_native.h:1034
#define REG_DWORD
Definition: sdbapi.c:615
unsigned char * LPBYTE
Definition: typedefs.h:53
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
unsigned char BYTE
Definition: xxhash.c:193

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 726 of file advpack.c.

730{
731 UNICODE_STRING filenameW, sectionW, keyW;
732 LPWSTR bufferW;
733 HRESULT res;
734 DWORD len = 0;
735
736 TRACE("(%p, %s, %s, %s, %p, %ld, %p, %p)\n", hInf, debugstr_a(pszInfFilename),
737 debugstr_a(pszTranslateSection), debugstr_a(pszTranslateKey),
738 pszBuffer, dwBufferSize, pdwRequiredSize, pvReserved);
739
740 if (!pszInfFilename || !pszTranslateSection ||
741 !pszTranslateKey || !pdwRequiredSize)
742 return E_INVALIDARG;
743
745 RtlCreateUnicodeStringFromAsciiz(&sectionW, pszTranslateSection);
746 RtlCreateUnicodeStringFromAsciiz(&keyW, pszTranslateKey);
747
748 res = TranslateInfStringExW(hInf, filenameW.Buffer, sectionW.Buffer,
749 keyW.Buffer, NULL, 0, &len, NULL);
750
751 if (res == S_OK)
752 {
753 bufferW = malloc(len * sizeof(WCHAR));
754
755 res = TranslateInfStringExW(hInf, filenameW.Buffer, sectionW.Buffer,
756 keyW.Buffer, bufferW, len, &len, NULL);
757
758 if (res == S_OK)
759 {
760 *pdwRequiredSize = WideCharToMultiByte(CP_ACP, 0, bufferW, -1,
761 NULL, 0, NULL, NULL);
762
763 if (dwBufferSize >= *pdwRequiredSize)
764 {
765 WideCharToMultiByte(CP_ACP, 0, bufferW, -1, pszBuffer,
766 dwBufferSize, NULL, NULL);
767 }
768 else
770 }
771
772 free(bufferW);
773 }
774
776 RtlFreeUnicodeString(&sectionW);
778
779 return res;
780}
HRESULT WINAPI TranslateInfStringExW(HINF hInf, LPCWSTR pszInfFilename, LPCWSTR pszTranslateSection, LPCWSTR pszTranslateKey, LPWSTR pszBuffer, DWORD dwBufferSize, PDWORD pdwRequiredSize, PVOID pvReserved)
Definition: advpack.c:811
#define WideCharToMultiByte
Definition: compat.h:111
GLenum GLsizei len
Definition: glext.h:6722
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:3437

◆ TranslateInfStringExW()

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

Definition at line 811 of file advpack.c.

815{
816 TRACE("(%p, %s, %s, %s, %p, %ld, %p, %p)\n", hInf, debugstr_w(pszInfFilename),
817 debugstr_w(pszTranslateSection), debugstr_w(pszTranslateKey),
818 pszBuffer, dwBufferSize, pdwRequiredSize, pvReserved);
819
820 if (!hInf || !pszInfFilename || !pszTranslateSection || !pszTranslateKey)
821 return E_INVALIDARG;
822
823 if (!SetupGetLineTextW(NULL, hInf, pszTranslateSection, pszTranslateKey,
824 pszBuffer, dwBufferSize, pdwRequiredSize))
825 {
826 if (dwBufferSize < *pdwRequiredSize)
828
830 }
831
832 return S_OK;
833}
BOOL WINAPI SetupGetLineTextW(PINFCONTEXT context, HINF hinf, PCWSTR section_name, PCWSTR key_name, PWSTR buffer, DWORD size, PDWORD required)
Definition: parser.c:1763
#define SPAPI_E_LINE_NOT_FOUND
Definition: winerror.h:4677

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 840 of file advpack.c.

842{
843 UNICODE_STRING parmsW;
844 HRESULT res;
845
846 TRACE("(%p, %p, %s, %i)\n", hWnd, hInstance, debugstr_a(pszParms), nShow);
847
848 if (!pszParms)
849 return E_INVALIDARG;
850
851 RtlCreateUnicodeStringFromAsciiz(&parmsW, pszParms);
852
853 res = UserInstStubWrapperW(hWnd, hInstance, parmsW.Buffer, nShow);
854
855 RtlFreeUnicodeString(&parmsW);
856
857 return res;
858}
HINSTANCE hInstance
Definition: charmap.c:19
HRESULT WINAPI UserInstStubWrapperW(HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow)
Definition: advpack.c:881

◆ UserInstStubWrapperW()

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

Definition at line 881 of file advpack.c.

883{
884 HKEY setup, guid;
886 DWORD size = sizeof(stub);
887 HRESULT hr = S_OK;
888 BOOL res;
889
890 TRACE("(%p, %p, %s, %i)\n", hWnd, hInstance, debugstr_w(pszParms), nShow);
891
892 if (!pszParms || !*pszParms)
893 return E_INVALIDARG;
894
896 {
897 return E_FAIL;
898 }
899
900 if (RegOpenKeyExW(setup, pszParms, 0, KEY_READ, &guid))
901 {
903 return E_FAIL;
904 }
905
906 res = RegQueryValueExW(guid, L"RealStubPath", NULL, NULL, (BYTE *)stub, &size);
907 if (res || !*stub)
908 goto done;
909
910 /* launch the user stub wrapper */
912
913done:
916
917 return hr;
918}
HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE)
Definition: install.c:850
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:1026
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 925 of file advpack.c.

927{
928 UNICODE_STRING parmsW;
929 HRESULT res;
930
931 TRACE("(%p, %p, %s, %i)\n", hWnd, hInstance, debugstr_a(pszParms), nShow);
932
933 if (!pszParms)
934 return E_INVALIDARG;
935
936 RtlCreateUnicodeStringFromAsciiz(&parmsW, pszParms);
937
939
940 RtlFreeUnicodeString(&parmsW);
941
942 return res;
943}
HRESULT WINAPI UserUnInstStubWrapperW(HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow)
Definition: advpack.c:948

◆ UserUnInstStubWrapperW()

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

Definition at line 948 of file advpack.c.

950{
951 FIXME("(%p, %p, %s, %i): stub\n", hWnd, hInstance, debugstr_w(pszParms), nShow);
952
953 return E_FAIL;
954}

Referenced by UserUnInstStubWrapperA().