Hello Shaun,
DefineDosDevice() is creating the symbolic link. but when I call
GetLogicalDriveStrings() function it does not return the the newly created
drive letter in the list. What could be the problem?
The SetVolumeMountPoint function need the GUID. If the logical
volume(partition) is created through my application. I do not get the
\?\Volume{GUID}. Is there any way by which I can create it and use it in a
function?
Is there any sample code that explains Mount Manger functionality usage?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shaun
Sent: Tuesday, April 29, 2003 6:29 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to assign a drive letter to
“\device\harddisk1\partition1”?
The simplest way is to crate a symbolic link in the \DosDevices
part of the object directory to your device. In Win32 you would
use DefineDosDevice() and create a link from, e.g. “E:” to
\Device\HardDisk1\Partition1. You can do this in kernel mode using the
IoCreateSymbolicLink() function specifying \DosDevices\E: as the link
name (note on XP you need to specify \Global??\E: instead of
DosDevices). You can use the OBJDIR.EXE program in the DDK to have a
look around the object directory to see how things work.
The, probably more correct, way is to use the mount manager to create
a mount point for the drive letter. Have a look in the MSDN for a
description of the mount manager functions.
Shaun
Tuesday, April 29, 2003, 11:03:18 AM, you wrote:
VK> Hello
VK> I am doing the disk partitioning on win2K. I have the device name
VK> \device\harddisk1\partition1. All the Win2k APIs need the drive letters
as
VK> the parameter(like filecopy). I need to assign the drive letter after
VK> creating the partition. Can somebody help in figuring this out?
VK> Thanks in advance.
VK> Varsha
VK> —
VK> You are currently subscribed to ntdev as: xxxxx@sdlabs.net
VK> To unsubscribe send a blank email to xxxxx@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@oas.co.in
To unsubscribe send a blank email to xxxxx@lists.osr.com