ReactOS  0.4.14-dev-114-gc8cbd56
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 29 of file advpub.h.

◆ 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;
65  HRESULT res;
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
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static void basename(LPCWSTR path, LPWSTR name)
Definition: profile.c:38
smooth NULL
Definition: ftsmooth.c:416
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
static LPWSTR ansi_to_unicode_list(LPCSTR ansi_list)
Definition: files.c:40
GLuint res
Definition: glext.h:9613
HRESULT WINAPI AddDelBackupEntryW(LPCWSTR lpcszFileList, LPCWSTR lpcszBackupDir, LPCWSTR lpcszBaseName, DWORD dwFlags)
Definition: files.c:117
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394

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 
148  if (dwFlags & AADBE_ADD_ENTRY)
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 }
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:944
static long backup()
Definition: maze.c:403
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define lstrlenW
Definition: compat.h:407
#define AADBE_DEL_ENTRY
Definition: advpub.h:116
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2351
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
TConfig ini
Definition: tnconfig.cpp:45
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
Definition: profile.c:1453
#define S_OK
Definition: intsafe.h:59
#define lstrcpyW
Definition: compat.h:406
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define AADBE_ADD_ENTRY
Definition: advpub.h:115
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274

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 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#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
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
GLuint res
Definition: glext.h:9613

◆ 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;
255  LPCWSTR szPath;
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 
321 done:
323  SetupCloseFileQueue(fileQueue);
324 
325  HeapFree(GetProcessHeap(), 0, szDestFilename);
326 
327  return HRESULT_FROM_WIN32(dwLastError);
328 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HSPFILEQ WINAPI SetupOpenFileQueue(VOID)
Definition: fileqsup.c:161
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
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:622
#define lstrlenW
Definition: compat.h:407
#define lstrcpynW
Definition: compat.h:397
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
static UINT CALLBACK pQueueCallback(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
Definition: files.c:175
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
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
BOOL WINAPI SetupCommitFileQueueW(IN HWND Owner, IN HSPFILEQ QueueHandle, IN PSP_FILE_CALLBACK_W MsgHandler, IN PVOID Context OPTIONAL)
Definition: fileqsup.c:617
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
void WINAPI SetupTermDefaultQueueCallback(PVOID context)
Definition: queue.c:1704
#define AIF_QUIET
Definition: advpub.h:127
PVOID WINAPI SetupInitDefaultQueueCallbackEx(HWND owner, HWND progress, UINT msg, DWORD reserved1, PVOID reserved2)
Definition: queue.c:1686
#define lstrcpyW
Definition: compat.h:406
LPCWSTR szPath
Definition: env.c:35
static UINT CALLBACK pQuietQueueCallback(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
Definition: files.c:169
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define ROOT_LENGTH
Definition: files.c:167
BOOL WINAPI SetupCloseFileQueue(IN HSPFILEQ QueueHandle)
Definition: fileqsup.c:217
#define HeapFree(x, y, z)
Definition: compat.h:394

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:43
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ DelNodeA()

HRESULT WINAPI DelNodeA ( LPCSTR  pszFileOrDirName,
DWORD  dwFlags 
)

Definition at line 398 of file files.c.

399 {
400  UNICODE_STRING fileordirname;
401  HRESULT res;
402 
403  TRACE("(%s, %d)\n", debugstr_a(pszFileOrDirName), dwFlags);
404 
405  RtlCreateUnicodeStringFromAsciiz(&fileordirname, pszFileOrDirName);
406 
407  res = DelNodeW(fileordirname.Buffer, dwFlags);
408 
409  RtlFreeUnicodeString(&fileordirname);
410 
411  return res;
412 }
HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
Definition: files.c:432
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
GLuint res
Definition: glext.h:9613

◆ DelNodeRunDLL32A()

HRESULT WINAPI DelNodeRunDLL32A ( HWND  ,
HINSTANCE  ,
LPSTR  ,
INT   
)

Definition at line 459 of file files.c.

460 {
462  HRESULT hr;
463 
464  TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_a(cmdline), show);
465 
467 
468  hr = DelNodeRunDLL32W(hWnd, hInst, params.Buffer, show);
469 
471 
472  return hr;
473 }
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI DelNodeRunDLL32W(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
Definition: files.c:490
HWND hWnd
Definition: settings.c:17
TCHAR * cmdline
Definition: stretchblt.cpp:32
GLenum const GLfloat * params
Definition: glext.h:5645
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
HINSTANCE hInst
Definition: dxdiag.c:13

◆ DelNodeRunDLL32W()

HRESULT WINAPI DelNodeRunDLL32W ( HWND  ,
HINSTANCE  ,
LPWSTR  ,
INT   
)

Definition at line 490 of file files.c.

491 {
492  LPWSTR szFilename, szFlags;
493  LPWSTR cmdline_copy, cmdline_ptr;
494  DWORD dwFlags = 0;
495  HRESULT res;
496 
497  TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_w(cmdline), show);
498 
499  cmdline_copy = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(cmdline) + 1) * sizeof(WCHAR));
500  cmdline_ptr = cmdline_copy;
501  lstrcpyW(cmdline_copy, cmdline);
502 
503  /* get the parameters at indexes 0 and 1 respectively */
504  szFilename = get_parameter(&cmdline_ptr, ',', TRUE);
505  szFlags = get_parameter(&cmdline_ptr, ',', TRUE);
506 
507  if (szFlags)
508  dwFlags = atolW(szFlags);
509 
510  res = DelNodeW(szFilename, dwFlags);
511 
512  HeapFree(GetProcessHeap(), 0, cmdline_copy);
513 
514  return res;
515 }
#define TRUE
Definition: types.h:120
HWND hWnd
Definition: settings.c:17
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define lstrlenW
Definition: compat.h:407
HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
Definition: files.c:432
#define debugstr_w
Definition: kernel32.h:32
WINE_UNICODE_INLINE long int atolW(const WCHAR *str)
Definition: unicode.h:310
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted) DECLSPEC_HIDDEN
Definition: install.c:201
HINSTANCE hInst
Definition: dxdiag.c:13
#define lstrcpyW
Definition: compat.h:406
GLuint res
Definition: glext.h:9613
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by DelNodeRunDLL32A().

