Changeset 107061 in vbox for trunk/src/VBox/GuestHost/installation
- Timestamp:
- Nov 20, 2024 4:09:39 PM (2 months ago)
- Location:
- trunk/src/VBox/GuestHost/installation
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/installation/VBoxWinDrvInst.cpp
r107059 r107061 59 59 60 60 #include "VBoxWinDrvCommon.h" 61 #include "VBoxWinDrvInstInternal.h" 61 62 62 63 … … 139 140 DECL_HIDDEN_DATA(PFNSETUPUNINSTALLOEMINFW) g_pfnSetupUninstallOEMInfW = NULL; /* For XP+. */ 140 141 DECL_HIDDEN_DATA(PFNSETUPSETNONINTERACTIVEMODE) g_pfnSetupSetNonInteractiveMode = NULL; /* For W2K+. */ 141 142 143 /**144 * Enumeration specifying the driver (un)installation mode.145 */146 typedef enum VBOXWINDRVINSTMODE147 {148 /** Invalid mode; do not use. */149 VBOXWINDRVINSTMODE_INVALID = 0,150 /** Install a driver. */151 VBOXWINDRVINSTMODE_INSTALL,152 /** Install by executing an INF section. */153 VBOXWINDRVINSTMODE_INSTALL_INFSECTION,154 /** Uninstall a driver. */155 VBOXWINDRVINSTMODE_UNINSTALL,156 /** Uninstall by executing an INF section. */157 VBOXWINDRVINSTMODE_UNINSTALL_INFSECTION158 } VBOXWINDRVINSTMODE;159 160 /**161 * Structure for keeping driver (un)installation parameters.162 */163 typedef struct VBOXWINDRVINSTPARMS164 {165 /** Installation mode. */166 VBOXWINDRVINSTMODE enmMode;167 /** Installation flags of type VBOX_WIN_DRIVERINSTALL_F_XXX. */168 uint32_t fFlags;169 /** INF file to use for (un)installation. */170 PRTUTF16 pwszInfFile;171 /** Union keeping specific parameters, depending on \a enmMode. */172 union173 {174 struct175 {176 /** Model including decoration (e.g. "VBoxUSB.NTAMD64"); optional and might be NULL. */177 PRTUTF16 pwszModel;178 /** Hardware (Pnp) ID; optional and might be NULL. */179 PRTUTF16 pwszPnpId;180 /** Name of section to install. */181 PRTUTF16 pwszSection;182 } UnInstall;183 struct184 {185 /** Section within in the INF file to execute. */186 PRTUTF16 pwszSection;187 } ExecuteInf;188 } u;189 } VBOXWINDRVINSTPARMS;190 /** Pointer to driver installation parameters. */191 typedef VBOXWINDRVINSTPARMS *PVBOXWINDRVINSTPARMS;192 142 193 143 /** … … 1813 1763 } 1814 1764 1815 vboxWinDrvInstParmsDestroy(&pCtx->Parms); 1765 if (!(fFlags & VBOX_WIN_DRIVERINSTALL_F_NO_DESTROY)) 1766 vboxWinDrvInstParmsDestroy(&pCtx->Parms); 1816 1767 1817 1768 if (RT_FAILURE(rc)) … … 1882 1833 rc = vboxWinDrvInstMain(pCtx, &pCtx->Parms); 1883 1834 1884 vboxWinDrvInstParmsDestroy(&pCtx->Parms); 1835 if (!(fFlags & VBOX_WIN_DRIVERINSTALL_F_NO_DESTROY)) 1836 vboxWinDrvInstParmsDestroy(&pCtx->Parms); 1885 1837 1886 1838 if (RT_FAILURE(rc)) … … 1919 1871 rc = vboxWinDrvInstMain(pCtx, &pCtx->Parms); 1920 1872 1921 vboxWinDrvInstParmsDestroy(&pCtx->Parms); 1873 if (!(fFlags & VBOX_WIN_DRIVERINSTALL_F_NO_DESTROY)) 1874 vboxWinDrvInstParmsDestroy(&pCtx->Parms); 1922 1875 1923 1876 return rc; … … 1952 1905 } 1953 1906 1907 #ifdef TESTCASE 1908 /** 1909 * Returns the internal parameters of an (un)installation. 1910 * 1911 * @returns Internal parameters of an (un)installation. 1912 * @param hDrvInst Windows driver installer handle to use. 1913 */ 1914 PVBOXWINDRVINSTPARMS VBoxWinDrvInstTestGetParms(VBOXWINDRVINST hDrvInst) 1915 { 1916 PVBOXWINDRVINSTINTERNAL pCtx = hDrvInst; 1917 VBOXWINDRVINST_VALID_RETURN_RC((hDrvInst), NULL); 1918 1919 return &pCtx->Parms; 1920 } 1921 1922 /** 1923 * Detroys internal parameters of an (un)installation. 1924 * 1925 * @param pParms Internal parameters of an (un)installation to destroy. 1926 */ 1927 void VBoxWinDrvInstTestParmsDestroy(PVBOXWINDRVINSTPARMS pParms) 1928 { 1929 vboxWinDrvInstParmsDestroy(pParms); 1930 } 1931 #endif /* TESTCASE */ 1932
Note:
See TracChangeset
for help on using the changeset viewer.