Good day experts,
We have an IPC protocol stack that was developed a while ago, which I inherited. I am currently trying to use this stack in my Qt5 application to communicate with some of our other devices which use this IPC protocol stack. This stack is based on callbacks and due to its complex nature and my limited understanding thereof, I cannot easily convert it to Qt's signals and slots.
I have attached the header file that we use to make the callbacks and below is a typical example of how it is used:
_ripc_protocol_handler->register_platform_specific_send_function(
(Rap_send_callback) make_callback(
(Rap_send_callback*) 0, this,
&Tc4_lp_programmer::_write_to_port
)
);
_ripc_protocol_handler->register_platform_specific_send_function(
(Rap_send_callback) make_callback(
(Rap_send_callback*) 0, this,
&Tc4_lp_programmer::_write_to_port
)
);
To copy to clipboard, switch view to plain text mode
with Rap_send_callback defined as follows:
typedef cntb_cb::Callback<Rap_callback_object*> Rap_send_callback;
typedef cntb_cb::Callback<Rap_callback_object*> Rap_send_callback;
To copy to clipboard, switch view to plain text mode
This code works fine with Visual Studio 2005 C++ compiler. In Qt5 with the MingW compiler for Windows, I do not get any compiler warnings or errors, but at runtime the program would crash when registering the callback as illustrated above.
I am aware that I am providing limited information here, I'll do my best to gather some more, but can someone please just provide me with some pointers or just point me in the right direction?
Thanks in advance!
Bookmarks