◆ DelNodeW()

HRESULT WINAPI DelNodeW ( LPCWSTR  pszFileOrDirName,
DWORD  dwFlags 
)

Definition at line 432 of file files.c.

433 {
434  WCHAR fname[MAX_PATH];
435  HRESULT ret = E_FAIL;
436 
437  TRACE("(%s, %d)\n", debugstr_w(pszFileOrDirName), dwFlags);
438 
439  if (dwFlags)
440  FIXME("Flags ignored!\n");
441 
442  if (pszFileOrDirName && *pszFileOrDirName)
443  {
444  lstrcpyW(fname, pszFileOrDirName);
445 
446  /* TODO: Should check for system directory deletion etc. here */
447 
449  }
450 
451  return ret;
452 }
static HRESULT DELNODE_recurse_dirtree(LPWSTR fname, DWORD flags)
Definition: files.c:330
#define E_FAIL
Definition: ddrawi.h:102
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
int ret
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define lstrcpyW
Definition: compat.h:406

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

◆ ExecuteCabA()

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

Definition at line 619 of file install.c.

620 {
621  UNICODE_STRING cab, inf, section;
622  CABINFOW cabinfo;
623  HRESULT hr;
624 
625  TRACE("(%p, %p, %p)\n", hwnd, pCab, pReserved);
626 
627  if (!pCab)
628  return E_INVALIDARG;
629 
630  if (pCab->pszCab)
631  {
633  cabinfo.pszCab = cab.Buffer;
634  }
635  else
636  cabinfo.pszCab = NULL;
637 
640 
641  MultiByteToWideChar(CP_ACP, 0, pCab->szSrcPath, -1, cabinfo.szSrcPath, ARRAY_SIZE(cabinfo.szSrcPath));
642 
643  cabinfo.pszInf = inf.Buffer;
644  cabinfo.pszSection = section.Buffer;
645  cabinfo.dwFlags = pCab->dwFlags;
646 
647  hr = ExecuteCabW(hwnd, &cabinfo, pReserved);
648 
649  if (pCab->pszCab)
650  RtlFreeUnicodeString(&cab);
651 
652  RtlFreeUnicodeString(&inf);
654 
655  return hr;
656 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
LPSTR pszCab
Definition: advpub.h:34
HRESULT hr
Definition: shlfolder.c:183
#define CP_ACP
Definition: compat.h:99
LPWSTR pszInf
Definition: advpub.h:44
HRESULT WINAPI ExecuteCabW(HWND hwnd, CABINFOW *pCab, LPVOID pReserved)
Definition: install.c:672
Definition: parser.c:55
static IMAGE_SECTION_HEADER section
Definition: loader.c:152
DWORD dwFlags
Definition: advpub.h:38
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
DWORD dwFlags
Definition: advpub.h:47
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
LPSTR pszSection
Definition: advpub.h:36
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define ARRAY_SIZE(a)
Definition: main.h:24
#define MultiByteToWideChar
Definition: compat.h:100
WCHAR szSrcPath[MAX_PATH]
Definition: advpub.h:46
LPWSTR pszCab
Definition: advpub.h:43
CHAR szSrcPath[MAX_PATH]
Definition: advpub.h:37
LPWSTR pszSection
Definition: advpub.h:45
LPSTR pszInf
Definition: advpub.h:35

◆ ExecuteCabW()

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

Definition at line 672 of file install.c.

673 {
674  ADVInfo info;
675  HRESULT hr;
676 
677  TRACE("(%p, %p, %p)\n", hwnd, pCab, pReserved);
678 
679  ZeroMemory(&info, sizeof(ADVInfo));
680 
681  if (pCab->pszCab && *pCab->pszCab)
682  FIXME("Cab archive not extracted!\n");
683 
684  hr = install_init(pCab->pszInf, pCab->pszSection, pCab->szSrcPath, pCab->dwFlags, &info);
685  if (hr != S_OK)
686  goto done;
687 
688  hr = spapi_install(&info);
689  if (hr != S_OK)
690  goto done;
691 
692  hr = adv_install(&info);
693 
694 done:
696 
697  return hr;
698 }
static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, LPCWSTR working_dir, DWORD flags, ADVInfo *info)
Definition: install.c:442
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
HRESULT hr
Definition: shlfolder.c:183
LPWSTR pszInf
Definition: advpub.h:44
#define ZeroMemory
Definition: winbase.h:1642
struct _test_info info[]
Definition: SetCursorPos.c:19
#define FIXME(fmt,...)
Definition: debug.h:110
DWORD dwFlags
Definition: advpub.h:47
static HRESULT adv_install(ADVInfo *info)
Definition: install.c:352
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static void install_release(const ADVInfo *info)
Definition: install.c:517
#define S_OK
Definition: intsafe.h:59
static HRESULT spapi_install(const ADVInfo *info)
Definition: install.c:317
WCHAR szSrcPath[MAX_PATH]
Definition: advpub.h:46
LPWSTR pszCab
Definition: advpub.h:43
LPWSTR pszSection
Definition: advpub.h:45

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

◆ ExtractFilesA()

HRESULT WINAPI ExtractFilesA ( LPCSTR  ,
LPCSTR  ,
DWORD  ,
LPCSTR  ,
LPVOID  ,
DWORD   
)

