NFS mount via C++?
-
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++?
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
-
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++?
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
-
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
-
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.
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
-
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
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.
-
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
-
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.
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