PMDF Programmer's Reference Manual


Previous Contents Index


PMDFinitialize

Initialize PMDF data structures and resources.

PASCAL

status = PMDF_initialize (ischannel)

argument information

Argument Data type Access Mechanism
ischannel boolean read reference

C

status = PMDFinitialize (ischannel)

argument information


int PMDFinitialize(int ischannel) 


Arguments

ischannel

If true, then user-to-channel access checks will be disabled. If false, then user-to-channel access checks will be enabled.

Description

With the exception of PMDFsetMutex , PMDFinitialize must be called prior to calling any other API routines. This allocates and initializes internal data structures used by the API and PMDF. PMDFinitialize should only be called once. After all processing is completed, PMDFdone should be called to release any allocated memory, and ensure that any open files are properly closed. The ischannel flag is used to enable or disable rightslist based user-to-channel access checks. Programs which enqueue messages in behalf of users (e.g., user agents), should invoke PMDFinitialize with ischannel false; channel programs which enqueue mail should invoke PMDFinitialize with ischannel true. When ischannel is false, PMDFenqueueMessage will also close the queue cache database after enqueuing a message. On OpenVMS systems, channel programs which run indefinitely (e.g., detached processes) should supply a call back procedure to PMDFsetCallBack so that when a PMDF CACHE/CLOSE command is issued the program can call PMDFcloseQueueCache when convenient. See Section 1.7 for a further discussion of this issue. Multithreaded routines must call PMDFsetMutex prior to calling PMDFinitialize .

Return Values

PMDF__OK Normal, successful completion.
PMDF__FOPN Initialization failed. One or more PMDF configuration files could not be accessed. PMDF configuration files are incorrectly protected. Note that the use of PMDFinitialize does not require any privileges; unprivileged users should be able to invoke this particular routine.
PMDF__NO Initialization failed owing to a version mismatch between the current version of PMDF and the sites compiled configuration. Either the PMDF configuration needs to be recompiled or the character set tables need to be recompiled.


Previous Next Contents Index