nNewSize | (Long) New data block size |
---|---|
bRealloc | [optional] (Boolean) Defines the behavior when the size of existing data block is changed. false (default) - The content of existing data block will not be preserved. New data block will be created and zeroed. true - The content of existing data block will be preserved. The existing data blog will be enlarged or reduced in size. Only the modified portion will be zeroed. |
var oBuf = Pm.CreatePmBuffer();
var s1 = "40302010605070";
oBuf.SetHexaString(-2, s1);
var nSize = oBuf.GetSize(); //nSize = 7
oBuf.SetSize(nSize -2, true);
var val = oBuf.GetHexaString(); //val = 4030201060