08-27-2019 04:33 PM
Hi All,
I just upgraded CVI from 2013 to 2019 and now I get error -180 (UIEFileDialogWrongConcurrencyModel) when using the FileSelectPopup(Ex) function. I am using 32-bit CVI 2019 on a 64-bit Win 8.1 machine. Before the CVI (and drivers) upgrade everything worked fine. The popup function is called from my main thread. I use various threads for data acquisition and analysis (via CmtScheduleThreadPoolFunction and PostDeferredCallToThread and such), but (to the best of my knowledge) I am not using any ActiveX functions. Any hints for troubleshooting?
Thanks,
Martin
08-28-2019 12:03 PM
I did some more testing and it seems that when I disable all of my device functions that are based on an IVI library the popups seem to work. So as far as I can tell calling a device driver that was created using the IVI driver wizard switches the thread mode to MTA. If I lock in the thread model using
CA_InitActiveXThreadStyleForCurrentThread (0, COINIT_APARTMENTTHREADED);
in main(), the popups seem to work. So far the rest of my programs still seems to work, but I do wonder what other consequence locking the thread model has (I assume this gets switched by the IVI functions for a reason).
Cheers,
Martin
09-30-2019 10:52 AM
Has this had any adverse results? I am having the same problems within my application and changed the FileSelectPopup( ) to MultiFileSelectPopup( ), which I only capture the first file selected.
09-30-2019 11:14 AM