The File object manages information about a file being transferred.
The File object is instantiated with the INmChannelFt::SendFile method.
INmFt Interface |
This interface defines the file that will be transferred, including its transfer state, size, and owner.
Cancel |
GetBytesTransferred |
GetMember |
GetName |
GetSize |
GetState |
IsIncoming |
HRESULT Cancel(void);
Cancels the file transfer operation.
HRESULT GetBytesTransferred(
[out] ULONG *puBytes);
Retrieves the current number of bytes transferred.
HRESULT GetMember(
[out] INmMember **ppMember);
Retrieves a pointer to information about the remote member of the file transfer based on one of the following conditions:
The Member object must be released once the application is through with it.
HRESULT GetName(
[out] BSTR *pbstrName);
Retrieves the string for the full path of the file.
S_OK | Success. |
E_POINTER | pbstrName is an invalid pointer. |
E_FAIL | Internal resources are not available. |
E_OUTOFMEMORY | Memory could not be allocated to service the request. |
HRESULT GetSize(
[out] ULONG *puBytes);
Retrieves the size of the file, in bytes.
HRESULT GetState(
[out] NM_FT_STATE *uState);
Retrieves the state of the file being transferred.
NM_FT_COMPLETE | The file transfer is complete. |
NM_FT_INVALID | The file transfer is not valid. |
NM_FT_RECEIVING | The file transfer is currently being received. |
NM_FT_SENDING | The file transfer is currently being sent. |
Note that the NM_FT_COMPLETE value simply represents completion of the operation. The operation might have finished due to success, cancellation, or failure.
HRESULT IsIncoming(
void);
Determines whether the current File object is being transferred to the local computer.
S_OK | The file is being transferred to the local computer. The INmFt::GetMember method may be used to determine who sent the file. |
S_FALSE | The file is being transferred from the local computer. The INmFt::GetMember method may be used to determine the destination. Note that INmFt::GetMember may return a NULL value if the file was broadcast to everyone. |
Last Updated: November 1, 1997
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.