According to the instructions of the DLL, the relay control by using the function, excuse me, how should I call him in VFP, of the following is a DLL file description:
There are three files: usb_relay_device. DLL usb_relay_device. H usb_relay_device. Lib
Method of use of a development libraries in Vistual Studio
1. Create a new c + + project
2. The generated stdfax. H header file to import the DLL library file
# include "usb_relay_device. H"
# pragma comment (lib, "usb_relay_device. Lib")
3. Copy usb_relay_device. DLL to your application to generate directory
Second, development of library functions to use
1. Call usb_relay_init () function initializes the
2. Call usb_relay_device_enumerate (found) is inserted into the computers of all USB drive relay module free
3. Call usb_relay_device_open open () you need operation of equipment; Call usb_relay_device_open_with_serial_number () open the specified serial number of the equipment
4. Other operations:
Call usb_relay_device_open_one_relay_channel () can open a road relay
Can open all relay call usb_relay_device_open_all_relay_channel ()
Call usb_relay_device_close_one_relay_channel () can shut down a road relay
Call usb_relay_device_close_all_relay_channel () can close all relay
5. Call usb_relay_device_free_enumerate free memory
6. Call usb_relay_exit free memory
CodePudding user response:
CodePudding user response:
http://www.kbgogo.com/forum.php? Mod=viewthread& Tid=11165 this development help file download address,
CodePudding user response:
Call DLL is generally use DECLARE command register function to the calling functionCodePudding user response:
I also am DLL call problem, but I don't how to send the postCodePudding user response:
DLL can be sent to me? I have a tryIf you can private chat me
CodePudding user response:
In the absence of VFP example code, only one of trial and error, such as:DECLARE an INTEGER usb_relay_init IN usb_relay_device. DLL INTEGER
DECLARE an INTEGER usb_relay_device_enumerate IN usb_relay_device. DLL INTEGER
DECLARE an INTEGER usb_relay_device_open IN usb_relay_device. DLL INTEGER
And so on,
Number of parameters and type can also be based on the first floor of the DLL try checking tool shows more information,
Then try call each function, if the relay action, or at least, not an error, then the other code is no problem,
Have patience, good luck, maybe success!