/* Unloads the Kvaser CANLIB DLL and resets the API function pointers.  */
static void LeafLightLibUnloadDll(void)
/* Unloads the Kvaser CANLIB DLL and resets the API function pointers.  */
static void LeafLightLibUnloadDll(void)
{
  leafLightLibFuncInitializeLibraryPtr = NULL;
  leafLightLibFuncUnloadLibraryPtr = NULL;
  leafLightLibFuncOpenChannelPtr = NULL;
  leafLightLibFuncSetBusParamsPtr = NULL;
  leafLightLibFuncSetBusOutputControlPtr = NULL;
  leafLightLibFuncSetAcceptanceFilterPtr = NULL;
  leafLightLibFuncIoCtlPtr = NULL;
  leafLightLibFuncBusOnPtr = NULL;
  leafLightLibFuncWritePtr = NULL;
  leafLightLibFuncReadPtr = NULL;
  leafLightLibFuncReadStatusPtr = NULL;
  leafLightLibFuncBusOffPtr = NULL;
  leafLightLibFuncClosePtr = NULL;
  leafLightCanHandle = -1;
  leafLightRxCanHandle = -1;
  if (leafLightDllHandle != NULL) 
  {
    (void)FreeLibrary(leafLightDllHandle);
    leafLightDllHandle = NULL;
  }
}