Definition at line 688 of file files.c.

690 {
691  SESSION session;
693  HRESULT res = S_OK;
694  DWORD dwFileCount = 0;
695  DWORD dwFilesFound = 0;
696  LPSTR szConvertedList = NULL;
697 
698  TRACE("(%s, %s, %d, %s, %p, %d)\n", debugstr_a(CabName), debugstr_a(ExpandDir),
699  Flags, debugstr_a(FileList), LReserved, Reserved);
700 
701  if (!CabName || !ExpandDir)
702  return E_INVALIDARG;
703 
706 
707  hCabinet = LoadLibraryA("cabinet.dll");
708  if (!hCabinet)
709  return E_FAIL;
710 
711  ZeroMemory(&session, sizeof(SESSION));
712 
713  pExtract = (void *)GetProcAddress(hCabinet, "Extract");
714  if (!pExtract)
715  {
716  res = E_FAIL;
717  goto done;
718  }
719 
720  lstrcpyA(session.Destination, ExpandDir);
721 
722  if (FileList)
723  {
724  szConvertedList = convert_file_list(FileList, &dwFileCount);
725  if (!szConvertedList)
726  {
727  res = E_FAIL;
728  goto done;
729  }
730 
731  dwFilesFound = fill_file_list(&session, CabName, szConvertedList);
732  if (dwFilesFound != dwFileCount)
733  {
734  res = E_FAIL;
735  goto done;
736  }
737  }
738  else
739  session.Operation |= EXTRACT_FILLFILELIST;
740 
741  session.Operation |= EXTRACT_EXTRACTFILES;
742  res = pExtract(&session, CabName);
743 
744 done:
745  free_file_list(&session);
747  HeapFree(GetProcessHeap(), 0, szConvertedList);
748 
749  return res;
750 }
static DWORD fill_file_list(SESSION *session, LPCSTR szCabName, LPCSTR szFileList)
Definition: files.c:624
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define EXTRACT_EXTRACTFILES
Definition: files.c:521
vector< FileInfo > FileList
Definition: DriveVolume.h:63
#define ZeroMemory
Definition: winbase.h:1642
char * LPSTR
Definition: xmlstorage.h:182
#define E_FAIL
Definition: ddrawi.h:102
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
static void free_file_list(SESSION *session)
Definition: files.c:651
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:786
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define EXTRACT_FILLFILELIST
Definition: files.c:520
static LPSTR convert_file_list(LPCSTR FileList, DWORD *dwNumFiles)
Definition: files.c:546
#define TRACE(s)
Definition: solgame.cpp:4
#define FreeLibrary(x)
Definition: compat.h:405
#define GetProcessHeap()
Definition: compat.h:395
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
static HMODULE hCabinet
Definition: urlmon_main.c:45
Definition: files.c:529
unsigned long DWORD
Definition: ntddk_ex.h:95
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
INT Operation
Definition: files.c:534
#define S_OK
Definition: intsafe.h:59
GLuint res
Definition: glext.h:9613
#define GetProcAddress(x, y)
Definition: compat.h:410
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
CHAR Destination[MAX_PATH]
Definition: files.c:535
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by ExtractFilesW().

◆ ExtractFilesW()

HRESULT WINAPI ExtractFilesW ( LPCWSTR  ,
LPCWSTR  ,
DWORD  ,
LPCWSTR  ,
LPVOID  ,
DWORD   
)

Definition at line 780 of file files.c.

782 {
783  char *cab_name = NULL, *expand_dir = NULL, *file_list = NULL;
784  HRESULT hres = S_OK;
785 
786  TRACE("(%s, %s, %d, %s, %p, %d)\n", debugstr_w(CabName), debugstr_w(ExpandDir),
787  Flags, debugstr_w(FileList), LReserved, Reserved);
788 
789  if(CabName) {
790  cab_name = heap_strdupWtoA(CabName);
791  if(!cab_name)
792  return E_OUTOFMEMORY;
793  }
794 
795  if(ExpandDir) {
796  expand_dir = heap_strdupWtoA(ExpandDir);
797  if(!expand_dir)
799  }
800 
801  if(SUCCEEDED(hres) && FileList) {
802  file_list = heap_strdupWtoA(FileList);
803  if(!file_list)
805  }
806 
807  /* cabinet.dll, which does the real job of extracting files, doesn't have UNICODE API,
808  so we need W->A conversion at some point anyway. */
809  if(SUCCEEDED(hres))
810  hres = ExtractFilesA(cab_name, expand_dir, Flags, file_list, LReserved, Reserved);
811 
812  heap_free(cab_name);
813  heap_free(expand_dir);
814  heap_free(file_list);
815  return hres;
816 }
vector< FileInfo > FileList
Definition: DriveVolume.h:63
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
HRESULT WINAPI ExtractFilesA(LPCSTR CabName, LPCSTR ExpandDir, DWORD Flags, LPCSTR FileList, LPVOID LReserved, DWORD Reserved)
Definition: files.c:688
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static char * heap_strdupWtoA(const WCHAR *str)
#define S_OK
Definition: intsafe.h:59
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

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

861 {
862  UNICODE_STRING filelist, dir, basename;
863  HRESULT hr;
864 
865  TRACE("(%p, %s, %s, %s, %d)\n", hDlg, debugstr_a(pszFileList),
866  debugstr_a(pszDir), debugstr_a(pszBaseName), dwFlags);
867 
868  RtlCreateUnicodeStringFromAsciiz(&filelist, pszFileList);
871 
872  hr = FileSaveRestoreW(hDlg, filelist.Buffer, dir.Buffer,
873  basename.Buffer, dwFlags);
874 
875  RtlFreeUnicodeString(&filelist);
878 
879  return hr;
880 }
HRESULT hr
Definition: shlfolder.c:183
static void basename(LPCWSTR path, LPWSTR name)
Definition: profile.c:38
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
unsigned int dir
Definition: maze.c:112
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
_In_ LPCSTR pszDir
Definition: shellapi.h:580
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HRESULT WINAPI FileSaveRestoreW(HWND hDlg, LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName, DWORD dwFlags)
Definition: files.c:904

