03-29-2019 08:18 AM
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?
Solved! Go to Solution.
03-29-2019 04:40 PM - edited 03-29-2019 04:49 PM
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.