User guide

E-73
PLI Access Routines
vcsSpInitialize
Syntax
vcsSpStateID vcsSpInitialize(void)
Synopsis
This routine allocates a source protect object.
Returns a handle to a malloc’d object which must be passed to all
the other source protection routines.
This object stores the state of the encryption in progress. When the
encryption is complete, this object should be passed to
vcsSpClose() to free the allocated memory.
If you need to write to multiple streams at the same time (perhaps
you’re creating include or SDF files in parallel with model files), you
can make multiple calls to this routine and assign a different file
pointer to each handle returned.
Each call mallocs less than 100 bytes of memory.
Returns
The vcsSpStateID pointer or NULL if memory could not be
malloc’d.
Example D-33 Example of vcsSpStateID
vcsSpStateID esp = vcsSpInitialize();
if (esp == NULL) {
fprintf(stderr, "out of memory\n");
...
}