◆ FileSaveRestoreOnINFA()

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

Definition at line 918 of file files.c.

921 {
923  UNICODE_STRING backupdir, backupfile;
924  HRESULT hr;
925 
926  TRACE("(%p, %s, %s, %s, %s, %s, %d)\n", hWnd, debugstr_a(pszTitle),
927  debugstr_a(pszINF), debugstr_a(pszSection), debugstr_a(pszBackupDir),
928  debugstr_a(pszBaseBackupFile), dwFlags);
929 
931  RtlCreateUnicodeStringFromAsciiz(&inf, pszINF);
933  RtlCreateUnicodeStringFromAsciiz(&backupdir, pszBackupDir);
934  RtlCreateUnicodeStringFromAsciiz(&backupfile, pszBaseBackupFile);
935 
936  hr = FileSaveRestoreOnINFW(hWnd, title.Buffer, inf.Buffer, section.Buffer,
937  backupdir.Buffer, backupfile.Buffer, dwFlags);
938 
940  RtlFreeUnicodeString(&inf);
942  RtlFreeUnicodeString(&backupdir);
943  RtlFreeUnicodeString(&backupfile);
944 
945  return hr;
946 }
HRESULT hr
Definition: shlfolder.c:183
HWND hWnd
Definition: settings.c:17
Definition: parser.c:55
static IMAGE_SECTION_HEADER section
Definition: loader.c:152
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HRESULT WINAPI FileSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, LPCWSTR pszSection, LPCWSTR pszBackupDir, LPCWSTR pszBaseBackupFile, DWORD dwFlags)
Definition: files.c:971
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 971 of file files.c.

974 {
975  FIXME("(%p, %s, %s, %s, %s, %s, %d): stub\n", hWnd, debugstr_w(pszTitle),
976  debugstr_w(pszINF), debugstr_w(pszSection), debugstr_w(pszBackupDir),
977  debugstr_w(pszBaseBackupFile), dwFlags);
978 
979  return E_FAIL;
980 }
HWND hWnd
Definition: settings.c:17
#define E_FAIL
Definition: ddrawi.h:102
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175

Referenced by FileSaveRestoreOnINFA().

◆ FileSaveRestoreW()

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

Definition at line 904 of file files.c.

906 {
907  FIXME("(%p, %s, %s, %s, %d) stub\n", hDlg, debugstr_w(pszFileList),
908  debugstr_w(pszDir), debugstr_w(pszBaseName), dwFlags);
909 
910  return E_FAIL;
911 }
#define E_FAIL
Definition: ddrawi.h:102
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ LPCSTR pszDir
Definition: shellapi.h:580
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175

Referenced by FileSaveRestoreA().

◆ GetVersionFromFileA()

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

Definition at line 987 of file files.c.

