LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

setting memory block with offset

HI,

i am trying to use memcpy function with offset in my application. i want to copy bytes from one buffer to the other starting from 3rd location. i want to leave first 2 bytes as header info. Can somebody help me on this please?

Thanks

0 Kudos
Message 1 of 2
(3,114 Views)

Just add the offset to the buffers adress ( which is identical to the buffer itself in C ) Something like

memcpy ( target+2, source+2, sizeof( source )-2).

And make sure that the target buffer is big enough.

 

Message 2 of 2
(3,108 Views)