[AccessD] apiCopyFile

Sad Der accessd666 at yahoo.com
Thu Jul 3 07:40:21 CDT 2003


Hi group,

can someone please confirm the following?
I found the code below in an application I have te
maintain (is this the correct word?).

The comments say that it doesn't return
anything...wich is bulls#@#.

As I see it apiCopyFile returns zero or one. 
Result   Meaning 
     0   Action Failed
     1   Action Success

Is this correct?

Regards,

Sander

  
Declare Function apiCopyFile Lib "kernel32" Alias
"CopyFileA" _
(ByVal lpExistingFileName As String, _
ByVal lpNewFileName As String, _
ByVal bFailIfExists As Long) As Long


Public Function CopyFile(SourceFile As String,
DestFile As String)
'---------------------------------------------------------------
' PURPOSE: Copy a file on disk from one location to
another.
' ACCEPTS: The name of the source file and destination
file.
' RETURNS: Nothing
'---------------------------------------------------------------


  Dim Result As Long
   If Dir(SourceFile) = "" Then
      MsgBox Chr(34) & SourceFile & Chr(34) & _
         " is not valid file name."
   Else
      Result = apiCopyFile(SourceFile, DestFile,
False)
   End If

End Function


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


More information about the AccessD mailing list