989 {
990  TRACE("(%s, %p, %p, %d)\n", debugstr_a(Filename), MajorVer, MinorVer, Version);
991  return GetVersionFromFileExA(Filename, MajorVer, MinorVer, Version);
992 }
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:925
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
HRESULT WINAPI GetVersionFromFileExA(LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
Definition: files.c:1018

◆ GetVersionFromFileExA()

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

Definition at line 1018 of file files.c.

1020 {
1022  HRESULT res;
1023 
1024  TRACE("(%s, %p, %p, %d)\n", debugstr_a(lpszFilename),
1025  pdwMSVer, pdwLSVer, bVersion);
1026 
1028 
1029  res = GetVersionFromFileExW(filename.Buffer, pdwMSVer, pdwLSVer, bVersion);
1030 
1032 
1033  return res;
1034 }
const char * filename
Definition: ioapi.h:135
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
HRESULT WINAPI GetVersionFromFileExW(LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
Definition: files.c:1054
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
GLuint res
Definition: glext.h:9613

Referenced by GetVersionFromFileA().

◆ GetVersionFromFileExW()

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

Definition at line 1054 of file files.c.

1056 {
1057  VS_FIXEDFILEINFO *pFixedVersionInfo;
1058  LANGANDCODEPAGE *pLangAndCodePage;
1059  DWORD dwHandle, dwInfoSize;
1060  WCHAR szWinDir[MAX_PATH];
1061  WCHAR szFile[MAX_PATH];
1062  LPVOID pVersionInfo = NULL;
1063  BOOL bFileCopied = FALSE;
1064  UINT uValueLen;
1065 
1066  static const WCHAR backslash[] = {'\\',0};
1067  static const WCHAR translation[] = {
1068  '\\','V','a','r','F','i','l','e','I','n','f','o',
1069  '\\','T','r','a','n','s','l','a','t','i','o','n',0
1070  };
1071 
1072  TRACE("(%s, %p, %p, %d)\n", debugstr_w(lpszFilename),
1073  pdwMSVer, pdwLSVer, bVersion);
1074 
1075  *pdwLSVer = 0;
1076  *pdwMSVer = 0;
1077 
1078  lstrcpynW(szFile, lpszFilename, MAX_PATH);
1079 
1080  dwInfoSize = GetFileVersionInfoSizeW(szFile, &dwHandle);
1081  if (!dwInfoSize)
1082  {
1083  /* check that the file exists */
1085  return S_OK;
1086 
1087  /* file exists, but won't be found by GetFileVersionInfoSize,
1088  * so copy it to the temp dir where it will be found.
1089  */
1090  GetWindowsDirectoryW(szWinDir, MAX_PATH);
1091  GetTempFileNameW(szWinDir, NULL, 0, szFile);
1092  CopyFileW(lpszFilename, szFile, FALSE);
1093  bFileCopied = TRUE;
1094 
1095  dwInfoSize = GetFileVersionInfoSizeW(szFile, &dwHandle);
1096  if (!dwInfoSize)
1097  goto done;
1098  }
1099 
1100  pVersionInfo = HeapAlloc(GetProcessHeap(), 0, dwInfoSize);
1101  if (!pVersionInfo)
1102  goto done;
1103 
1104  if (!GetFileVersionInfoW(szFile, dwHandle, dwInfoSize, pVersionInfo))
1105  goto done;
1106 
1107  if (bVersion)
1108  {
1109  if (!VerQueryValueW(pVersionInfo, backslash,
1110  (LPVOID *)&pFixedVersionInfo, &uValueLen))
1111  goto done;
1112 
1113  if (!uValueLen)
1114  goto done;
1115 
1116  *pdwMSVer = pFixedVersionInfo->dwFileVersionMS;
1117  *pdwLSVer = pFixedVersionInfo->dwFileVersionLS;
1118  }
1119  else
1120  {
1121  if (!VerQueryValueW(pVersionInfo, translation,
1122  (LPVOID *)&pLangAndCodePage, &uValueLen))
1123  goto done;
1124 
1125  if (!uValueLen)
1126  goto done;
1127 
1128  *pdwMSVer = pLangAndCodePage->wLanguage;
1129  *pdwLSVer = pLangAndCodePage->wCodePage;
1130  }
1131 
1132 done:
1133  HeapFree(GetProcessHeap(), 0, pVersionInfo);
1134 
1135  if (bFileCopied)
1136  DeleteFileW(szFile);
1137 
1138  return S_OK;
1139 }
#define TRUE
Definition: types.h:120
#define lstrcpynW
Definition: compat.h:397
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2351
unsigned int BOOL
Definition: ntddk_ex.h:94
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:802
#define debugstr_w
Definition: kernel32.h:32
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:439
#define MAX_PATH
Definition: compat.h:26
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
Definition: filename.c:84
unsigned long DWORD
Definition: ntddk_ex.h:95
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:616
#define S_OK
Definition: intsafe.h:59
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:850
#define HeapFree(x, y, z)
Definition: compat.h:394
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1054

Referenced by GetVersionFromFileExA(), and GetVersionFromFileW().

◆ GetVersionFromFileW()

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

Definition at line 999 of file files.c.

1001 {
1002  TRACE("(%s, %p, %p, %d)\n", debugstr_w(Filename), MajorVer, MinorVer, Version);
1003  return GetVersionFromFileExW(Filename, MajorVer, MinorVer, Version);
1004 }
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:925
#define debugstr_w
Definition: kernel32.h:32
HRESULT WINAPI GetVersionFromFileExW(LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
Definition: files.c:1054
#define TRACE(s)
Definition: solgame.cpp:4

◆ IsNTAdmin()

BOOL WINAPI IsNTAdmin ( DWORD  ,
LPDWORD   
)

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 TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
BOOL WINAPI EqualSid(PSID pSid1, PSID pSid2)
Definition: security.c:708
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
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
unsigned int BOOL
Definition: ntddk_ex.h:94
PVOID WINAPI FreeSid(PSID pSid)
Definition: security.c:577
r reserved
Definition: btrfs.c:2893
smooth NULL
Definition: ftsmooth.c:416
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:526
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define SECURITY_BUILTIN_DOMAIN_RID
Definition: setypes.h:553
#define TOKEN_QUERY
Definition: setypes.h:874
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1138
unsigned long DWORD
Definition: ntddk_ex.h:95
SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]
Definition: setypes.h:964
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:296
static PSID pSid
Definition: security.c:74
$ULONG GroupCount
Definition: setypes.h:960
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
Definition: security.c:413
#define DOMAIN_ALIAS_RID_ADMINS
Definition: setypes.h:624
#define HeapFree(x, y, z)
Definition: compat.h:394
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
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:553
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by check_admin_rights(), and START_TEST().

◆ LaunchINFSectionA()

INT WINAPI LaunchINFSectionA ( HWND  ,
HINSTANCE  ,
LPSTR  ,
INT   
)

Definition at line 705 of file install.c.

706 {
708  HRESULT hr;
709 
710  TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_a(cmdline), show);
711 
712  if (!cmdline)
713  return ADV_FAILURE;
714 
716 
717  hr = LaunchINFSectionW(hWnd, hInst, cmd.Buffer, show);
718 
720 
721  return hr;
722 }
HRESULT hr
Definition: shlfolder.c:183
Definition: ftp_var.h:139
HWND hWnd
Definition: settings.c:17
char * cmd
Definition: vfdcmd.c:85
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define ADV_FAILURE
Definition: install.c:47
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
HINSTANCE hInst
Definition: dxdiag.c:13
INT WINAPI LaunchINFSectionW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
Definition: install.c:748

◆ 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  ,
HINSTANCE  ,
LPWSTR  ,
INT   
)

Definition at line 748 of file install.c.

