GdkHandleFree


Call the GdkHandleFree function to release all resources associated with the GDK library handle and its associated security module.


Syntax

VdkError GdkHandleFree(
   GdkHandle*   pgdkHandle)


Arguments

 


pgdkHandle

GdkHandle*   A pointer to a GDK library handle.


Returns

This function returns one of the following error codes:

VdkSuccess for success

 

VdkError_* for a standard Verity Developer Kit API error as described in the Verity Developer’s Kit Programming Reference

 

VdkFail for a non-specific error

 


Discussion

Typically, you call the GdkHandleFree function from your gateway driver’s VdkDrvFreeCBFnc call back function.


Example

/*Global Objects*/
static VdkInt4 nDrvCnt = 0;
static GdkHandle pGdkHandle = NULL;

static VdkError
VDK_CALLBACK VdkDrvFree(VdkCBArg drvHandle)
{
VdkError error = VdkSuccess;

if (!--nDrvCnt) {

/*****************************************
* destroy global gdk library handle here
*****************************************/

error = GdkHandleFree(&pGdkHandle);
}

/****************************************
* free the appData created in VdkDrvNew
****************************************/

if (drvHandle)
free(drvHandle);

return error;
}