mmioRenameW function (mmiscapi.h)

The mmioRename function renames the specified file.


MMRESULT mmioRenameW(
  LPCWSTR     pszFileName,
  LPCWSTR     pszNewFileName,
  LPCMMIOINFO pmmioinfo,
  DWORD       fdwRename



Pointer to a string containing the file name of the file to rename.


Pointer to a string containing the new file name.


Pointer to an MMIOINFO structure containing extra parameters used by mmioRename. If this parameter is not NULL, all unused members of the MMIOINFO structure it references must be set to zero, including the reserved members.


Flags for the rename operation. This parameter should be set to zero.

Return value

Returns zero if the file was renamed. Otherwise, returns an error code returned from mmioRename or from the I/O procedure.



The mmiscapi.h header defines mmioRename 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.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mmiscapi.h (include Mmiscapi.h, Windows.h)
Library Winmm.lib
DLL Winmm.dll