Buffer COM class

A CclOBuffer object contains a data area in memory which can be used to hold information. A particular use for a CclOBuffer object is to hold a COMMAREA used to pass data to and from a CICS® server.

The CclOBuffer object is primarily intended for use with byte (binary) data. Typically a COMMAREA contains an application-specific data structure, often originating from a CICS server C program. The preferred method for handling binary data in Visual Basic is now the Byte data type. The SetData and Data methods allow the contents of the CclOBuffer object to be accessed as a Byte array. The CclOBuffer object can be used for string data, and stores strings as single-byte ANSI characters, but it does not provide any support for code-page conversions or DBCS. Note that in 32-bit environments Visual Basic uses 2-byte Unicode character representation; the COM class converts this to and from single-byte ANSI.

When a CclOBuffer object is created it allocates an area of memory as its buffer. The length of this buffer can be set explicitly via the SetLength method.