22.03.2015 Views

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.16 <strong>DLI</strong> <strong>Implementation</strong> <strong>and</strong> <strong>Reference</strong> <strong>Guide</strong><br />

dlpdfmemfiletransientprefix function. This returns a character string with<br />

the necessary prefix, which marks the file such that it is not written to disk.<br />

Concepts <strong>and</strong> Facilities: <strong>Guide</strong> to the DL Pager Composition System<br />

Call dlpdfdocwritepdf when the document is complete, <strong>and</strong> obtain the<br />

ASPathName for the string passed to dlpdfdocwritepdf. Obtain the MDFile<br />

representing the Files In Memory entry for the document via the<br />

dlpdfmemfileacquire (ASPathName) function. This returns the MDFile for<br />

the document. Then, the size of the memory buffer needed to contain the file can be<br />

obtained with the dlpdfmemfilesize(MDFile) call, <strong>and</strong> the information itself is<br />

returned (as a const unsigned char buffer of the size returned by the call above)<br />

by the dlpdfmemfiledata (MDFile) function.<br />

Copy the contents of the returned pointer as soon as possible. This pointer should not<br />

be changed or modified, <strong>and</strong> should not be freed. Call dlpdfmemfilerelease<br />

MDFile) to release the file, its memory <strong>and</strong> other resources once this file is finished<br />

being used. The function will return the remaining number of acquisitions for the Files<br />

In Memory file.<br />

The functions to support this are:<br />

dlpdfmemfileacquire<br />

This function acquires the file given by the pathname passed in, <strong>and</strong> returns it as an<br />

MDFile. A memory file is eligible to be removed when no acquisitions are<br />

outst<strong>and</strong>ing upon it.<br />

dlpdfmemfilesize<br />

This function returns an ASSize_t value containing the smallest size of a block of<br />

memory (in bytes) which could contain the data of the given MDFile.<br />

dlpdfmemfiledata<br />

This function returns a pointer to a memory representation of this file. The contents<br />

should be copied as soon as possible, <strong>and</strong> must be neither altered nor freed.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!