QString and BSTR
Page |
1 |
hi to everyone
i have a c# dll that i use it via dumpcpp and active qt
it works correctly except when i call a function that uses BSTR that dumpcpp converted to QString
how can i solve this problem?
how can i convert qString to bstr?
25 replies
i want to set a Qstring variable to my Bstr
previous example not work ? … or some minimal compilable example would be …
- BSTR bstr = SysAllocString(string.utf16());
- // to do what you need with "bstr"
- SysFreeString(bstr);
i want to set a Bstr variable to my QString
QString string = QString::fromUtf16(yourBSTR);
thanks alot for your answer
but i use this code and it get me error
- bool qax_result;
- BSTR test = SysAllocString(st.utf16());
- void *_a[] = {(void*)&qax_result, (void*)&Row, (void*)&Col, (void*)&test};
- SysFreeString(test);
- return qax_result;
it is compiled successfully but when i run it, it get me error
You must log in to post a reply. Not a member yet? Register here!



