Cara.. tirei isto aqui do Help do Delphi 2005. Mas dá uma olhadinha no help do Delphi 7 sobre a API do Windows:
<< CopyFileEx The CopyFileEx function copies an existing file to a new file. BOOL CopyFileEx( LPCTSTR lpExistingFileName, LPCTSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags ); Parameters lpExistingFileName [in] Pointer to a null-terminated string that specifies the name of an existing file. In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see Naming a File. Windows Me/98/95: This string must not exceed MAX_PATH characters. lpNewFileName [in] Pointer to a null-terminated string that specifies the name of the new file. In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see Naming a File. Windows Me/98/95: This string must not exceed MAX_PATH characters. lpProgressRoutine [in] Address of a callback function of type LPPROGRESS_ROUTINE that is called each time another portion of the file has been copied. This parameter can be NULL. For more information on the progress callback function, see CopyProgressRoutine. lpData [in] Argument to be passed to the callback function. This parameter can be NULL. pbCancel [in] If this flag is set to TRUE during the copy operation, the operation is canceled. Otherwise, the copy operation will continue to completion. dwCopyFlags [in] Flags that specify how the file is to be copied. This parameter can be a combination of the following values. Value Meaning COPY_FILE_ALLOW_DECRYPTED_DESTINATION An attempt to copy an encrypted file will succeed even if the destination copy cannot be encrypted. Windows 2000/NT and Windows Me/98/95: This value is not supported. COPY_FILE_FAIL_IF_EXISTS The copy operation fails immediately if the target file already exists. COPY_FILE_RESTARTABLE Progress of the copy is tracked in the target file in case the copy fails. The failed copy can be restarted at a later time by specifying the same values for lpExistingFileName and lpNewFileName as those used in the call that failed. 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. Remarks This function preserves extended attributes, OLE structured storage, NTFS alternate data streams, and file attributes. Security attributes for the existing file are not copied to the new file. To copy security attributes, use the SHFileOperation function. This function fails with ERROR_ACCESS_DENIED if the destination file already exists and has the FILE_ATTRIBUTE_HIDDEN or FILE_ATTRIBUTE_READONLY attribute set. When encrypted files are copied using CopyFileEx, the function attempts to encrypt the destination file with the keys used in the encryption of the source file. If this cannot be done, this function attempts to encrypt the destination file with default keys, as in Windows 2000. If both of these methods cannot be done, CopyFileEx fails with an ERROR_ENCRYPTION_FAILED error code. If you want CopyFileEx to complete the copy operation even if the destination file cannot be encrypted, include the COPY_FILE_ALLOW_DECRYPTED_DESTINATION as the value of the dwCopyFlags parameter in your call to CopyFileEx. Windows 2000: When encrypted files are copied using CopyFileEx, the function attempts to encrypt the destination file with the default keys. No attempt is made to encrypt the destination file with the keys used in the encryption of the source file. If it cannot be encrypted, CopyFileEx completes the copy operation without encrypting the destination file. Windows Me/98/95: Although CopyFileExW exists on Windows 98/Me, it is supported by the Microsoft Layer for Unicode to provide more consistent behavior across all Windows operating systems. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows Me/98/95 Systems. To compile an application that uses this function, define the _WIN32_WINNT macro as 0x0400 or later. For more information, see Using the SDK Headers. Requirements Client: Included in Windows XP, Windows 2000 Professional, and Windows NT Workstation 4.0, Windows Me, and Windows 98. Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT Server 4.0. Unicode: Implemented as Unicode and ANSI versions. Note that Unicode support on Windows Me/98/95 requires Microsoft Layer for Unicode. Header: Declared in Winbase.h; include Windows.h. Library: Use Kernel32.lib. See Also File Management Functions, CreateFile, CopyFile, CopyProgressRoutine, MoveFile >> Sds, Ricardo. Alisson Yahoo <[EMAIL PROTECTED]> escreveu: Tentei usar o CopyFileEx da seguinte maneira: if (Cardinal(CopyFileEx(PAnsiChar('Origem'), PAnsiChar(ExtractFileDir('Destino'), nil, nil, nil, 0)) = 0) then ShowMessage('Não foi possível copiar o arquivo); Não encontrei exemplo no help do Delphi 7, por isso coloquei 3 parâmetros como nil. O que tenho que colocar nesses parâmetros? [As partes desta mensagem que não continham texto foram removidas] _ --------------------------------- Novo Yahoo! Cadê? - Experimente uma nova busca. [As partes desta mensagem que não continham texto foram removidas]