EndWrite Method

NI-VisaNS .NET Class Library Help for Visual Studio 2010

Edition Date: August 2012

Part Number: 370627F-01

»View Product Info
Download Help (Windows Only)

VxiSession Class See Also


Handles the end of an asynchronous write.

Namespace: NationalInstruments.VisaNS

Assembly: NationalInstruments.VisaNS (in NationalInstruments.VisaNS.dll) Version: 13.0.40.167

Syntax

Visual Basic (Declaration)
Public Sub EndWrite ( _
	asyncResult As IAsyncResult _
)

C#
public void EndWrite(
	IAsyncResult asyncResult
)

Parameters

asyncResult
Type: System.IAsyncResult
An asynchronous result that represents the asynchronous write operation that you want to end.

Implements

IMessageBasedSession.EndWrite(IAsyncResult)

Exceptions

ExceptionCondition
VisaException The NI-VISA driver returned an error as a result of calling this method.
ArgumentException

asyncResult has already ended.

-or-

asyncResult is not a write.

-or-

asyncResult did not originate from VisaNS.

ArgumentNullException asyncResult is null (Nothing in Visual Basic).
DllNotFoundException The NI-VISA driver library cannot be found.
EntryPointNotFoundException A required operation in the NI-VISA driver library cannot be found.
ObjectDisposedException This member is called after the Dispose method is called directly from code or indirectly through a finalizer.

Remarks

Call this method to wait for an asynchronous write started with BeginWrite. This method blocks execution of the current thread until the write completes or a timeout occurs. If you passed a callback to BeginWrite, call this method inside of the callback.
Note: In order to free resources associated with the write, you must always call EndWrite after you call BeginWrite, whether in the callback given to BeginWrite or in the same thread of execution where BeginWrite was called.

See Also

Reference

VxiSession Class

NationalInstruments.VisaNS Namespace

WAS THIS ARTICLE HELPFUL?

Not Helpful