Pcdgetstream, E (a, Objec – Kofax DM API User Manual
Page 78
58
C
HAPTER
3
PCDGetStream
PCDGetStream
Use this object to provide the user with a way to read the contents of a
physical file.
Syntax
PCDGetStream.
methodOrProperty
Usage
When calling this object, after each
, you should check the
property. If ErrNumber returns zero (indicating that no
error occurred), you should check the
property to see how
many bytes were actually returned by the
Note: If you are using a language such as Visual Basic or Visual C++, you can
use the optional second parameter for Read to get the number of bytes read,
instead of checking the BytesRead property.
Example
The following example shows how PCDGetStream can be used to
determine the length of a document in your DM Repository.
.
.
.
'Assumptions for this example:
' - bstrDocNum already contains doc number.
' - bstrDST already contains security token.
' - bstrLib already contains library name.
' - bstrVerNum already contains the document
' version number.
'Object to get Doc information
Dim objDOC As New PCDDocObject
'Create our Stream object
Dim objGetStream As New PCDGetStream
'Vars to hold byte counts.
Dim blnLoopCtrl As Boolean
Set blnLoopCtrl = False
Dim lngCurCount As Long, lngTotCount As Long