Returns the result of a file transfer. The number returned corresponds to a Microsoft® COM HRESULT error code.
Syntax
NSFile.Result
Return Values
The Result property returns these values:
Decimal Value | Description (HRESULT) |
0 | Transfer was a success. (S_OK) |
-2147467260 | Transfer was cancelled. The cancel could have come from the sender or the receiver. (E_ABORT) |
-2147467259 | Transfer failed. (E_FAIL) |
-2147287038 | File not found or no file is found that matches a wild card or filter. For example, if the receiver expects a file named "fremont.avi" and the sender sends "ballard.avi", this error is returned. (STG_E_FILENOTFOUND) |
-2147024882 | Out of memory. (E_OUTOFMEMORY) |
-2147024809 | Invalid argument provided to a method or property. (E_INVALIDARG) |
-2147023436 | The transfer failed because the receiver timed out. (ERROR_TIMEOUT converted to an HRESULT) |
Remarks
The Result property returns the results of a transfer. Method calls return the result of the method call, which may not be the same error message as Result. For example, a method call to start the receive operation may return S_OK, but the transfer may return E_OUTOFMEMORY when the transfer is completed. It is recommended that the return value of a method call be checked for errors when the call is made, and that the Result parameter be checked when the transfer is completed.
If invalid parameters are entered for a method and the transfer has not yet started, the Result property will not be set. If invalid arguments are entered and a transfer has already started, the Result property will be set.
The Result property applies only to the last transfer. When a new transfer begins, the Result property is reset.
If an error occurs during a transfer, the caller should query NumFilesTransferred and NumDirectoriesTransferred to find out how many files and directory structures were transferred before the transfer failed.
Unknown error message values from Microsoft Windows® are passed through the control and converted to HRESULT values. To convert a Microsoft Win32® system error, you must have the Win32 SDK and the latest copy of the Winerror.h file. To convert from an HRESULT to a Winerror.h value, subtract the hexadecimal value of 0x80070000 from the returned error and convert to decimal.
© 1996-1998 Microsoft Corporation. All rights reserved.