SDTUtils.CreateMap Method

Solclient

SDTUtilsCreateMap Method
version: 7.2.1.27
Overload List
  Name Description
Public method Static member CreateMap(Int32)
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.

Public method Static member CreateMap(IMessage, Int32)
This method creates a map container (IMapContainer) in the binary attachment part of the given message, and any existing data is overwritten. The returned IMapContainer instance can be later used to add SDT fields. It is recommended to Close the IMapContainer when done. If it is not explicitly closed, the IMapContainer is automatically closed when the associated message is disposed IDisposable.

Whether it is explicitly closed by the client application, or implicitly by the API, any attempt to use this map will result in an OperationErrorException with ParamNullReference error subcode.

Top
See Also