Click or drag to resize

TwainMemory Methods

The TwainMemory type exposes the following members.

Methods
  NameDescription
Public methodCode exampleAllocate
Call this method to allocate memory for this object. If memory has already been allocated, it will be released before allocation new memory.
Public methodCopy(Byte, IntPtr)
Copies data from a pointer into a byte array.
Public methodCopy(IntPtr, Byte)
Copies a byte array into a pointer.
Public methodCopy(IntPtr, IntPtr, Int32)
Copies memory from one pointer to another.
Public methodCreate
Returns a new TwainMemory object with no memory allocated.
Public methodCreate(IntPtr)
Creates a new TwainMemory object for a pointer returned from TWAIN.
Public methodDispose
Releases the memory used by the object.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Called by .NET when the object is being destroyed.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLock
Locks the moveable memory for read / write operations.
Public methodReadBoolean
Reads a TW_BOOL from the current Position and advances the position.
Public methodReadBoolean(Int64)
Reads a TW_BOOL from the specified memory offset.
Public methodReadInt16
Reads a TW_INT16 from the current Position and advances the position.
Public methodReadInt16(Int64)
Reads a TW_INT16 from the specified memory offset.
Public methodReadInt32
Reads a TW_INT32 from the current Position and advances the position.
Public methodReadInt32(Int64)
Reads a TW_INT32 from the specified memory offset.
Public methodReadInt8
Reads a TW_INT8 from the current Position and advances the position.
Public methodReadInt8(Int64)
Reads a TW_INT8 from the specified offset.
Public methodReadIntPtr
Reads a TW_HANDLE from the current Position and advances the position.
Public methodReadIntPtr(Int64)
Reads a TW_HANDLE from the specified memory offset.
Public methodReadString(TwainItemType)
Reads a TW_STR32, TW_STR64, TW_STR128, TW_STR255, TW_STR1024 or TW_UNI512 from the current Position and advances the position.
Public methodReadString(TwainItemType, Int64)
Reads a TW_STR32, TW_STR64, TW_STR128, TW_STR255, TW_STR1024 or TW_UNI512 from the specified memory offset.
Public methodReadStructure(Type)
Reads a structure from the current Position and advances the position by the structure memory size.
Public methodReadStructure(Type, Int64)
Reads a structure from the specified memory offset.
Public methodReadTwainMemory
Reads a TW_HANDLE from the current Position and advances the position.
Public methodReadTwainMemory(Int64)
Reads a TW_HANDLE from the specified memory offset.
Public methodReadUInt16
Reads a TW_UINT16 from the current Position and advances the position.
Public methodReadUInt16(Int64)
Reads a TW_UINT16 from the specified memory offset.
Public methodReadUInt32
Reads a TW_UINT32 from the current Position and advances the position.
Public methodReadUInt32(Int64)
Reads a TW_UINT32 from the specified memory offset.
Public methodReadUInt8
Reads a TW_UINT8 from the current Position.
Public methodReadUInt8(Int64)
Reads a TW_UINT8 from the specified offset.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnlock
Unlocks the moveable memory when finished reading or writing.
Public methodWrite(Byte)
Writes a byte array into the memory at the current Position and advances the position.
Public methodWrite(Byte, Int64)
Writes a byte array into the memory at the specified memory offset.
Public methodWriteBoolean(Boolean)
Writes a TW_BOOL into the memory at the current Position and advances the position.
Public methodWriteBoolean(Boolean, Int64)
Writes a TW_BOOL to memory at the specified memory offset.
Public methodWriteInt16(Int16)
Writes a TW_INT16 into the memory at the current Position and advances the position.
Public methodWriteInt16(Int16, Int64)
Writes a TW_INT16 to memory at the specified memory offset.
Public methodWriteInt32(Int32)
Writes a TW_INT32 into the memory at the current Position and advances the position.
Public methodWriteInt32(Int32, Int64)
Writes a TW_INT32 to memory at the specified memory offset.
Public methodWriteInt8(SByte)
Writes a TW_INT8 to the memory at the current Position.
Public methodWriteInt8(SByte, Int64)
Writes a TW_INT8 to the specified offset.
Public methodWriteIntPtr(IntPtr)
Writes a TW_HANDLE into the memory at the current Position and advances the position.
Public methodWriteIntPtr(IntPtr, Int64)
Writes a TW_HANDLE to memory at the specified memory offset.
Public methodWriteString(String, TwainItemType)
Writes a TW_STR32, TW_STR64, TW_STR128, TW_STR255, TW_STR1024 or TW_UNI512 into memory at the current position and advances the position.
Public methodWriteString(String, TwainItemType, Int64)
Writes a TW_STR32, TW_STR64, TW_STR128, TW_STR255, TW_STR1024 or TW_UNI512 into memory at the specified offset.
Public methodWriteStructure(Object)
Writes a structure into the memory at the current Position and advances the position.
Public methodWriteStructure(Object, Int64)
Writes a structure to memory at the specified memory offset.
Public methodWriteUInt16(UInt16)
Writes a TW_UINT16 into the memory at the current Position and advances the position.
Public methodWriteUInt16(UInt16, Int64)
Writes a TW_UINT16 to memory at the specified memory offset.
Public methodWriteUInt32(UInt32)
Writes a TW_UINT32 into the memory at the current Position and advances the position.
Public methodWriteUInt32(UInt32, Int64)
Writes a TW_UINT32 to memory at the specified memory offset.
Public methodWriteUInt8(Byte)
Writes a TW_UINT8 to the current Position.
Public methodWriteUInt8(Byte, Int64)
Writes a TW_UINT8 to the specified offset.
Top
See Also