CeCopyFile (RAPI)

This function copies an existing file to a new file. CeCopyFile is a remote application interface (RAPI), which enables an application running on a desktop computer to make function calls on a Windows CE–based device.

BOOL CeCopyFile(
LPCWSTR lpExistingFileName, 
LPCWSTR lpNewFileName, 
BOOL bFailIfExists); 

Parameters

  • lpExistingFileName
    [in] Long pointer to a null-terminated string that specifies the name of an existing file.
  • lpNewFileName
    [in] Long pointer to a null-terminated string that specifies the name of the new file.
  • bFailIfExists
    [in] Boolean value that specifies how this operation is to proceed if a file of the same name as that indicated by lpNewFileName already exists. If bFailIfExists is TRUE and the new file already exists, the function fails. If bFailIfExists is FALSE and the new file already exists, the function overwrites the existing file and succeeds.

Return Values

Nonzero indicates success. Zero indicates failure. To determine if a function failed because of RAPI errors, call CeRapiGetError. To determine if a function failed because of non-RAPI errors, call CeGetLastError.

Remarks

When writing applications for Windows CE version 1.0 and 1.01, use the PegCopyFile function.

Requirements

Runs On Versions Defined in Include Link to
Windows CE OS 2.0 and later Rapi.h    

See Also

CeGetLastError, CeRapiGetError, CopyFile

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.