G
Guest
have a 3rd party .Net dll that wraps a set of further unmanaged dll's. The
..Net DLL basically uses pinvoke to wrap the calls. The low level dlls
provide an API to talk to a complex device which appears as a USB hub (with a
scanner, flash drive and some other bits and pieces).
Using a VB.Net windows app, we call the main unmanaged API function (lets
call it doStuff() ) and then call messagebox.show to pop up a modal results
dialog. This works OK UNLESS the client app loses while dostuff() is runnning
(takes about 5 - 10 seconds)
If this happens the modal dialog pops up but isn't modal! You can then click
the 'Dostuff' button on the app and call doStuff() again. It's either
resulting in multiple threads of execution or recursive calls to
on_dostuff_clicked ??
This only appears to happen when the client app loses focus while execution
is in the unmanaged code. If it doesn't then the modal is modal.
Anyone come across anything like this before ? Is there any way of
isolating the call to the 3rd party API so it doesn't mess up the calling app?
Cheers,
Rob J
..Net DLL basically uses pinvoke to wrap the calls. The low level dlls
provide an API to talk to a complex device which appears as a USB hub (with a
scanner, flash drive and some other bits and pieces).
Using a VB.Net windows app, we call the main unmanaged API function (lets
call it doStuff() ) and then call messagebox.show to pop up a modal results
dialog. This works OK UNLESS the client app loses while dostuff() is runnning
(takes about 5 - 10 seconds)
If this happens the modal dialog pops up but isn't modal! You can then click
the 'Dostuff' button on the app and call doStuff() again. It's either
resulting in multiple threads of execution or recursive calls to
on_dostuff_clicked ??
This only appears to happen when the client app loses focus while execution
is in the unmanaged code. If it doesn't then the modal is modal.
Anyone come across anything like this before ? Is there any way of
isolating the call to the 3rd party API so it doesn't mess up the calling app?
Cheers,
Rob J