LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetFirstFile/GetNextFile returns back with a different result under WinNT than WinXP

GetFirstFile/GetNextFile  returns back with a different result under WinNT than WinXP.
 
GetFirstFile ("\\\\Fam1_io_3\\Data\\Fiat\\FAM1-E-GD\\Reports\\*GM3MX0*.txt",1, 0, 0, 0, 0, 0,FileName ); 
command works as I expect under WinXP, but it returns back with the name of all files placed in the specified directory under WinNT. See attached picture!
What could be the problem?
 
 
 
0 Kudos
Message 1 of 8
(4,671 Views)

It could be wildcard changes with NTFS. Check out this thread.

--Ian

0 Kudos
Message 2 of 8
(4,658 Views)

The thread you mentioned does not help. It suggest to use * wildcard instead of ?, but originally I tried to use * not ?.

My application also works fine under Win2000.

The WinNT wildcard rules also works as I expect. See attached picture!

Any additional idea?

0 Kudos
Message 3 of 8
(4,657 Views)

Could you re-try posting the image using the attachment feature on the boards? It seems to be a link to a local file on your PC. (Note that previewing your post might reset the attachment field to blank.)

I'd also be interested to hear if you get consistent results on both OSs at a command prompt with: "dir *GM3MX0*.txt"

--Ian

0 Kudos
Message 4 of 8
(4,650 Views)

Hi,

As you can see in the attachment both OSs work the same way but not the GetFirstFile/GetNextFile function.

Robert

Download All
0 Kudos
Message 5 of 8
(4,626 Views)
Well, I'm out of ideas. Anyone at NI care to wade in?
 
--Ian
Message 6 of 8
(4,579 Views)
Raybie,

It doesn't make sense to me that the behavior would be different in NT and XP. But there was a bug fixed a while back in this library, that could explain the behavior you're seeing in NT. So that makes me wonder if you have exactly the same version of the CVI runtime in both machines. Could you check the version of cvirte.dll in the windows\system folder, both in NT and in XP, and confirm that they're the same?

Luis
Message 7 of 8
(4,559 Views)

Hi Luis,

You were right! The problem was the different CVI run-time engine. (NT->6.x ; XP->7.x)

Happy New Year!

Raybie

0 Kudos
Message 8 of 8
(4,500 Views)