DirSelectPopupEx
int DirSelectPopupEx (char defaultDirectory[], char title[], char pathName[]);
Purpose
Displays a directory selection dialog box and waits for the user to select a directory or cancel.
(Linux) There are no differences between the directory selection dialog box displayed with DirSelectPopup and DirSelectPopupEx.
![]() |
Note The underlying Windows SDK function used to create and run the DirSelectPopupEx dialog box does not work properly when the threading modelthreading model is multithread apartment (MTA). ActiveX functions use this thread type by default, and calling any ActiveX function initializes the thread to MTA. This might cause subsequent calls to the DirSelectPopupEx function to return an error. To ensure the DirSelectPopupEx dialog box works properly, LabWindows/CVI initializes the thread calling the DirSelectPopupEx function to COINIT_APARTMENTTHREADED prior to creating the dialog box. If you want to run in the default MTA threading model, consider calling the DirSelectPopupEx function from a different thread that does not call any ActiveX functions. You can explicitly set the ActiveX threading model for a thread using the CA_InitActiveXThreadStyleForCurrentThreadCA_InitActiveXThreadStyleForCurrentThread function. |
Parameters
Input | ||
Name | Type | Description |
title | char [] | Title of the dialog box. |
Output | ||
Name | Type | Description |
Return Value
Name | Type | Description | ||||
selectionStatus | int | The selection status or error codes generated during the function call.
Negative values indicate that an error occurred. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 2012 and later