CVB.Net 14.0
Buffer Class Reference

A simple contiguous block of memory. More...

Inherits IBuffer.

Inherited by PfncBuffer.

Public Member Functions

void Dispose ()
 IDisposable implementation. More...
 

Static Public Member Functions

static Buffer FromHandle (IntPtr handle, ShareObject doShare)
 Create a buffer object from a handle . More...
 

Protected Member Functions

 Buffer (IntPtr handle)
 Create a buffer object from a handle . More...
 
virtual void Dispose (bool disposing)
 IDispose helper function. More...
 

Properties

IntPtr Handle [get]
 Native CVB buffer handle. More...
 
bool IsDisposed [get]
 Tests if the native handle has already been disposed.
 
IntPtr BasePtr [get]
 Get the base address of the buffer's memory.
 
long Size [get]
 Get the valid size in bytes of the buffer's memory.
 
long Capacity [get]
 Get the allocated size in bytes of the buffer's memory.
 
- Properties inherited from IBuffer
IntPtr BasePtr [get]
 Get the base address of the buffer's memory.
 
long Size [get]
 Get the valid size in bytes of the buffer's memory.
 
long Capacity [get]
 Get the allocated size in bytes of the buffer's memory.
 
- Properties inherited from INativeHandle
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 

Events

NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method. More...
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 

Detailed Description

A simple contiguous block of memory.

Constructor & Destructor Documentation

◆ Buffer()

Buffer ( IntPtr  handle)
protected

Create a buffer object from a handle .

Parameters
handleNative IBuffer handle.

Member Function Documentation

◆ Dispose() [1/2]

void Dispose ( )

IDisposable implementation.

Call this method to release the resources allocated by this buffer immediately. Remember that after calling Dispose, any subsequent access to references to this buffer will result in an ObjectDisposedException.

◆ Dispose() [2/2]

virtual void Dispose ( bool  disposing)
protectedvirtual

IDispose helper function.

Parameters
disposingtrue when called via IDisposable.Dispose, false when called by the finalizer.

◆ FromHandle()

static Buffer FromHandle ( IntPtr  handle,
ShareObject  doShare 
)
static

Create a buffer object from a handle .

Parameters
handleNative IBuffer handle.
doShareShareObject.Yes if handle should be shared.
Returns
Newly created wrapper object.

Property Documentation

◆ Handle

IntPtr Handle
get

Native CVB buffer handle.

It is normally not necessary to work with this handle in CVB.Net. Note that using this handle in connection with the legacy CVB managed wrappers may actually be disruptive to your application.

Implements INativeHandle.

Event Documentation

◆ ObjectDisposing

NativeHandleEventDelegate ObjectDisposing

Raised when this object is about to be disposed via the IDisposable.Dispose method.

This event is raised right before this object is disposed. The dispose itself cannot be canceled.