ReadBlock
Top  Previous  Next

Description

Reads the block of data from the internal camera memory starting from the specified bootstrap address.


Syntax


[VB]
objActiveUSB.ReadBlock Offset, Buffer, nBytes


[C/C++]
HRESULT ReadBlock( long Offset, Variant Buffer, long nBytes );


Data Types
[VB]

Offset: Long
Buffer: Variant (pointer)
nBytes: Long


Parameters
[C/C++]

Offset [in]  
The 32-bit offset into the camera register address space.  
Buffer [in]  
Variant containing pointer to a buffer that will receive the data read from the specified offset of the camera memory.  
nBytes [in]  
The number of bytes to read from the specified offset  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  

Example


This C++ example reads a block of 128 bytes from a specified offset in the camera address space:

unsigned char
 buffer[128]
VARIANT v
;
v.pcVal=buffer;
ActiveUSB.ReadBlock(0xA0000,v,128);


Remarks


Using this method provides a much faster access to the internal camera memory than repetitive calls to ReadRegister.

If the specified offset does not exist or the camera cannot accomodate the size of the data block, this method will return an error.