
Originally Posted by
arpspatel
for loading dll u can use this.. its used in .NET activeQt example
#using <dllname.dll>
http://doc.qt.nokia.com/4.6/activeqt-dotnet.html
here is sample code from the example
#include <QString>
#using <mscorlib.dll>
#include <vcclr.h>
using namespace System;
String
*QStringToString
(const QString &qstring
) {
return new String((const wchar_t *)qstring.utf16());
}
QString StringToQString
(String
*string
) {
const wchar_t __pin *chars = PtrToStringChars(string);
return QString::fromWCharArray(chars
);
}
#include <QString>
#using <mscorlib.dll>
#include <vcclr.h>
using namespace System;
String *QStringToString(const QString &qstring)
{
return new String((const wchar_t *)qstring.utf16());
}
QString StringToQString(String *string)
{
const wchar_t __pin *chars = PtrToStringChars(string);
return QString::fromWCharArray(chars);
}
To copy to clipboard, switch view to plain text mode
use can also use QLibrary for loading dlls, not sure if it will work for .NET or COM.. give it a try..
Hi I'm trying your suggestion but I still don't understand how to get the pointer of the dll routines and call them.
Why there is no a simple and clear example?
as this:
code for load com/.net dll
code for load com/.net dll
To copy to clipboard, switch view to plain text mode
get routine pointers
get routine pointers
To copy to clipboard, switch view to plain text mode
call routine myroutine(param1, param2) with param 1 and 2
call routine myroutine(param1, param2) with param 1 and 2
To copy to clipboard, switch view to plain text mode
Is too difficult to provide a simple example?
Bookmarks