Does someone has any experience or has any sample code on how using Qlibrary on a function that has arguments ?
The DLL source code is showing: (Note: I have the DLL only in a compiled form - so I cannot change it prototypes)
short int __stdcall About(unsigned char Device, unsigned char *Version,unsigned char *Manufact) {
...
}
So I've tried to do something like :
typedef short int (*About)(unsigned char, unsigned char *, unsigned char *);
unsigned char m_version[10];
unsigned char m_manufacturer[10];
Qlibrary m_dll("MyLibrary");
About about = (About) m_dll.resolve("About");
if (about) {
about(0, m_version, m_manufacturer);
}
typedef short int (*About)(unsigned char, unsigned char *, unsigned char *);
unsigned char m_version[10];
unsigned char m_manufacturer[10];
Qlibrary m_dll("MyLibrary");
About about = (About) m_dll.resolve("About");
if (about) {
about(0, m_version, m_manufacturer);
}
To copy to clipboard, switch view to plain text mode
But the content in m_version and in m_manufacturer is not as expected.
Bookmarks