Beispiel #1
0
BOOL DokanMount(LPCWSTR MountPoint, LPCWSTR DeviceName, PDOKAN_OPTIONS DokanOptions) {

  if (MountPoint != NULL) {
    if (!IsMountPointDriveLetter(MountPoint)) {
      // Unfortunately mount manager is not working as excepted and don't
      // support mount folder on associated IOCTL, which breaks dokan (ghost
      // drive, ...)
      // In that case we cannot use mount manager ; doesn't this should be done
      // kernel-mode too?
      return CreateMountPoint(MountPoint, DeviceName);
	}
  }
  return TRUE;
}
Beispiel #2
0
BOOL
DokanControlMount(
	LPCWSTR	MountPoint,
	LPCWSTR	DeviceName)
{
	ULONG length = wcslen(MountPoint);

	if (length == 1 ||
		(length == 2 && MountPoint[1] == L':') ||
		(length == 3 && MountPoint[1] == L':' && MountPoint[2] == L'\\')) {
		return CreateDriveLetter(MountPoint[0], DeviceName);
	} else if (length > 3) {
		return CreateMountPoint(MountPoint, DeviceName);
	}
	return FALSE; 
}