G
Guest
I've been executing the CopyFileEx code below in a Windows Application for
several months...
Try
If CopyFileEx(fiSource.FullName, strTargetFile, Fpr, ACTION_COPY, 0,
0) > 0 Then
Else
Throw New System.ComponentModel.Win32Exception( _
System.Runtime.InteropServices.Marshal.GetLastWin32Error)
End If
Catch ex As Exception
msgbox ex.Message
End Try
But now its bombing when it encounters a file containing 0 bytes. The error
message I'm getting is:
Run-time exception thrown : System.OverflowException - Value was either
too large or too small for an Int32.
Any idea why the CopyFileEx return value is causing an overflow? How can I
deal with this problem?
Any help would be greatly appreicated!
several months...
Try
If CopyFileEx(fiSource.FullName, strTargetFile, Fpr, ACTION_COPY, 0,
0) > 0 Then
Else
Throw New System.ComponentModel.Win32Exception( _
System.Runtime.InteropServices.Marshal.GetLastWin32Error)
End If
Catch ex As Exception
msgbox ex.Message
End Try
But now its bombing when it encounters a file containing 0 bytes. The error
message I'm getting is:
Run-time exception thrown : System.OverflowException - Value was either
too large or too small for an Int32.
Any idea why the CopyFileEx return value is causing an overflow? How can I
deal with this problem?
Any help would be greatly appreicated!