749 {
750  ADVInfo info;
751  LPWSTR cmdline_copy, cmdline_ptr;
752  LPWSTR inf_filename, install_sec;
753  LPWSTR str_flags;
754  DWORD flags = 0;
755  HRESULT hr = S_OK;
756 
757  TRACE("(%p, %p, %s, %d)\n", hWnd, hInst, debugstr_w(cmdline), show);
758 
759  if (!cmdline)
760  return ADV_FAILURE;
761 
762  cmdline_copy = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(cmdline) + 1) * sizeof(WCHAR));
763  cmdline_ptr = cmdline_copy;
764  lstrcpyW(cmdline_copy, cmdline);
765 
766  inf_filename = get_parameter(&cmdline_ptr, ',', TRUE);
767  install_sec = get_parameter(&cmdline_ptr, ',', TRUE);
768 
769  str_flags = get_parameter(&cmdline_ptr, ',', TRUE);
770  if (str_flags)
771  {
772  DWORD inf_flags = atolW(str_flags);
773  if (inf_flags & LIS_QUIET) flags |= RSC_FLAG_QUIET;
774  if (inf_flags & LIS_NOGRPCONV) flags |= RSC_FLAG_NGCONV;
775  }
776 
777  ZeroMemory(&info, sizeof(ADVInfo));
778 
779  hr = install_init(inf_filename, install_sec, NULL, flags, &info);
780  if (hr != S_OK)
781  goto done;
782 
783  hr = spapi_install(&info);
784  if (hr != S_OK)
785  goto done;
786 
787  hr = adv_install(&info);
788 
789 done:
791  HeapFree(GetProcessHeap(), 0, cmdline_copy);
792 
793  return SUCCEEDED(hr) ? ADV_SUCCESS : ADV_FAILURE;
794 }
static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, LPCWSTR working_dir, DWORD flags, ADVInfo *info)
Definition: install.c:442
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
HWND hWnd
Definition: settings.c:17
#define ZeroMemory
Definition: winbase.h:1642
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define lstrlenW
Definition: compat.h:407
#define RSC_FLAG_NGCONV
Definition: advpub.h:133
struct _test_info info[]
Definition: SetCursorPos.c:19
#define LIS_NOGRPCONV
Definition: advpub.h:140
#define ADV_FAILURE
Definition: install.c:47
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
WINE_UNICODE_INLINE long int atolW(const WCHAR *str)
Definition: unicode.h:310
static HRESULT adv_install(ADVInfo *info)
Definition: install.c:352
LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted)
Definition: install.c:201
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define LIS_QUIET
Definition: advpub.h:139
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
static void install_release(const ADVInfo *info)
Definition: install.c:517
#define S_OK
Definition: intsafe.h:59
HINSTANCE hInst
Definition: dxdiag.c:13
#define lstrcpyW
Definition: compat.h:406
#define ADV_SUCCESS
Definition: install.c:46
#define RSC_FLAG_QUIET
Definition: advpub.h:132
static HRESULT spapi_install(const ADVInfo *info)
Definition: install.c:317
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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 }
#define FIXME(fmt,...)
Definition: debug.h:110

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 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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
#define E_INVALIDARG
Definition: ddrawi.h:101
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
GLuint res
Definition: glext.h:9613

◆ 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 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define INF_STYLE_WIN4
Definition: infsupp.h:41
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define TRACE(s)
Definition: solgame.cpp:4
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59
void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir)
Definition: advpack.c:109

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 
399  RtlCreateUnicodeStringFromAsciiz(&secW, pszSec);
400 
402 
404  RtlFreeUnicodeString(&secW);
405 
406  return res;
407 }
HWND hWnd
Definition: settings.c:17
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#define E_INVALIDARG
Definition: ddrawi.h:101
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR infW[]
Definition: axinstall.c:35
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
HRESULT WINAPI RebootCheckOnInstallW(HWND hWnd, LPCWSTR pszINF, LPCWSTR pszSec, DWORD dwReserved)
Definition: advpack.c:432
GLuint res
Definition: glext.h:9613

◆ 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 }
HWND hWnd
Definition: settings.c:17
#define E_FAIL
Definition: ddrawi.h:102
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110

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 hr
Definition: shlfolder.c:183
Definition: parser.c:55
static IMAGE_SECTION_HEADER section
Definition: loader.c:152
smooth NULL
Definition: ftsmooth.c:416
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
static void free_strtable(STRTABLEW *wtable)
Definition: reg.c:129
static STRTABLEW * strtable_atow(const STRTABLEA *atable)
Definition: reg.c:114
HRESULT WINAPI RegInstallW(HMODULE hm, LPCWSTR pszSection, const STRTABLEW *pstTable)
Definition: reg.c:221

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 
262 done:
263 
264  DeleteFileW(tmp_ini_path);
265 
266  return hr;
267 }
HRESULT hr
Definition: shlfolder.c:183
LPWSTR pszInf
Definition: advpub.h:44
DWORD cEntries
Definition: advpub.h:104
#define ZeroMemory
Definition: winbase.h:1642
HRESULT WINAPI ExecuteCabW(HWND hwnd, CABINFOW *pCab, LPVOID pReserved)
Definition: install.c:672
#define E_FAIL
Definition: ddrawi.h:102
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
#define debugstr_w
Definition: kernel32.h:32
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
smooth NULL
Definition: ftsmooth.c:416
DWORD dwFlags
Definition: advpub.h:47
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR quote[]
Definition: reg.c:40
LONG HRESULT
Definition: typedefs.h:77
LPWSTR pszValue
Definition: advpub.h:89
#define MAX_PATH
Definition: compat.h:26
static const WCHAR Strings[]
Definition: reg.c:35
static BOOL create_tmp_ini_file(HMODULE hm, WCHAR *ini_file)
Definition: reg.c:55
LPWSTR pszName
Definition: advpub.h:88
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
Definition: profile.c:1453
#define S_OK
Definition: intsafe.h:59
#define lstrcpyW
Definition: compat.h:406
STRENTRYW * pse
Definition: advpub.h:105
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
static HRESULT write_predefined_strings(HMODULE hm, LPCWSTR ini_path)
Definition: reg.c:173
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPWSTR pszSection
Definition: advpub.h:45

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);
331  RtlCreateUnicodeStringFromAsciiz(&root, pcszRootKey);
332  RtlCreateUnicodeStringFromAsciiz(&subkey, pcszSubKey);
333  RtlCreateUnicodeStringFromAsciiz(&value, pcszValueName);
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 }
HRESULT hr
Definition: shlfolder.c:183
struct _root root
HWND hWnd
Definition: settings.c:17
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
GLsizei const GLfloat * value
Definition: glext.h:6069
HRESULT WINAPI RegSaveRestoreW(HWND hWnd, LPCWSTR pszTitleString, HKEY hkBackupKey, LPCWSTR pcszRootKey, LPCWSTR pcszSubKey, LPCWSTR pcszValueName, DWORD dwFlags)
Definition: reg.c:367
static char title[]
Definition: ps.c:92

