LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

FileSelectPopup "Wrong Concurreny" Error

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

 

0 Kudos
Message 1 of 4
(3,404 Views)

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

 

Message 2 of 4
(3,340 Views)

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.

0 Kudos
Message 3 of 4
(3,251 Views)
So far I haven't seen any adverse effects. All my functions in other threads and my thread-safe queues seem to work as they did before. I still don't know why the thread model in the new version got switched in the first place.
0 Kudos
Message 4 of 4
(3,241 Views)