SetReflashDisplayCallbacks Method - intrepidcs API
C/C++ declare -
VB.NET declare
- C# declare - Parameters - Return
Values - Remarks - C/C++ example
- VB.NET
example - C# example
This method is used to set 'call back' functions that will be called by the intrepidcs API when flashing a neoVI device with the ForceFirmwareUpdate function. This overrides the Windows dialog box that normally displays the progress of a neoVI flash update. The use of call back functions allows the client application to receive the status messages and display them as desired.
int
_stdcall icsneoSetReflashDisplayCallbacks(void (*OnPrompt)(unsigned long), void (*OnReflashUpdate)(const wchar_t *, unsigned long));
void
(*OnPrompt)(unsigned long)
[in]
Specifies a function pointer that will be called when a message must be
displayed instructing the user to disconnect and then re-connect the neoVI from
the USZB port. The function receives an unsigned long that will contain the
serial number of the neoVI device being flash updated. Before returning from
this function call the user of the client application must be prompted to unplug
the neoVI from the USB port and then re-connect it before continuing. This is to
put the USB chip in the neoVI into bootloader mode so that flashing can begin.
This function will not be called when flashing a ValueCAN3 device.
void
(*OnReflashUpdate)(const wchar_t *, unsigned long)
[in]
Specifies a function pointer that will be called when a flashing status message
is ready to be displayed. The function recieves a pointer to a wide character
string that contains the status message to display. It also receives an unsigned
long that contains the percentage complete for the current chip being
flashed. The percentage value will reset to 0 for each new chip. For
example, the neoVI Fire has four chips to flash while the ValueCAN3 has only
two.
1 if successful, 0 if either function pointer is NULL.
Remarks
After calling this function you must call the ForceFirmwareUpdate
function to cause the neoVI device firmware to be updated. Once the callbacks
have been set they are valid and active until the the DLL is unloaded or until
the ClearReflashDisplayCallbacks function is called.
Examples
C/C++ Example:
C# Example:
Visual Basic .NET Example:
IntrepidCS API Documentation - (C) Copyright 2000-2022 Intrepid Control Systems, Inc. (www.intrepidcs.com) |
Last Updated : Monday, April 22, 2019