SetupRenameErrorA function (setupapi.h)

[This function is available for use in the operating systems indicated in the Requirements section. It may be altered or unavailable in subsequent versions. SetupAPI should no longer be used for installing applications. Instead, use the Windows Installer for developing application installers. SetupAPI continues to be used for installing device drivers.]

The RenameError function generates a dialog box that informs the user of a file renaming error.

Syntax

WINSETUPAPI UINT SetupRenameErrorA(
  [in] HWND  hwndParent,
  [in] PCSTR DialogTitle,
  [in] PCSTR SourceFile,
  [in] PCSTR TargetFile,
  [in] UINT  Win32ErrorCode,
  [in] DWORD Style
);

Parameters

[in] hwndParent

Handle to the parent window for this dialog box.

[in] DialogTitle

Pointer to a null-terminated string that specifies the error dialog box title. This parameter may be NULL. If this parameter is NULL, the default title of "Rename Error" (localized) is used.

[in] SourceFile

Pointer to a null-terminated string that specifies the full path of the source file on which the operation failed.

[in] TargetFile

Pointer to a null-terminated string that specifies the full path of the target file on which the operation failed.

[in] Win32ErrorCode

The system error code encountered during the file operation.

[in] Style

Specifies display formatting and behavior of the dialog box. This parameter can be one of the following flags.

IDF_NOBEEP

Prevent the dialog box from beeping when it first appears.

IDF_NOFOREGROUND

Prevent the dialog box from becoming the foreground window.

Return value

This function returns one of the following values.

To get extended error information, call GetLastError.

Remarks

Note

The setupapi.h header defines SetupRenameError as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header setupapi.h
Library Setupapi.lib
DLL Setupapi.dll

See also

Functions

Overview

SetupCopyError

SetupDeleteError

SetupPromptForDisk