WriteBlock
Top  Previous  Next

Description

Writes a block of data into the internal camera memory starting from the specified bootstrap address.


Syntax


[VB]
objActiveUSB.WriteBlock Offset, Buffer, nBytes


[C/C++]
HRESULT WriteBlock( 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  
Variant containing pointer to a buffer that contains the data to be written into the camera memory starting from the specified offset  
nBytes  
The number of bytes to write to the specified offset  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  

Example


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

unsigned char
 buffer[128]
for (int i=0;i<128;i++)
 buffer[i]=i;
VARIANT v
;
v.pcVal=buffer;
ActiveUSB.WriteBlock(0xA0000,v,128);


Remarks


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

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