xxxInitDoc()
This function initializes non-zero, non-null members of pContext
.
Syntax
int pascal _export xxxInitDoc( void *pCFContext, adDocDesc *pAutoInfo, long lcbFileSize, KPTPIOobj *pIO )
Arguments
pCFContext
|
A pointer to the global context structure for the custom reader. |
pAutoInfo
|
A pointer to an adDocDesc structure defined in kwautdef . |
lcbFileSize
|
The length of the source file in bytes. |
pIo
|
A pointer to a KPTPIOobj structure defined in kvioobj.h . |
Returns
- Upon success,
KVERR_Success
. - Upon error, a non-zero error code. This causes the structured access layer to shut down the process.
Discussion
- For custom readers, the
pAutoInfo
variable can be ignored. - If the structured access layer has determined the length of the source file, that value is provided by the
lcbFileSize
parameter. If it is zero, the file size must be determined in this function. - The pointer
pIO
provides access to file management functions defined inkvioobj.h
. - In this function, all non-zero, non-
NULL
members of the global context structure should be initialized.