MCP2200 - SimpleIO-M.dll calling and using from DELPHI
I'm a DELPHI beginner. I used delphi for years, but I didn't write more complex programs, but I've to use this dll for an IO-board.
Here the dlls, and other documentations:
microchip.com - MCP2200 - this chip is on the the next board, that I have.
And here the board:
USB UART 2 Board - mikroe.com
It has an USB HID interface, which has a dll support, but can't use this DLL.
I've searched on the net, but I've found only, it can be usable, but I don'r know how. (I never used dll-s)
Can anyone help me a bit?
(I only need the first few functions -
void SimpleIOClass::InitMCP2200(unsigned int VendorID,
unsigned int ProductID)
bool SimpleIOClass::ConfigureMCP2200(unsigned char IOMap,unsigned long BaudRateParam,unsigned int RxLEDMode,
unsigned int TxLEDMode,bool FLOW,bool ULOAD,bool SSPND)
bool SimpleIOClass::SetPin(unsigned int pin)
bool SimpleIOClass::ClearPin(unsigned int pin)
It looks like the libraries you want to use are wrapped in C++ class. There are two ways to address this problem. First to "ignore" the class and project the methods as simple routines like you would with ordinary routine exported in a .dll. The second way is to treat the imported C++ class as virtual class in Delphi, i.e class that never gets instantiated.
Check this great article on details of these.