This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Handles installation and setup for a DLL.
HRESULT DllInstall( BOOL bInstall, [in, optional] PCWSTR pszCmdLine);
bInstall
Type:BOOL
TRUE if the DLL is being installed;FALSE if it is being uninstalled.
[in, optional] pszCmdLine
Type:PCWSTR
A string passed in byregsvr32 that indicates which setup procedure to use. This value can beNULL.
Type:HRESULT
If this function succeeds, it returnsS_OK. Otherwise, it returns anHRESULT error code.
This function may be implemented and exported by name by a DLL for use during application installation or setup. It is invoked byregsvr32 to allow the DLL to perform tasks such as adding information to the registry.
DllInstall is used only for application installation and setup. It should not be called by an application. It is similar in purpose toDllRegisterServer orDllUnregisterServer. Unlike these functions,DllInstall takes an input string which can be used to specify a variety of different actions. This allows a DLL to be installed in more than one way, based on any criteria that is appropriate.
To useDllInstall withregsvr32, add a "/i" flag followed by a colon (:) and a string. The string will be passed toDllInstall as thepszCmdLine parameter. If you omit the colon and string,pszCmdLine will be set toNULL. The following example would be used to install a DLL.
regsvr32 /i:"Install_1" dllname.dll
DllInstall is invoked withbInstall set toTRUE andpszCmdLine set to "Install_1". To uninstall a DLL, use the following:
regsvr32 /u /i:"Install_1" dllname.dll
With both of the above examples,DllRegisterServer orDllUnregisterServer will also be called. To callDllInstall only, add a "/n" flag.
regsvr32 /n /i:"Install_1" dllname.dll
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | shlwapi.h |
DLL | Shlwapi.dll (version 4.71 or later) |
Was this page helpful?
Was this page helpful?