public FT_STATUS Reload(UInt16 VendorID, UInt16 ProductID)
{
// Initialise ftStatus to something other than FT_OK
FT_STATUS ftStatus = FT_STATUS.FT_OTHER_ERROR;
// If the DLL hasn't been loaded, just return here
if (hFTD2XXDLL == IntPtr.Zero)
return ftStatus;
// Check for our required function pointers being set up
if (pFT_Reload != IntPtr.Zero)
{
tFT_Reload FT_Reload = (tFT_Reload)Marshal.GetDelegateForFunctionPointer(pFT_Reload, typeof(tFT_Reload));
// Call FT_Reload
ftStatus = FT_Reload(VendorID, ProductID);
}
else
{
if (pFT_Reload == IntPtr.Zero)
{
LogB.Debug("FTD2XX: Failed to load function FT_Reload.");
}
}
return ftStatus;
}