The pdPropSetAsExtBuffer changes the value of an existing PowerDoc property within the PowerDoc object referenced by obj. This function is very similar to and compatible with pdPropSet, which means that the properties changed by this function can be used in much the same capacity as if they were changed by pdPropSet. However, unlike pdPropSet which copies the property value to a buffer that is managed by D-Type Power Engine, this function does not, meaning that the value remains in an external buffer that is under exclusive control of the application. Since the property value resides in this external buffer (i.e. outside the associated Power Engine document), the changed property occupies a very small amount of storage space in the object obj (only the amount it takes to store the pointer and length of the external buffer).
pdPropSetAsExtBuffer is a specialized and advanced function that should be used only by applications that wish to store very large property values (e.g. large arrays or bitmap images) outside the associated Power Engine document and perform their own run-time memory management of large blocks of data. In all other cases pdPropSet should be used instead.
Parameter | Description |
---|---|
power_doc |
Handle of the associated Power Engine document. |
obj |
Object's index in the Power Engine document. |
name |
A numerical value that identifies the property to be changed. Can be a user-defined value or one of the predefined PowerDoc values. For a list of predefined name values, see the pdPropAdd function. |
extbuffer |
See pdPropAddAsExtBuffer. |
extlen |
See pdPropAddAsExtBuffer. |
See pdPropSet.
PowerDoc documents that contain properties created by this function should not be saved to disk by calling pdDocSaveToStream and later opened by calling pdDocAppendFromStream unless you are certain that the location of the buffer extbuffer will never change. If extbuffer changes after the document is saved and before it is opened again, you could experience crashes, memory access violations and similar problems.
See pdPropSet.