LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Dialog fails to show if start path is a UNC path

Solved!
Go to solution

Hi,

when I wire a unc path (a path beginning with //?/UNC/) into the start path the dialog never shows and the node throws error 43 (aborted by user).

For quite a while I was really confused, because the vis checking the start path beforehand (e.g. Check if File or Folder Exists.vi) handle the unc path quite alright.

It seems I'd have to specifically check for the path beginning with //?/UNC/ to keep File Dialog from tripping.

Of course it would be best if it accepted the path.

 

Am I overlooking something, or is there a workaround for this?

0 Kudos
Message 1 of 2
(2,541 Views)
Solution
Accepted by topic author Florian.Ludwig

The \\?\UNC\<servername>\<share> is a Windows kernel specific naming scheme and only the Unicode Windows API calls can handle that. LabVIEW however is using exclusively the ANSII API functions and they will generally choke on any such kernel naming schemes.

However there is an ANSII compatible UNC path that LabVIEW does support: Use "\\servername\share" instead. That is also the reason why some of the other VIs seems to not complain. They just check for the two backslashes in the beginning to consider the path an UNC path and don't do further verification for that case.

 

LabVIEW internally does store paths in a platform independent way and any path starting with two backslashes is considered UNC, although there are also other pathnaming schemes in the Windows kernel space that start with \\?\ that are not UNC paths. But at the time LabVIEW was developed Windows NT was at version 3.1 and without a complete graphical user interface that would have allowed to run LabVIEW on. And it didn't have any sorts of those kernel space naming schemes at that time.

 

Basically when you try to enter a path \\?\UNC\servername\share and convert it into a LabVIEW path LabVIEW will convert it into an UNC path with the "?" as server name and "UNC" as sharename and the rest as subdirectories on that share, and that obviously can never ever work as this could never point to a valid UNC share.

 

 

Rolf Kalbermatter
My Blog
Message 2 of 2
(2,510 Views)