Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. NFS mount via C++?

NFS mount via C++?

Scheduled Pinned Locked Moved C / C++ / MFC
c++sysadminwindows-adminquestion
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alchong
    wrote on last edited by
    #1

    I'm thinking about writing an application to access some unix shares from a windows server, is it possible to create an NFS mount in C++?

    L D 2 Replies Last reply
    0
    • A alchong

      I'm thinking about writing an application to access some unix shares from a windows server, is it possible to create an NFS mount in C++?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      alchong wrote:

      is it possible to create an NFS mount in C++?

      The phrase 'NFS mount' implies a device driver. It is generally not recommended to develop Microsoft Windows device drivers in C++ however it can be done. Microsoft supplies the IFS Kit[^] for developing file systems and file system filters. If you however simply want to use something already available (or have some common sense) then perhaps you can use Microsoft Windows Services for UNIX[^] This link will give you a head-start. http://www.openfree.org/pet/index.php/Mount_an_NFS_share_from_Windows[^] Best Wishes, -David Delaune

      A 1 Reply Last reply
      0
      • A alchong

        I'm thinking about writing an application to access some unix shares from a windows server, is it possible to create an NFS mount in C++?

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Are you wanting to access those shares via UNC?

        "Love people and use things, not love things and use people." - Unknown

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        A 1 Reply Last reply
        0
        • D David Crow

          Are you wanting to access those shares via UNC?

          "Love people and use things, not love things and use people." - Unknown

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          A Offline
          A Offline
          alchong
          wrote on last edited by
          #4

          Yes that's correct, I would like to access it by UNC. Currently we have a batch file that calls some executable nfs.exe ( I think it's a hummingbird's ) which mounts unix shares, which allows us to see those shares from a windows box.

          D 1 Reply Last reply
          0
          • A alchong

            Yes that's correct, I would like to access it by UNC. Currently we have a batch file that calls some executable nfs.exe ( I think it's a hummingbird's ) which mounts unix shares, which allows us to see those shares from a windows box.

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            alchong wrote:

            Yes that's correct, I would like to access it by UNC.

            You appear to have two separate issues here. Mounting shares (using nfs.exe), and accessing them using UNC are not the same thing. For the former, see here. For the latter, unless otherwise indicated, the Win32 API recognizes UNC.

            "Love people and use things, not love things and use people." - Unknown

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            A 1 Reply Last reply
            0
            • L Lost User

              alchong wrote:

              is it possible to create an NFS mount in C++?

              The phrase 'NFS mount' implies a device driver. It is generally not recommended to develop Microsoft Windows device drivers in C++ however it can be done. Microsoft supplies the IFS Kit[^] for developing file systems and file system filters. If you however simply want to use something already available (or have some common sense) then perhaps you can use Microsoft Windows Services for UNIX[^] This link will give you a head-start. http://www.openfree.org/pet/index.php/Mount_an_NFS_share_from_Windows[^] Best Wishes, -David Delaune

              A Offline
              A Offline
              alchong
              wrote on last edited by
              #6

              David, thanks for the response, I think my question may have been too brief, and I think I should explain what I want to do. Basically there are some shares on a Unix machine that I would like to look at and determine the contents. Currently we run a batch file that maps these shares to a drive letter (on a windows box) I'd like to just automate that and add extra code to do some reporting on the file contents. I was hoping to do this in C++, and that some library out there existed that I could use to map these unix shares. I'd eventually like to make it a web service, but that is the next challenge.

              1 Reply Last reply
              0
              • D David Crow

                alchong wrote:

                Yes that's correct, I would like to access it by UNC.

                You appear to have two separate issues here. Mounting shares (using nfs.exe), and accessing them using UNC are not the same thing. For the former, see here. For the latter, unless otherwise indicated, the Win32 API recognizes UNC.

                "Love people and use things, not love things and use people." - Unknown

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                A Offline
                A Offline
                alchong
                wrote on last edited by
                #7

                Thanks for the quick reply, I was thinking about just invoking the executable from an app. I curious if anyone knew if there were any standard WIN32 API that was available.

                D 1 Reply Last reply
                0
                • A alchong

                  Thanks for the quick reply, I was thinking about just invoking the executable from an app. I curious if anyone knew if there were any standard WIN32 API that was available.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  alchong wrote:

                  I curious if anyone knew if there were any standard WIN32 API that was available.

                  Probably, but without knowing what nfs.exe was doing internally, I wouldn't know. You might could use depends.exe to open nfs.exe and see what functions it is importing from the Win32 API. That would give a big clue.

                  "Love people and use things, not love things and use people." - Unknown

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups