The general structure of our Windows application is that the UI is Java on top of 'business logic' implemented by COM/C++ components, bridged by JNIWrapper. The COM can call back to the UI: typically to ask for confirmation. For example, user clicks close on UI, which requests that it wants to close to the COM layer which, if that has unsaved state, calls back to the UI to display a confirmation message box as to whether data should be saved, or not, or the close operation cancelled.
ComFJY 2.13 / JniWrap 3.11.
The parameters passed to the message box from the COM layer are BSTR: I log them to debug log, and they are correct. They are not released until the call returns.
Everything works as expected for a few hours, and then - it fails because the corresponding parameters on the Java side, are received from the JNI Wrapper as null strings....and SWT message box throws an exception.
Rather than speculate, I thought, as a next step, I would like to find the reason as to why the strings are coming back as null. I'm surprised it does not raise an exception, given that the strings on the COM/C++ side are valid.
Any suggestions? (BTW we do have a commercial licence and I will, if more appropriate, follow up on that channel)
Thanks
Kirk