FileExists and UNC path

I've noticed a strange behaviour of FileExists(const char path[], ssize_t **fileSize) function with UNC paths (\\<hostname>\<sharename>[\<objectname>]*):
if <hostname> is an alias of a non-existent host, FileExists returns 0 (File not found) - for example FileExists("\\\\server-name\\folder-name\\file.txt", NULL)
if <hostname> is an unreachable IP address, FileExists return -93 (UIEIOError) - for example FileExists("\\\\192.168.1.1\\folder-name\\file.txt", NULL)
This happens also if you try with the path to the same file, written with the host IP address and its corresponding alias, when the host becomes unreachable.
Tested with CVI 2009 SP1
Is this an expected behaviour?
Vix
In claris non fit interpretatio
Using LV 2013 SP1 on Win 7 64bit
Using LV 8.2.1 on WinXP SP3
Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

Hello Vix,
I've tried with either CVI 2009  Version 9.1.1 (450) and CVI 2009 Version 9.1.0 (428) and I always get 0 if the alias is bad or the IP is unreachable.
Here's the code I've run:
int ret=0;
ret=FileExists ("\\\\it-mil-wds01\\AEs\\pippo.txt", NULL);
printf("Il valore e' %d",ret);
getchar();
int ret=0;
ret=FileExists ("\\\\server\\AEs\\pippo.txt", NULL);
printf("Il valore e' %d",ret);
 getchar();
Can you give me your exact version of CVI?
Thanks,
Andrea
Andrea N.
Systems Engineer ATE & RF - Mediterranean Region
National Instruments Italy

Similar Messages

  • TED App and UNC Path

    I created an App that gets distributed by TED. When it pushes the app to
    the subscribers it changes the path from a UNC path using the server name
    to a UNC path using the domain name. For example \\Server\data becomes
    \\server.company.com\data
    Is there a way to keep the UNC path using the server name only.

    Bblaser,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Mapped Path being used instead of UNC Path

    We have recently upgraded our Adobe products from CS3 to CC.  In CS3, images that were added to InDesign had the UNC path in the "Links".  With CC, we are finding that the Mapped Path is in the "Links".  This different behaviour is causing some issues.
    Here is the process that we are using to add images to an InDesign file:
    1.  Open Bridge
    2.  Browse to a folder (X:\ which is mapped to \\Server\Hi-Res\)
    3.  Drag and drop an image from Bridge to InDesign
    In CS3, a path of "X:\MyFolder\MyImage.tif" would get converted to \\Server\Hi-Res\MyFolder\MyImage.tif
    In CC, the path remains as "X:\MyFolder\MyImage.tif" which is causing us some issues.
    Is there a way, in InDesign CC, to tell the application to use UNC paths when a Link is created - similar to what we were experiencing with CS3?
    Thanks,
    Jody

    Hi Lee,
    In CS3, UNC paths were used in File Path for images but this behavior was changed in CS4 (most probably) and UNC paths are no more supported.
    Regards,
    Pooja

  • UNC paths and java.io.file in Oracle

    Hi,
    I'm just getting to grips with using some basic java in the database. I'm using 8.1.7 on W2K.
    I'm trying to test for the existance of a file on a separate w2k domain:
    import java.io.File;
    public class JFileExists {
    public static int fileexists (String fileName) {
    File myFile = new File (fileName);
    boolean retval = myFile.exists();
    if (retval) return 1; else return 0;
    public static void main (String args[]) {
    System.out.println (
    fileexists (args[0])
    grant javasyspriv to mp;
    function jfn_file_exists (file_in IN VARCHAR2) RETURN number
    AS LANGUAGE JAVA NAME 'JFileExists.fileexists (java.lang.String) return int';
    From the command prompt all is well:
    E:\java>"c:\oracle\ora81\Apache\jdk\bin\java.exe" JFileExists i:\test.txt
    1
    E:\java>"c:\oracle\ora81\Apache\jdk\bin\java.exe" JFileExists \\mpweb1\image\test.txt
    1
    But when loaded into oracle its returning false with the UNC path. (but is ok with a mapped drive to the same path)
    SQL> declare
    2 begin
    3 pa_main.pr_print(to_char(pa_main.jfn_file_exists('I:\test.txt')));
    4 pa_main.pr_print(to_char(pa_main.jfn_file_exists('\\mpweb1\image\test.txt')));
    5 end;
    6 /
    1
    0
    PL/SQL procedure successfully completed.
    The oracleservicesid and listener are starting under a user called oracle_user which is a member
    of the admins and domain admins group.
    mpweb1 is on a separate domain to the database server mpdb1 but it also has a user called oracle_user with the same password.
    oracle_user has full access to the share in question.
    Am I missing something? I was trying to keep the database server and web server on different domains for better security
    - but would things be easier if they were on the same domain?
    Any help much appreciated for this java newbi!
    Thanks,
    Simon.
    null

    I am also having problems with UNC paths. But I cannot access the location even if it is mapped as a drive. In JDK VJM I do not have a problem, but in Oracle it says the file cannot be found and say permission denied. I will try to change the user that starts the database and see if that helps.
    null

  • Full path and filename in wwv_flow_files after upload from UNC path in IE

    I have a page with a file browse item. After page submit I move the file from wwv_flow_files to another table.
    Normally the column wwv_flow_files.filename only contains the filename. However, when using IE9 and selecting a file from an UNC path the column contains the full path+filename.
    Does anybody have an idea what happens here?
    How can I make sure I only get the filename?
    Using Apex 4.02.007
    Edited by: Rene W. on Feb 28, 2013 6:39 AM

    Rene W. wrote:
    I have a page with a file browse item. After page submit I move the file from wwv_flow_files to another table.
    Normally the column wwv_flow_files.filename only contains the filename. However, when using IE9 and selecting a file from an UNC path the column contains the full path+filename.
    Does anybody have an idea what happens here?
    How can I make sure I only get the filename?For security/privacy reasons recent versions of browsers by default do not send local file path information from File Browse items to the server, nor expose the file path in the control's JavaScript methods. Firefox, Safari and Chrome only provide the filename. IE6 & IE7 still yield the path in Windows format. IE8+ and Opera have adopted an irritating approach of replacing the path with a wholly imaginary "C:\fakepath\"—and this monstrosity has sadly had to be enshrined in the HTML spec. A reasonably compatible way to strip the path in JS is provided there, or you should be able to do it fairly easily in PL/SQL when moving the file.
    The fact you are getting the full path suggests that the IE security config setting "Include local directory path when uploading files" (or IE9 equivalent) is used in your browser/environment to enable the path to be exposed in IE. This may be necessary to support dismal legacy applications. Consult whoever is responsible for browser security configuration at your site to see why/if this setting is necessary.

  • Word 2013 shows full UNC path instead of local "Documents" folder on file Open and Save

    Normally Word (and Excel) by default will show the user's local "Documents" folder when opening or saving a file. That is what we want. However, after using Windows Server Folder Redirection to redirect the Documents folder to the network (Windows
    Server 2012R2), Word now shows the full UNC path to the network share.
    Instead of seeing:
    "MyPC  Documents"
    users see
    \\sever1\redirect$\username\documents
    Folder redirection is supposed to be transparent to the user. Virtually all our other applications, including Office 2003, respect this convention and continue to show "Documents". As you can see, Word even exposes a hidden share.
    Even if we go to File / Options / Save and browse to the local Documents folder as the place Word should open and save files from, Word immediately removes the path you have browsed to, and replaces it with the UNC path.
    Is there a way to suppress this behavior? Thanx!
    Dana

    Hi,
    Based on my understanding, you only want others to see some part of path name, rather than full UNC path name. It is right?
    It seems that we can’t implement your requirement. When we open a file from “My Pictures”, it shows “My picture” instead of showing the full path “C:\Users\User\Pictures”. “My Picture” is set as a library in Windows, so it hides
    full path by design. We can't set \\sever1\redirect$\username\documents as a library.
    As a workaround, you can upload these files to OneDrive and share link to others.
    If I have anything misunderstood, don't hesitate to tell me.
    Regards,
    Greta Ge
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Help configuring adobe media server's apache to use UNC paths and use multible VOD directories

    I am experimenting with v 5.03 for media server with look to upgrade our current pool of v4.x server to support ipads etc.
    i have set the ams conf file and have in the past use a unc paths for my VOD_Dirs
    eg
    VOD_DIR = C:\Program Files\Adobe\Adobe Media Server 5\applications\vod\media
    VOD_DIR_1 = \\prodserver1\media\data\VOD\Media
    VOD_DIR_2 = \\prodserver2\media\library\Preview
    VOD_DIR_3 = \\prodserver3\media\preview
    how and where do i need to do this for the http streaming ?
    cheers
    Robert

    You use Apache config files for the same...namely httpd.conf.

  • Network UNC paths and SWF files not running.

    Flash Player wont run SWF files from a network unc path. A map drive works. How can I resolve this?
    Our user profiles in window 7 are roaming and the my documents redirects using a unc path to the my documents area.  When the swf file is run, you just get a white background in the player.  The standalone player is version 8 .  We also deploy the latest flash player plugin for ie9 browser (currently 11.3).
    I have tried adding the unc path \\servername\pathname to a .cfg file in C:\Windows\System32\Macromed\FlashPlayerTrust  as described in the flash player administrator guide.  This did not work.
    I have also tried to update the global security settings panel with the unc paths required and copying the settings.sol file to users profiles but this has not made any difference.
    Can anyone help?
    Many Thanks
    Mark

    Thanks for replying Jeromie. 
    After a bit of digging, I discovered that the problem was with the profile path for users. I am not sure why, but when the profile path contains the fully qualified domain name in it , flash player fails i.e \\server.domain.co.uk\sharename\flash.swf.  when the path was changed to \\servername\sharename\file.swf , it worked.
    I changed all the users profile paths and removed their appdata to and now all users can play flash files with the new profile path.
    Regards
    Mark

  • Unc path and authentication

    hello,
    i installed share point 2013 on 2008 r2 server (no domain) i want to make user permision so they can open list passed thier permission so can i do it with out dc ?
    also i want to enable unc patch so the client can brows the files from windows explorer as share folder.
    thanks.

    The problem is that the local account is "local" and won't be the same account as the one used by the user on their workstation.  If the server is a member of the domain then the domain account is shared between the SharePoint server and the workstation
    because both validate the account credentials with the same Domain Controller.
    If you are authenticated to the SharePoint server then you should be able to map a UNC path to a document library.  This does however require some add-ons that are normally installed by Office.  I've seen lots of issues with people having a 64
    bit of office installed and not having the addons needed to open a UNC path.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Creating a symlink directory on a network share to a path below a mapped drive letter, local path, or UNC path does not work

    Am I correct in assuming I can not create a `symlinkd` to a network share, local path, or a UNC path on a network share that will be accessible by clients?
    ###Mapped drive letters don't work:
    1) navigate to a network share:
    pushd \\windows2008server\share\
    2) make a hardlink:
    mklink /d test_sharedir t:\directory\
    dir .\test_sharedir
    #Directory of Z:\test_sharedir
    #File Not Found
    UNC paths don't work:
    1) navigate to a network share:
    pushd \\windows2008server\share\
    2) make a symlink:
    mklink /d test_dirunc \\windows2008server\share
    dir .\test_dirunc
    #Directory of Z:\test_dirunc
    #File Not Found
    I can create a functional `symlinkd` on a local drive to a mapped drive letter or a UNC path.
    Are my assumptions above correct?
    We are in the middle of a migration and have created two symlinkd to UNC paths for shared DLLs, one below c:\windows\system32\ (directing to a share containing 64-bit DLLs) and one below c:\windows\syswow64 (directing to a share containing 32-bit DLLs).
    On the file server, we have had a path to 32-bit DLLs (from Windows 7 clients: s:\dll\).  I am attempting to rename this directory so that it is accessible via "s:\dll32\" and would like to create a symlinkd that links "s:\dll" to
    "s:\dll32" [again where S: is a mapped drive on a Windows 2008 server].  How do I do this?
    Thanks,
    Matt

    Hello Mandy,
    The link you sent me is for Netapp CIFS server daemon contained within DataOnTap (the Netapp OS) to follow symlinks.  I am inquiring about the Microsoft products Windows Server and Windows 7.
    To gain a better understanding of the Microsoft Windows Server and client (Windows) CIFS stacks and interaction of the stacks, I have referred to Figure 6 "Server Message Block Server Model" within the following (albeit older) document: http://download.microsoft.com/download/2/8/0/2800a518-7ac6-4aac-bd85-74d2c52e1ec6/tuning.doc
    You will see the following:
    I assume that the Windows Server CIFS server service must be "smart enough" to determine that a CIFS client is attempting access to a SYMLINKD and actually fill the request by following the SYMLINKD.  The CIFS server service does not appear
    to operate like this.
    1) Am I correct in my assumption that the CIFS client (redirector) and the CIFS server (server) do not following symbolic links (whether they be file or directory)?
    2) If not, how do I submit a feature request for this so that it can be reviewed and approved or not approved for inclusion/hotfix release?
    Thanks for your time,
    Matt Brown
    [UPDATE]
    Note that you can use a `directory junction` instead of using a SYMLINKD, to link to LOCAL resources (source). However, `directory junctions` do not allow access to resources over UNC.

  • Intermittent loss of UNC path access on Windows Server 2012

    Hi All,
    I hope someone can help with a major headache we've been having on two Windows Server 2012 boxes since September this year. Basically, these servers will intermittently lose the ability to browse network shares from windows explorer and the only way we have
    found to resolve this is to reboot. When the issue happens, we can't even log into the server as it sits at 'applying user settings' - presumably as it is failing to access the netlogon share on our DCs. If we have an active RDP session when the issue occurs,
    we can connect. In this instance we see that if you enter a UNC path in Windows explorer and hit enter, nothing happens - no error messages or anything. The only way I can get any response is when trying to access the IPC$ share on another server, which gives
    the following response:
    \\server\ipc$ is not accessible. You might not have permission to use this resource, Contact the administrator of this server to find out if you have access permissions.
    The parameter is incorrect.
    Everything looks right from a physical network perspective, as we can ping from the affected servers and DNS queries are working fine. I can even run net view from powershell and see the local servers and shares on these, however any attempt to access shares
    just hangs the powershell session.
    If I look in the SMBClient event logs, I can see entries like the following:
    Event ID 30805
    The client lost its session to the server.
    Error: The transport connection is now disconnected.
    This is made worse by the fact that when this issue happens, we can't even cleanly reboot the server (it just hangs) and have to perform a cold boot.
    The firewall has been turned off and we have taken off our antivirus software to eliminate it as a possible cause. We have even rebuilt one of these servers on a clean install of 2012 R2, but the issue re-appeared. We have also tried using different NIC
    drivers (Broadcom NICs installed) to no avail. We have also tried disabling IPv6.
    We have logged a ticket with Microsoft support, who have come back telling us that this could be related to a known bug with DFS in 2012 for which a fix is being tested prior to release in a few weeks. However, I can't sit around on my hands until then on
    the off chance that this fix will resolve our problem. These servers are hosting our production Lync 2013 front end service and when this issue occurs it breaks the address book search and response group services, so this issue is of critical importance for
    us to get resolved asap.
    Any help on this would be greatly appreciated.

    Hi,
    That's right, if you hit enter absolutely nothing happens, no error messages. It makes no difference if I try name or IP address - even trying \\localhost doesn't work. A few minutes later after trying, an entry appears in the SMBClient event logs as mentioned
    in my original post. To me it looks like something deep within the networking operations of the OS is randomly breaking. Also, if I try to browse the network from Windows explorer, it just hangs. When I try to restart the workstation service, it just gets
    permanently stuck in a stopping state and the server has to be cold booted. Once it boots up, everything is working fine again....until the next time. There is absolutely nothing appearing in the application or system event logs indicating the root cause.
    I've checked and DNS resolution is working OK and I can telnet to other hosts on all the required ports.
    I had originally thought it might be related to the Broadcom NICs as we've had issues with them in the past, but we switched over to use the 2012 inbox driver for them and the same issue happens. I should also mention that one server is a blade and the other
    a rackmount box. Dell support have run full diagnostics on both and have come up clean, so it doesn't appear to be a hardware issue. The even more baffling thing is that we have a third server with identical spec and config that does not have the problem.
    The only difference with this third server is that it is not part of a Lync pool pairing using DFS and sits in a remote location on a different LAN.
    I had thought of trying to drop back to use SMB1 by disabling SMB2 and 3, but I'm not sure if this would adversely affect any other services.
    This one really has me stumped.

  • Acrobat Reader XI fail to open file from unc path "Access Denied"

    Hi,
    When we try to open a pdf file from an unc path by double-click on it there is an error message : "There was error opening this files. Access Denied"
    If we do "File -> Open" the file open correctly. Same if we copy the file localy.
    After looking around Internet and other thread Acrobat Reader X got the same problem but seemed to be resolved with an update.
    If we desable "Enable Protected Mode at startup" the file open correctly (it is not a solution).
    Does anyone have a solution to this problem ?
    OS : Windows XP SP3
    Acrobat Reader : 11.0.2
    Regards,

    I have also seen this occur with one user's computer.  Another user with similar privileges and software setup does not exhibit the same issue however.  Would love Adobe to investigate and address this issue.

  • Creating a directory on a remote machine using a UNC path

    Hi all,
    Is it possible to create a directory on a remote machine using a UNC path such as \\Server\Share\Directory?
    If so, how would i go about this? (Sorry for the newbie question, that's exactly what I am!)
    Thanks,
    Rob

    The tables on your pages are images. Not very convenient if the visitor wants to copy the information and use it.
    Read this how to use tables :
    http://www.wyodor.net/blog/archives/2010/01/entry_297.html
    http://www.wyodor.net/blog/archives/2010/01/entry_298.html
    Samples :
    http://www.wyodor.net/mfi/Maaskant/Seabreeze.html
    http://www.wyodor.net/mfi/Maaskant/Experiment.html
    http://www.wyodor.net/mfi/roodhout/Prices.html
    And here's a non-iWeb page with a sortable table :
    http://www.wyodor.net/htmlegg/TallCard/TallAjax.html?pg=tablesorter
    Or use a database on the server with MySQL and make tables with PHP :
    http://www.google.com/search?q=create+html+table+with+data+from+mysql+database
    Here's a very simple way to do it :
    http://home.wyodor.net/w3school

  • Can't add own application to RemoteApps - "You must specify a file from the RD Session Host server SERVERNAME by using the UNC path....

    Hi, there
    I'm not really pro- at RDS in server 2012 (r1), but I have a problem and don't find anything suitable on internet:
    I'm trying to publish one of my own, unlisted programs to rdweb, but it keeps saying "You must specify a file from the RD Session Host server SERVERNAME by using the UNC path...."
    1) I provided the path in the unc name - when I click "Add.." then i browse the the .exe file via network share, not via local path. So that should be OK
    2) Firewall is turned off and eventhough the exeptions are enabled, both of then, checked
    What else should I do to make this work?

    Okej, I found the sollution:
    You have to specify the path like \\hostname\drive_letter$\path-to-the-program.
    I was doing wrong because i wrote it like \\hostname\ShareName\path-to-the-program.
    I was misleded because the wizard wants me to find the program by clicking, and not by entring the path manualy.

  • How do I create an installer for my project that allows for variable data entry like a server unc path?

    Hello All,
    I have a questions and a few hours of scouring the internet hasn't brought me much closer to an answer.
    Here's what I want to do. I have created a visual c# wpf application. I want to have an installer that during install time will have a text box or something where I can enter a server path as a string. Basically my application needs to know where to look
    for a server unc path \\server\somesharedfolder that it will be accessing primarily for its work. Secondly, how do I reference said information from within my code.
    I have come across application/user scoped settings, which appears to be what I'm looking for. However I can't find a way to have the installer prompt for a value "Server Path:" __________ that I could type into during installation. So far it appears
    the only way would be to edit the config.deploy file before running the installer, which isn't a big deal but you'd think there'd be an easy way to take in variables during install.
    EDIT: Apparently I can't edit the config.deploy file as I get an error message about the hash not matching.
    Thanks for your help!
    Lance

    Hello,
    The forums I found confusing, didn't know the best place to put this question so I put it here.
    I have found the answer over at stackoverflow and will detail here for anyone who may stumble across the same problem.
    The problem is ClickOnce seemingly doesn't support this feature. Installshield LE either doesn't or does but its incredibly too complicated if all you need is one variable passed to the registry during installation. And it seems the words used for googling
    this particular problem will never lead you to the solution.
    So here's how to do it (we will be first adding the Visual Studio Installer Add-on to restore original installer project functionality):
    1) Inside of visual studio 2013 go to Tools -> Extensions and Updates
    2) On the left-hand side click on Online -> Visual Studio Gallery
    3) In the upper-right search box search for "Visual Studio Installer"
    4) Download the extension labeled "Microsoft Visual Studio Installer Projects"
    5) Install, then open a new project under Templates -> Other Project Templates -> Visual Studio Installer -> Setup Project
    6) Now for the gold. In the solution explorer there are icons in a bar just below its title bar, highlight till you see "User Interface Setup" and open it.
    7) Now you can right click on Start, Progress, End etc any Category heading and hit Add Dialog.
    8) From here for my purposes, I used TextBoxes A
    9) Once you add it, click on it and observe its properties window. You will see Label, Property, and Value. Make a note of the property name as it will be used to store the data directly into the registry. *Note: there appears to be no way to perform data
    validation using the built in textbox dialogs, users can enter whatever they want and move on.
    10) Go to the registry editor on the same icon bar under solution explorer.
    11) Specify your registry folder, make a new value (I used string) and name it whatever you like. In the value section enter the property label formatted as such   [EDITA1]   depending on your value. 
    12) Now when you run the installer for your project, it will take data into that field and place it into the registry provided it has access to that key with the permissions you run the program under.

Maybe you are looking for

  • R/3 4.6B Installation Problem

    Dear all, I have installation problem when system carry out the final step "Initializing the Workbench Organizer with RFC" after I click Continue to skip importing non-latin language. the error message is showing below INFO 2009-01-22 11:28:00     St

  • What is the best 'cleaning system' for the Mac?

    What do you recommend as the best 'cleaning system' for the Mac!

  • How to set ORACLE_HOME used by SQL Developer?

    I need to use OCI/Thick driver with SQL Developer to get OS authentication working. I have 64-bit windows and 64-bit oracle installed. I also have 32-bit instant client in another ORACLE_HOME, because the libs of 64-bit ORACLE_HOME won't work with SQ

  • Actionscript3 extended display on 2 moniters

    Greetings! I would like to ask how do I extend my display on 2 moniters with flash in full screen? My stage size is 1600*600, I want the stage to be extended and display in both moniters. Each moniter resolution is 800*600. Red portion should be disp

  • Tethering is not working with static IP address iOS 5, 6, 6.1

    When I use in our country - Czech Republic (carrier Telefonica O2) static IP address, I must use APN "internet.s". When I turn-on Personal Hotspot with this APN, it is possible to connect to this wifi hotspot, but withnout access to internet. iOS 5,