The AgentryInitialize method is called to initialize a pointer to an AgentryClientContext object. This pointer is a required parameter to all other methods within the Agentry Client API for external processes. The single parameter to this method is a pointer to an object pointer of type AgentryClientContext. The pointer should be declared prior to calling the method and initialized to NULL. The address of the AgentryClientContext object is provided with the call to the AgentryInitialize method.
This method must be called when the external process is executed. The handle it returns (AgentryClientContext object pointer) should be preserved and passed to any subsequent Agentry Client API for external processes method calls. This handle should be passed to the AgentryUnInitialize method as a part of the external processes’s shutdown procedures. See information provided on this method for details.
bool AgentryInitialize(AgentryClientContext** ppCtx)
- ppCtx -
The AgentryClientContext object initialized by
this method and passed to all other method calls within this API.
A NULL pointer should initially be created to such an object, and
the pointer should then be passed to this method, as in:
AgentryClientContext *ctx = NULL; AgentryInitialize(&ctx);
The Boolean return value indicates whether or not the AgentryClientContext object was successfully initialized. The method returns false in the event of failure, which can occur if the Agentry Client is not currently running, as well as under other conditions. The return from this method should always be checked prior to using the AgentryClientContext object pointer it initializes. The external process should include processing to account for a false return indicating a failed initialization of this handle.