User guide

E-72
PLI Access Routines
vcsSpGetFilePtr
Syntax
FILE *vcsSpGetFilePtr(vcsSpStateID esp)
Synopsis
This routine just returns the value previously passed to the
vcsSpSetFilePtr() routine.
Returns
File pointer or NULL if not set.
Example D-32 Example of vcsSpGetFilePtr
vcsSpStateID esp = vcsSpInitialize();
FILE *fp = fopen("protected.file", "w");
if (fp != NULL)
vcsSpSetFilePtr(esp, fp);
else
/* doh! */
...
if ((gfp = vcsSpGetFilePtr(esp)) != NULL) {
/* Add comment before starting encryption */
fprintf(gfp, "\n// TechStuff Version 2.2\n");
vcsSpEncodeOn(esp);
}
Caution
Don't use non-vcsSp* routines (like fprintf) in conjunction with
vcsSp* routines, while encoding is enabled.