ICodeInstall::OnCodeInstallProblem

Provides an opportunity to resolve a problem with the download operation. Calling this method provides information about a problem with the code installation by displaying a UI message. If the problem cannot be understood, E_ABORT should be returned by default to stop the code installation process. Otherwise, a return of S_OK would imply retrying the operation.

HRESULT OnCodeInstallProblem(
  ULONG ulStatusCode,     //Describes the problem that has occurred
  LPCWSTR szDestination,  //Name of the existing file causing the 
                          // problem
  LPCWSTR szSource,       //Name of the new file to replace the 
                          // existing file
  DWORD dwReserved        //Reserved
);
 

Parameters

ulStatusCode
[in] The status code describing the problem that has occurred.
szDestination
[in] The name of the existing file causing the problem. This can be the name of an existing file that needs to be overwritten, the name of a directory causing access problems, or the name of a drive that is full.
szSource
[in] If applicable, the name of the new file to replace the existing file.
dwReserved
[in] Reserved for future use.

Return Values

S_OK
Continue the installation process. If there was an access denied or full disk problem, retry the installation. If there was an existing file (newer or older version), overwrite it.
S_FALSE
Omit this particular file, but continue with the rest of the code installation process. This is the typical response for the CIP_NEWER_VERSION_EXISTS status code.
E_ABORT
Stop the code installation process.
E_INVALIDARG
One or more arguments are incorrect.

Remarks

The ulStatusCode parameter contains one of the following values:

CIP_DRIVE_FULL
The drive specified in szDestination is full.
CIP_ACCESS_DENIED
Access to the file specified in szDestination is denied.
CIP_OLDER_VERSION_EXISTS
An existing file (older version) specified in szDestination needs to be overwritten by the file specified in szSource.
CIP_NEWER_VERSION_EXISTS
A file exists (specified in szDestination) that is a newer version of a file to be installed (specified in szSource).
CIP_NAME_CONFLICT
A file exists (specified in szDestination) that has a naming conflict with a file to be installed (specified in szSource). The existing file is neither a new or an older version of the file; rather, they are mismatched but have the same filename.
CIP_TRUST_VERIFICATION_COMPONENT_MISSING
The code installation process cannot find the necessary component (WinVerifyTrust) for verifying trust in downloaded code. szSource specifies the name of the file that cannot be certified. The client should display a UI message asking the user whether or not to install the untrusted code, and should then return E_ABORT to stop the downloading, S_OK to continue the downloading, or S_FALSE to omit this file but continue.

Note  Use caution when returning S_FALSE to omit the file but continue the downloading operation.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in urlmon.h.

See Also

ICodeInstall::GetWindow