NDC comm CompuFax User Manual

Page 107

Advertising
background image

8 3

This parameter gives the address of the context data area in the user program that is to receive the saved user
context. The contents of this area are completely user defined.
name: max_size
type: word unsigned
access: read only
mechanism: by reference

This gives the maximum size of the user context. If this parameter is not passed or is passed as zero, the
number of bytes copied to the user context will be the same number of bytes that were last saved.
name: size
type: word unsigned
access: write only
mechanism: by reference

If this parameter is passed and is nonzero, the actual number of bytes copied to the user context is returned.
This will never be greater than max_size.

Return Value:
FDB$_N ORMAL N ormal successful completion
FDB$_N OCON TEXT If no context has been saved for the specified stream
FDB$_TRUN CATED If the number of bytes last saved was greater than max_size

10.1.3.5 FDB_INIT

This routine initializes the database support code. It should be called exactly once during startup.

Calling Sequence:
FDB_IN IT [context_size], [save_context]

Arguments
name: context_size
type: word unsigned
access: read only
mechanism: by reference

This parameter gives the size in bytes of the user context. The effect of this parameter is to determine the size
of the static area used to save stream contexts across runs. It can be approximate and is not used if
save_context is not set.

Note: If save_context is TRUE, no addresses should be placed in the user context. There is no assurance that
the memory will be mapped at the same address from one run to the next. If context_size is not passed, it
defaults to 64.

name: save_context
type: boolean
access: read_only
mechanism: by reference

This parameter indicates whether the context of open database streams should be saved from one invocation
of the database to the next. If it is FALSE or not specified, then no context will be saved from one run of the
database to the next. If it is TRUE, then the context of currently active streams will be saved across runs.

Advertising