I am working on an application which need to manage (access, create, write, read) files on a distant server and which will mount the storage as a virtual drive/volume on a specified location on the computer (eg. H:), like a local USB device for example.
On Linux, it is possible to do such a thing using FUSE. However, on Windows, there is no equivalent and the only way is to use a driver.
So I started to create a driver using the WDF but I get stuck at the very beginning with the inf file and the minimal code adaptation to fit my needs.
I have looked at many official driver samples (eg. the nonpnp sample) and also many various resources on the internet (eg. OSR Online), but I was not able to get this working.
Steps I have followed
To start my driver project, I created a Kernel Mode Driver (KMDF) in Visual Studio 2013. It is a template project. I was able to set up my whole test environment with this project (test machine + signing stuff + deployment configuration), so these things are properly working.
However, the template project does not fit my needs very well: I need to have a desktop application which will interact with the (sofware-only) driver and which will ask the driver to mount/unmount volumes and give specifics (connection) information for each volume. Based on this, the initial inf file has to be changed because it's for an hardware driver (waiting for a real device being plugged in) which is not the case here. The change of the inf file also implies some changes in the initial code of the template. But, since I started to modify both inf file and code to fit my minimal needs, the driver installation fails during the deployment step.
This is the error I get:
1>------ Début de la génération : Projet : cadwd Package, Configuration : Win7 Debug Win32 ------
1> ..........................
1> Signability test complete.
1>
1> Errors:
1> None
1>
1> Warnings:
1> None
1>
1> Catalog generation complete.
1> C:\project\driver\Win7Debug\cadwd Package\cadwd.cat
1> Done Adding Additional Store
1> Successfully signed: C:\project\driver\Win7Debug\cadwd Package\cadwd.cat
1>
1> Deploying driver files for project "C:\project\driver\cadwd Package\cadwd Package.vcxproj". Deployment may take a few minutes...
1>C:\Program Files (x86)\Windows Kits\8.1\build\Win32\ImportAfter\DriverDeployment.targets(69,9): error : Driver Deployment Task Failed: Default Driver Package Installation Task (possible reboot)
========== Génération : 0 a réussi, 1 a échoué, 1 mis à jour, 0 a été ignoré ==========
Here is the minimal code : https://github.com/gupascal/StackOverflow-Q201503-1. The first commit is the initial code generated by the VS project, the second one shows the current state of my tests (however, I made tons of small tests [none of them worked], and I can't list all of them here).
Can anyone help me on this problem please? I spent a lot of time on this and I am really stuck.
Thanks for your help,
Guillaume