SoBufferObjectMemset Method (IntPtr, UInt64, UInt64, UInt64) |
This function sets the contents of (or a portion of) this buffer object to the specified value.
Namespace: OIV.Inventor.Devices
is a pointer to the value to set in the buffer.
The size in bytes of the value. Default is 1 byte.
The offset in bytes (where to start setting values). Default is 0.
The number of values to set. Default is number of bytes in buffer.
The valueSize parameter provides a way to do a memset with float, short, byte, etc values. The number of bytes set in this buffer object is exactly valueSize*count. The first byte changed in this buffer is given by the offset argument.
EXAMPLE
IntPtr ptr = Marshal.AllocHGlobal(sizeof(int)); Marshal.WriteInt32( ptr, 0 ); buffer.Memset( ptr ); Marshal.FreeHGlobal( ptr );