DkmFileTransferStream Class

Definition

Represents a file stream which can be used to transfer a large file over the remote debugger connection.

public ref class DkmFileTransferStream : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("cfeabf40-7ab2-7d44-c16d-ef23d4579e8c")]
public class DkmFileTransferStream : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("cfeabf40-7ab2-7d44-c16d-ef23d4579e8c")>]
type DkmFileTransferStream = class
    inherit DkmDataContainer
    interface IDisposable
Public Class DkmFileTransferStream
Inherits DkmDataContainer
Implements IDisposable
Inheritance
DkmFileTransferStream
Attributes
Implements

Properties

Connection

Transport connection over which the file will be transferred.

IsUnloaded

Returns true if a 'unloaded' event has been raised for this object (example: DkmThread::Unload is called) or if the object has been closed. Note that care must be used when checking this status as, without synchronization, the returned status may no longer be accurate the instruction after it is read.

(Inherited from DkmDataContainer)
RemoteFilePath

Path to the file being transferred. Environment variables will be expanded (ex: %TMP%\deploy.txt). The path must be a full path to the file.

UniqueId

Guid which uniquely identifies this object.

Methods

Close()

Closes the file transfer object. This will close the underlying file handle if it is not already closed because all the bytes have been transferred. This method must be called by the component which created the file file transfer object.

DkmFileTransferStream objects are automatically closed when their associated DkmTransportConnection object is closed.

This method may only be called by the component which created the object.

Create(DkmTransportConnection, String, DkmDataItem)

Creates a new file transfer stream object which is used to represent a file which is being streamed over the network. Note that the file is not immediately opened when the object is created. The caller should close the file transfer object when done. The caller is responsible for closing the created object after they are done.

GetDataItem<T>()

Gets the instance of 'T' which has been added to this container instance. If this container does not contain a 'T', this function will return null.

(Inherited from DkmDataContainer)
ReadFirst(Byte[], Int32, UInt64, UInt64)

Begins a remote file read operation. The remote file will be opened and bytes up to the size of the content buffer will be transferred. If the file is too large to fit into the content buffer, than ReadNext can be called to read the remaining bytes.

ReadFirst(UInt64, Byte[], Int32, UInt64, UInt64)

Begins a remote file read operation. The remote file will be opened and bytes up to the size of the content buffer will be transferred. If the file is too large to fit into the content buffer, than ReadNext can be called to read the remaining bytes.

This API was introduced in Visual Studio 15 Update 6 (DkmApiVersion.VS15Update6).

ReadFirst(UInt64, Void*, Int32, Int32, UInt64, UInt64)

Begins a remote file read operation. The remote file will be opened and bytes up to the size of the content buffer will be transferred. If the file is too large to fit into the content buffer, than ReadNext can be called to read the remaining bytes.

This API was introduced in Visual Studio 15 Update 6 (DkmApiVersion.VS15Update6).

ReadFirst(Void*, Int32, Int32, UInt64, UInt64)

Begins a remote file read operation. The remote file will be opened and bytes up to the size of the content buffer will be transferred. If the file is too large to fit into the content buffer, than ReadNext can be called to read the remaining bytes.

ReadNext(Byte[], Int32)

Reads the next set of bytes from the remote file. This API will fail if ReadFirst has not already been called on the DkmFileTransferStream.

ReadNext(Void*, Int32, Int32)

Reads the next set of bytes from the remote file. This API will fail if ReadFirst has not already been called on the DkmFileTransferStream.

RemoveDataItem<T>()

Remove the instance of 'T' from this container. It is usually unnecessary to call this method as a data container will automatically be emptied when the object is closed.

(Inherited from DkmDataContainer)
SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)
WriteFirst(Byte[], UInt64, UInt64, Boolean)

Begins a remote file write operation. The remote file will be opened and the bytes from Content will be written to it. If additional bytes beyond what is in Content should be transferred, then WriteNext should be called to transfer those. If the directory of this file does not exist, the debugger will attempt to create it.

WriteNext(Byte[])

Writes the next set of bytes to the remote file. This API will fail if WriteFirst has not already been called on the DkmFileTransferStream.

Explicit Interface Implementations

IDisposable.Dispose()

Applies to