LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a directory list on RT target? Is GetFirstFile() supported?

I'm developing an Real-Time DLL to run on a PXI controller.  At runtime, I want to generate a list of the files in the support directory.  (Like the list that appears when I run the Real-Time File Copy Utility).    I tried using GetFirstFile(), but I get a link error.   (Undefined symbol '_GetFirstFile@32' referenced in "loadConfig.c".)
 
Is GetFirstFile() supported on RT targets?  If so, what library is it defined in?  If not, is there another way to get a directory list?
 
 
Thanks,
-Adam

 
0 Kudos
Message 1 of 5
(5,157 Views)
GetFirstFile is not supported (CVI RT 8.1)
You can use FindFirstFile (from the windows SDK).  (at least on a desktop running ETS)

Regards,
Nicolas


0 Kudos
Message 2 of 5
(5,132 Views)
GetFirstFile is not supported (CVI RT 8.1)
You can use FindFirstFile (from the windows SDK).  (at least on a desktop running ETS)

Regards,
Nicolas


0 Kudos
Message 3 of 5
(5,132 Views)
Thank you.
 
FindFirstFile() does work for me, even on the PXI controller running ETS.
 
I think it is strange that the Windows SDK function works on the realtime target while the NI homegrown version does not.  It is totally unintuitive that I should have to include windows.h in my realtime application.   Is there any good reason that GetFirstFile() is not supported?
 
-Adam
0 Kudos
Message 4 of 5
(4,394 Views)
Hi Adam,

To answer your question, the GetFirstFile function was not ported over to the Windows SDK found on RT. We initially only ported over the SDK functions that we need to get our software running and then added a few commonly used functions. If you'd like, you may file a Product Suggestion on ni.com and one of our developers will look into adding this function in a future release of CVI RT. Thanks and have a great day!
 
Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 5 of 5
(4,316 Views)