SDTUtils.CreateMap Method (Int32)

Solclient

SDTUtilsCreateMap Method (Int32)
version: 7.2.1.27
Allocates a memory buffer of size maxSize on the heap and creates a message-independent (free standing) IMapContainer within.

If the subsequent calls to add structured data types exceeds the buffer size an error (InsufficientSpace) is returned to the application.

Note: When using message-indpendent maps, it's an error to have more than one open subcontainer at once. In other words, client applications must close the open subcontainer before creating a new one. If such attempt is made, client applications will get an error with SDKErrorSubcode equal to OutOfMemory. Note that this limitation is not present with maps created with CreateMap(IMessage, Int32).

Note: Applications should call Dispose as soon as they're done with the map. Message-independent containers, when created, allocate memory resources.

Namespace: SolaceSystems.Solclient.Messaging.SDT
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 7.2.1.27 (7.2.1.27)
Syntax
public static IMapContainer CreateMap(
	int bufferSize
)
Public Shared Function CreateMap ( 
	bufferSize As Integer
) As IMapContainer
public:
static IMapContainer^ CreateMap(
	int bufferSize
)

Parameters

bufferSize
Type: SystemInt32
max size (in bytes) of the backing memory buffer to allocate on the heap

Return Value

Type: IMapContainer
Returns a memory buffer of size maxSize on the heap
Exceptions
ExceptionCondition
OperationErrorException Thrown when an error occurs. In this case ReturnCode and SDKErrorInfo are accessible from OperationErrorException and contains more information.
FatalErrorException Thrown when an unrecoverable error occurs.
OutOfMemoryException
ArgumentOutOfRangeException Thrwon when bufferSize is invalid
See Also