Is it possible to use this DLL with Blitzmax?
BlitzMax Forums/BlitzMax Programming/Is it possible to use this DLL with Blitzmax?
| ||
Hi, I'm sorry about, I know here're many questions about DLL and wrapper but I think this case is a little bit different ... I need to access to an dll written in C++ and I have a sample in C++ for how to use it. The sample includes a class like this: // Library Class class RSCT_TERMINALCONNECT_API Rsct_TerminalConnect { public: // Constructer / Deconstructor Rsct_TerminalConnect(void); virtual ~Rsct_TerminalConnect(void); // Connectionhandling int Connect(int _port); int UpdateConnect(int _port, const char* _model); int Disconnect(int _port); protected: BOOL CheckDownloadmode(Reader* _pReader); private: void Init(); void Terminate(); Rsct_TerminalManager* m_pTerminalManager; }; extern RSCT_TERMINALCONNECT_API int nRsct_TerminalConnect; This is a sample how thios class will be used: Rsct_TerminalConnect* pTC = new Rsct_TerminalConnect(); ret = pTC->Connect(GetPort()); When I try to use these functions via LoadLibrary it does not work. Other functions of the DLL (not included in the class like shown above) works fine: (int)TermConnUtils::DDF2intIP("192.168.1.50"); I know that one way to use is would be to write a C++ wrapper DLL but I'm an absolut novice with C++. So maybe somebody can help me if it is possible or not ... Thanks, Andre |
| ||
Not having much luck with this (according to google) are you? :-) I'm guessing it is a custom DLL, as all searches against it return to posts you've made. Perhaps there's something wrong with the DLL? |
| ||
You're absolutly right! Well, at the moment I modify the C++ sample a little bit and call it from my code, parsing the args from command line ... It works but really very slow (every open the connect, execute the commands and close the DLL) ... In this case the library works fine but I found no way with BM or any managed code ... When you already google around - some people point me to write a wrapper DLL but in C++ I'm not able to ... There's a german thread for where a guy says that the problem is the class where it'll be used and that a wrapper also has to create a new instance. But like I wrote, I'm a novice with C++ ... |