0

There exist an .NET Windows Application (COM Object) which is connected with hardware to get the sensor data(1000 samples per sec). Since its an old application we wanted to show the graph even more beautiful using Qt. I have achived it succussfully using the following steps:

In my 32bit Qt Application i used Dumpcpp to generate the C++ namespace lib by using Library ID. Dumpcpp has generated me a lib class which is using QAxWidget. I used this QAxWidget to get the data from the .NET Application. I get the data and i plotted the data in my 32bit Qt application So far all good.

I have updated my Qt Application from 32bit to 64bit. Since the .NET Application is 32bit but my Qt Application is 64bit QAxWidget fails to register because it is incompatable. Since the .NET application is old they dont have to put efforts for 64bit release.

To make the workaround i tried the following Article and now the QAxWidget registers successfuly but we have 2 problems

1) Lots of Sensor data is missing 2) Some of the sensor data is rubbish.

Is there a work around to use the 32bit COM object in my 64bit Qt Application ?

vishnu
  • 363
  • 3
  • 20
  • 1
    Why do you need your App be 64bit? Are you using something 64bit specific? 32bit Apps are common on 64bit platforms. But if you need it really bad, you could create 32bit "bridge" application which works with 32bit COM and exposes needed data over IPC to your 64bit App – Xplatforms Jun 17 '20 at 07:56
  • The fact you 1) can use the 32bit component from 64bit fine, but 2) its behavior is wrong, is quite unusual. It may be an issue with the component itself. COM and dllsurrogates are just passing data. There's no work around. More details would be needed. – Simon Mourier Jun 17 '20 at 08:45
  • @SimonMourier may i know what kind of more details are needed ? – vishnu Jun 17 '20 at 11:45
  • Details about your 32-bit COM object, interfaces (or a .TLB), etc. If it's not a public thing, it will be difficult I guess. Another solution is to wrap that 3rd party component by a 32bit COM component you write yourself (using .NET or anything you like), so both will run in process and expose that new COM component (again to the 64bit world with same surrogate technique). Now if you have transfer/data error again, then it's not due to the initial object, but probably to how the whole thing is coded. At least, it'll be able easier to discuss this here on SO with all components yours – Simon Mourier Jun 17 '20 at 11:59
  • @SimonMourier unfortunately its a private thing cannot be public. any tutorial or example on how to do that? – vishnu Jun 18 '20 at 11:19
  • Creating a wrapper is just creating a COM component in .NET, for example: https://stackoverflow.com/a/57573317/403671 and then you'd use that 32-bit component from QT like you do today with the surrogate setup. – Simon Mourier Jun 18 '20 at 13:59

0 Answers0