◆ 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 
395  RtlCreateUnicodeStringFromAsciiz(&inf, pszINF);
397 
398  hr = RegSaveRestoreOnINFW(hWnd, title.Buffer, inf.Buffer, section.Buffer,
399  hHKLMBackKey, hHKCUBackKey, dwFlags);
400 
402  RtlFreeUnicodeString(&inf);
404 
405  return hr;
406 }
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI RegSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, LPCWSTR pszSection, HKEY hHKLMBackKey, HKEY hHKCUBackKey, DWORD dwFlags)
Definition: reg.c:429
HWND hWnd
Definition: settings.c:17
Definition: parser.c:55
static IMAGE_SECTION_HEADER section
Definition: loader.c:152
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
static char title[]
Definition: ps.c:92

◆ 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 }
HWND hWnd
Definition: settings.c:17
#define E_FAIL
Definition: ddrawi.h:102
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175

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 }
HWND hWnd
Definition: settings.c:17
#define E_FAIL
Definition: ddrawi.h:102
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175

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

937 {
938  UNICODE_STRING cmdname, infsec;
940  HRESULT hr;
941 
942  TRACE("(%p, %s, %s, %s, %s, %p, %d, %p)\n",
943  hWnd, debugstr_a(szCmdName), debugstr_a(szInfSection),
944  debugstr_a(szDir), debugstr_a(lpszTitle),
945  phEXE, dwFlags, pvReserved);
946 
947  if (!szCmdName || !szDir)
948  return E_INVALIDARG;
949 
950  RtlCreateUnicodeStringFromAsciiz(&cmdname, szCmdName);
951  RtlCreateUnicodeStringFromAsciiz(&infsec, szInfSection);
954 
955  hr = RunSetupCommandW(hWnd, cmdname.Buffer, infsec.Buffer, dir.Buffer,
956  title.Buffer, phEXE, dwFlags, pvReserved);
957 
958  RtlFreeUnicodeString(&cmdname);
959  RtlFreeUnicodeString(&infsec);
962 
963  return hr;
964 }
HRESULT hr
Definition: shlfolder.c:183
HWND hWnd
Definition: settings.c:17
#define E_INVALIDARG
Definition: ddrawi.h:101
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
unsigned int dir
Definition: maze.c:112
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
Definition: install.c:991
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
static char title[]
Definition: ps.c:92

◆ RunSetupCommandW()

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

Definition at line 991 of file install.c.

995 {
996  ADVInfo info;
997  HRESULT hr;
998 
999  TRACE("(%p, %s, %s, %s, %s, %p, %d, %p)\n",
1000  hWnd, debugstr_w(szCmdName), debugstr_w(szInfSection),
1001  debugstr_w(szDir), debugstr_w(lpszTitle),
1002  phEXE, dwFlags, pvReserved);
1003 
1005  FIXME("Unhandled flag: RSC_FLAG_UPDHLPDLLS\n");
1006 
1007  if (!szCmdName || !szDir)
1008  return E_INVALIDARG;
1009 
1010  if (!(dwFlags & RSC_FLAG_INF))
1011  return launch_exe(szCmdName, szDir, phEXE);
1012 
1013  ZeroMemory(&info, sizeof(ADVInfo));
1014 
1015  hr = install_init(szCmdName, szInfSection, szDir, dwFlags, &info);
1016  if (hr != S_OK)
1017  goto done;
1018 
1019  hr = spapi_install(&info);
1020  if (hr != S_OK)
1021  goto done;
1022 
1023  hr = adv_install(&info);
1024 
1025 done:
1027 
1028  return hr;
1029 }
static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, LPCWSTR working_dir, DWORD flags, ADVInfo *info)
Definition: install.c:442
HRESULT hr
Definition: shlfolder.c:183
HWND hWnd
Definition: settings.c:17
#define ZeroMemory
Definition: winbase.h:1642
#define RSC_FLAG_INF
Definition: advpub.h:130
HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE)
Definition: install.c:895
struct _test_info info[]
Definition: SetCursorPos.c:19
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
static HRESULT adv_install(ADVInfo *info)
Definition: install.c:352
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
#define RSC_FLAG_UPDHLPDLLS
Definition: advpub.h:134
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
static void install_release(const ADVInfo *info)
Definition: install.c:517
#define S_OK
Definition: intsafe.h:59
static HRESULT spapi_install(const ADVInfo *info)
Definition: install.c:317

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 }
WCHAR szStub[MAX_PATH *4]
Definition: advpub.h:70
CHAR szCompID[128]
Definition: advpub.h:60
CHAR szStub[MAX_PATH *4]
Definition: advpub.h:58
BOOL bRollback
Definition: advpub.h:74
#define CP_ACP
Definition: compat.h:99
WCHAR szDispName[128]
Definition: advpub.h:68
DWORD dwIsInstalled
Definition: advpub.h:73
HRESULT WINAPI SetPerUserSecValuesW(PERUSERSECTIONW *pPerUser)
Definition: advpack.c:558
WCHAR szGUID[39+20]
Definition: advpub.h:67
CHAR szGUID[39+20]
Definition: advpub.h:55
CHAR szDispName[128]
Definition: advpub.h:56
#define E_INVALIDARG
Definition: ddrawi.h:101
CHAR szVersion[32]
Definition: advpub.h:59
#define TRACE(s)
Definition: solgame.cpp:4
WCHAR szLocale[10]
Definition: advpub.h:69
WCHAR szVersion[32]
Definition: advpub.h:71
BOOL bRollback
Definition: advpub.h:62
WCHAR szCompID[128]
Definition: advpub.h:72
#define ARRAY_SIZE(a)
Definition: main.h:24
CHAR szLocale[10]
Definition: advpub.h:57
#define MultiByteToWideChar
Definition: compat.h:100
DWORD dwIsInstalled
Definition: advpub.h:61

