Dokan

user mode file system for windows    >>Japanese version

How to build Dokan library

Build Envrionment

You need WDK(Windows Driver Kit). You can get WDK through Microsoft Connect Web site for free.
http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx
https://connect.microsoft.com

Build

When you unzip the dokan source codes, you can get the following folders.

  • \dokan (user-mode library dokan.dll)
  • \dokan_control (control program dokanctrl.exe)
  • \dokan_mirror (sample program)
  • \dokan_mount (mount service mounter.exe)
  • \sys (driver dokan.sys)

After installing WDK, launch the build environment from the Start menu. Change the directory to dokan source code.
Run “build /wcbg” command within each folders.

Install Driver

Now you can get binary programs for example under “\dokan\objchk_wlh_x86\i386″.
You need dokan.dll dokan.sys dokanctrl.exe mounter.exe mirror.exe

Copy dokan.sys under \Windows\system32\drivers
Copy dokan.dll under \Windows\system32
Place dokanctl.exe and mounter.exe in the same folder.

Run “dokanctrl.exe /i a” This means register the driver and the service to Windows.
You can also do them separately.
“dokanctrl.exe /i d” Install driver.
“dokanctrl.exe /i s” install service.

If you update your driver, you MUST restart your computer after uninstalling previous version.

Test the driver

You can get version information when you run “dokanctrl.exe /v”.

Sample program

Run “mirror.exe c:\ m”. This means mirror C drive under M drive. Can you see M drive?
To unmount M drive, run “dokanctl.exe /u m”

Uninstall Driver

“dokanctrl.exe /r a” Uninstall both driver and service.
“dokanctrl.exe /r d” Uninstall driver.
“dokanctrl.exe /r s” Uninstall service.
You should restart your computer after uninstalling driver.