win32 API函数BOOL DeleteFile(
  LPCTSTR lpFileName   // file name
);

解决方案 »

  1.   

    DeleteFile
    The DeleteFile function deletes an existing file. BOOL DeleteFile(
      LPCTSTR lpFileName   // file name
    );
    Parameters
    lpFileName 
    [in] Pointer to a null-terminated string that specifies the file to be deleted. 
    Windows NT/2000 or later: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to nearly 32,000 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see File Name Conventions. Windows 95/98/Me: This string must not exceed MAX_PATH characters. Return Values
    If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError.