Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 946749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:58:15+00:00 2026-05-15T22:58:15+00:00

I can open files from a mounted network drive, but not from an unmounted

  • 0

I can open files from a mounted network drive, but not from an unmounted one e.g \\mycomp\folder2\hi.bmp

Any work around for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:58:15+00:00Added an answer on May 15, 2026 at 10:58 pm

    The following snippet works for me:

    char buffer[1000];    
    FILE* file;
    size_t bytesRead;
    
    file = fopen("\\\\server\\share\\test.dat", "rb");  
    if (file != NULL)
    {
        bytesRead = fread(buffer, sizeof(char), sizeof(buffer), file);
        fclose(file);
    }
    

    Also note this excerpt from the fopen docs (MSDN):

    …

    fopen will accept paths that are
    valid on the file system at the point
    of execution; UNC paths and paths
    involving mapped network drives are
    accepted by fopen as long as the
    system executing the code has access
    to the share or mapped network drive
    at the time of execution
    . Special care
    must be taken when constructing paths
    for fopen to avoid making assumptions
    about available drives, paths or
    network shares in the execution
    environment.
    …

    You also need to consider, that the account you are running your program under, needs to have the appropriate access rigths to the file. When you mount the share as a network drive, maybe you are using different credentials to connect. That could cause fopen to fail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Access can open DBF (dBase) files, but instead of physically converting the data into
The docs for django.core.files.File imply I can do this: print File(open(path)).url but the File
Hi one additional question. I've managed to open my files from excel into R
How to open files from explorer into different tabs. I can associate an open
How can I put up a File Open dialog from some VBA running in
Can perforce be adjusted so I don't need to open files for edit? Someone
Currently when I open a file with my program I can select files on
My web service needs to open some files located on a remote computer. From
I have a script that download's files from a server, all works nice. But
Is it possible to open all types of files from excel vba with just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.