Ole4D Methods

OCSaveToBlob(p_AreaVar;p_Blob;p_Compact)


Saves an Ole object in a blob process or interprocess variable. This method is the pair of OCCreateFromBlob.
This method is useful to implement persistence and serialization of the ole objects.

Parameters

Parameter Type   Description
p_AreaVar Longint -> Variable of the plug-in area.
p_Blob Blob -> Blob where the Ole object is saved
p_Compact Longint -> Indicates that the method should compress redundant data of the Ole object before save.
Values for this parameters are 0 for no compression, 1 for compression.



Return Values
0 – The method call was successful.
If the method call was not successful the return value is non zero. For more information call OCLastError.

Remarks
When the object data is compacted the container creates a temporary object. For large data there might not be enough memory to create the temporary object.

Example
C_BLOB(G)
CREATE RECORD([SavedBlobs])
[SavedBlobs]Application:=vAppName
[SavedBlobs]Code:=vCodice
$i:=OCSaveToBlob (Area1;G;0) ` Area1 is the plug-in area
[SavedBlobs]Value:=G
SAVE RECORD([SavedBlobs])


See Also
OCCreaFromFile, OCCreaFromProgId, OCCreaFromCLSID, OCCreaFromBlob, OCDestroyObject, OCActivate