WriteBlock
Top  Previous  Next

Description

Performs an asynchronous 1394 block transfer to a specified 1394 offset.


Syntax


[VB]
Value=objActiveDcam.WriteBlock( Offset, pBuffer, nBytes )


[C/C++]
HRESULT WriteBlock( long Offset, long pBuffer, long nBytes );


Data Types
[VB]

Offset: Long
pBuffer: Long
nBytes: Long
Return value: Long


Parameters
[C/C++]

Reg [in]  
The 32-bit offset into the 1394 base address FFFF 0000 0000 h at which a 1394 asynchronous write will be performed.  
pBuffer  
Pointer to a buffer that contains the to be written at the specified camera offset  
nBytes  
The number of bytes to be written at the specified offset  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  
 

Example


This C++ example writes a block of 16 bytes at a specified offset in the camera address space:

unsigned char
 buffer[16]={1,1,1,1,2,2,2,2,0x10,0x10,0x10,0x10,0xf0,0xf0,0xf0,0xf0};
ActiveDcam.WriteBlock(0xF4000000,(
long
)buffer,16);

Remarks


Offsets starting with F (least four significant bits are on) will be treated as 32-bit offsets to the 1394 base adress FFFF 0000 0000 h. Other addresses will be treated as offsets into the Camera Control and Status register, which usually starts with FFFF F0F0 0000 h.

For more information on the DCAM command registers refer to "IIDC 1394-based Digital Camera Specification, Version 1.31" published by the 1394 Trade Association.