The best way to build a new driver is to
copy the source code from an existing driver. The Driver Tool Kit
contains example code for working drivers which you can use as a
basis for new drivers. Below is a listing of the DEF file for the
modbus driver.
LIBRARY MODBUS
EXETYPE WINDOWS
CODE PRELOAD
DATA PRELOAD SINGLE
HEAPSIZE 1024
EXPORTS
WEP @1 RESIDENTNAME
_Driver @2
For new drivers you should only change the library name. It is
very important not to change the existing entries in the EXPORTS
section. Citect uses the ordinal number to reference the driver
entry point. Changing the ordinal numbers will prevent Citect from
calling the driver DLL entry point and may cause a General
Protection Fault.
|