◆ 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  {
600  RegSetValueExW(guid, locale, 0, REG_SZ, (LPBYTE)pPerUser->szLocale,
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  {
612  RegSetValueExW(guid, NULL, 0, REG_SZ, (LPBYTE)pPerUser->szDispName,
613  (lstrlenW(pPerUser->szDispName) + 1) * sizeof(WCHAR));
614  }
615 
616  RegSetValueExW(guid, isinstalled, 0, REG_DWORD,
617  (LPBYTE)&pPerUser->dwIsInstalled, sizeof(DWORD));
618 
619  RegCloseKey(guid);
621 
622  return S_OK;
623 }
WCHAR szStub[MAX_PATH *4]
Definition: advpub.h:70
WCHAR szDispName[128]
Definition: advpub.h:68
DWORD dwIsInstalled
Definition: advpub.h:73
#define lstrlenW
Definition: compat.h:407
#define E_FAIL
Definition: ddrawi.h:102
WCHAR szGUID[39+20]
Definition: advpub.h:67
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:1091
const GUID * guid
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
Definition: _locale.h:75
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR version[]
Definition: asmname.c:64
static const WCHAR setup_key[]
Definition: advpack.c:44
#define KEY_WRITE
Definition: nt_native.h:1031
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:4895
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
WCHAR szLocale[10]
Definition: advpub.h:69
WCHAR szVersion[32]
Definition: advpub.h:71
#define S_OK
Definition: intsafe.h:59
WCHAR szCompID[128]
Definition: advpub.h:72
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
void setup(char *serport, int baud)
Definition: gdblib.c:169
#define REG_DWORD
Definition: sdbapi.c:596
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define REG_SZ
Definition: layer.c:22

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 }
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
static const WCHAR filenameW[]
Definition: amstream.c:41
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR keyW[]
Definition: tokenize.c:60
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
unsigned long DWORD
Definition: ntddk_ex.h:95
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
GLenum GLsizei len
Definition: glext.h:6722
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
#define S_OK
Definition: intsafe.h:59
GLuint res
Definition: glext.h:9613
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394
HRESULT WINAPI TranslateInfStringExW(HINF hInf, LPCWSTR pszInfFilename, LPCWSTR pszTranslateSection, LPCWSTR pszTranslateKey, LPWSTR pszBuffer, DWORD dwBufferSize, PDWORD pdwRequiredSize, PVOID pvReserved)
Definition: advpack.c:835

◆ 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 
853  return SPAPI_E_LINE_NOT_FOUND;
854  }
855 
856  return S_OK;
857 }
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
#define SPAPI_E_LINE_NOT_FOUND
Definition: winerror.h:3144
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI SetupGetLineTextW(PINFCONTEXT context, HINF hinf, PCWSTR section_name, PCWSTR key_name, PWSTR buffer, DWORD size, PDWORD required)
Definition: parser.c:1756

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 }
HWND hWnd
Definition: settings.c:17
HINSTANCE hInstance
Definition: charmap.c:20
#define E_INVALIDARG
Definition: ddrawi.h:101
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
HRESULT WINAPI UserInstStubWrapperW(HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow)
Definition: advpack.c:905
GLuint res
Definition: glext.h:9613

◆ 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 = MAX_PATH;
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 */
939  hr = launch_exe(stub, NULL, NULL);
940 
941 done:
943  RegCloseKey(guid);
944 
945  return hr;
946 }
HRESULT hr
Definition: shlfolder.c:183
#define KEY_READ
Definition: nt_native.h:1023
HWND hWnd
Definition: settings.c:17
Definition: stubgen.c:11
#define E_FAIL
Definition: ddrawi.h:102
HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE) DECLSPEC_HIDDEN
Definition: install.c:895
HINSTANCE hInstance
Definition: charmap.c:20
const GUID * guid
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR setup_key[]
Definition: advpack.c:44
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:59
void setup(char *serport, int baud)
Definition: gdblib.c:169
GLuint res
Definition: glext.h:9613
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

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 
966  res = UserUnInstStubWrapperW(hWnd, hInstance, parmsW.Buffer, nShow);
967 
968  RtlFreeUnicodeString(&parmsW);
969 
970  return res;
971 }
HRESULT WINAPI UserUnInstStubWrapperW(HWND hWnd, HINSTANCE hInstance, LPWSTR pszParms, INT nShow)
Definition: advpack.c:976
HWND hWnd
Definition: settings.c:17
HINSTANCE hInstance
Definition: charmap.c:20
#define E_INVALIDARG
Definition: ddrawi.h:101
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
GLuint res
Definition: glext.h:9613

◆ 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 }
HWND hWnd
Definition: settings.c:17
#define E_FAIL
Definition: ddrawi.h:102
HINSTANCE hInstance
Definition: charmap.c:20
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110

Referenced by UserUnInstStubWrapperA().