/* With this method one can define a function that will receive all incoming messages.  */
static int32_t CanUsbLibFuncSetReceiveCallBack(CANHANDLE h, LPFNDLL_RECEIVE_CALLBACK fn)
/* With this method one can define a function that will receive all incoming messages.  */
static int32_t CanUsbLibFuncSetReceiveCallBack(CANHANDLE h, LPFNDLL_RECEIVE_CALLBACK fn)
{
  int32_t result = ERROR_CANUSB_GENERAL;
  assert(canUsbLibFuncSetReceiveCallBackPtr != NULL);
  assert(canUsbDllHandle != NULL);
  if ((canUsbLibFuncSetReceiveCallBackPtr != NULL) && (canUsbDllHandle != NULL))
  {
    result = canUsbLibFuncSetReceiveCallBackPtr(h, fn);
  }
  return result;
}