Delphi DLL – GetBytesPtr (Writing PByte to TStream)
Chilkat v9.5.0.80 adds a new BinData function named GetBytesPtr. It returns a pointer to the internal bytes contained within the BinData. This post shows one way of writing those bytes to a Delphi TStream (using the Chilkat non-ActiveX Delphi DLL). procedure TForm1.Button2Click(Sender: TObject); var rawBytes: PByte; ItemCount: Integer; binDat: HCkBinData; Stream: TMemoryStream; Writer: TBinaryWriter; byteArr: TBytes; numBytes: Integer; i: Integer; […]