Hi All,
In Win 2000, I have to assign driveletters to multiple partitions on
a removable media.
A driveletter is assigned to the first partition by the OS. By
calling the QueryDosDevice
for that driveletter, I got the devicename for that partition. Now
from that I got the
Harddisk number, but not the partition number.
The string I obtained was “\Device\Harddisk1\DP(1)0-0+4” for the
first
partition with driveletter “F”. Now I have to assign driveletters to
the rest of the partitions.
How can I generate devicenames pointing to the next partitions? Only
if I get the device names,
can I use DefineDosDevice for assigning driveletters. Or Is there
any other method to do that?
Thanks in Advance ,
Anish
Warm Regards
Anish
mailto:xxxxx@nestec.net
Try the following steps
- call FindFirstVolume/FindNextVolume to get the volume name
- issue IOCTL_VOLUME_GET_DEVICE_NUMBER to get the
harddisk nubmer
- Call SetVolumeMountPoint to assign drive letters to the
partitions on the specific harddisk.
Good Luck.
I have not tried those steps before, so please tell me the
result if you success, I realy want to know it.
Best Regards,
Steve Huang
----- Original Message -----
From: ANISH NAIR
To: NT Developers Interest List
Sent: Thursday, August 17, 2000 8:04 PM
Subject: [ntdev] Assigning driveletters to multiple partitions.
>
> Hi All,
>
> In Win 2000, I have to assign driveletters to multiple partitions on
> a removable media.
> A driveletter is assigned to the first partition by the OS. By
> calling the QueryDosDevice
> for that driveletter, I got the devicename for that partition. Now
> from that I got the
> Harddisk number, but not the partition number.
> The string I obtained was “\Device\Harddisk1\DP(1)0-0+4” for the
> first
> partition with driveletter “F”. Now I have to assign driveletters to
> the rest of the partitions.
> How can I generate devicenames pointing to the next partitions? Only
> if I get the device names,
> can I use DefineDosDevice for assigning driveletters. Or Is there
> any other method to do that?
> Thanks in Advance ,
> Anish
>
> Warm Regards
> Anish
My understanding was that removable media did not support multiple
partitions under Win NT/2K. Is this correct?
Greg
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of ANISH NAIR
Sent: Thursday, August 17, 2000 7:05 AM
To: NT Developers Interest List
Subject: [ntdev] Assigning driveletters to multiple partitions.
Hi All,
In Win 2000, I have to assign driveletters to multiple partitions on
a removable media.
A driveletter is assigned to the first partition by the OS. By
calling the QueryDosDevice
for that driveletter, I got the devicename for that partition. Now
from that I got the
Harddisk number, but not the partition number.
The string I obtained was “\Device\Harddisk1\DP(1)0-0+4” for the
first
partition with driveletter “F”. Now I have to assign driveletters to
the rest of the partitions.
How can I generate devicenames pointing to the next partitions? Only
if I get the device names,
can I use DefineDosDevice for assigning driveletters. Or Is there
any other method to do that?
Thanks in Advance ,
Anish
Warm Regards
Anish
mailto:xxxxx@nestec.net
You are currently subscribed to ntdev as: xxxxx@pdq.net
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
Sorry, I didn’t specifically say that the media I am working on can be made
non-removable too, so it can be like a fixed harddisk.
Thanks for the reply.
warm regards
Anish
-----Original Message-----
From: Gregory G. Dyess [mailto:xxxxx@pdq.net]
Sent: Friday, August 18, 2000 5:43 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Assigning driveletters to multiple partitions.
My understanding was that removable media did not support multiple
partitions under Win NT/2K. Is this correct?
Greg
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of ANISH NAIR
Sent: Thursday, August 17, 2000 7:05 AM
To: NT Developers Interest List
Subject: [ntdev] Assigning driveletters to multiple partitions.
Hi All,
In Win 2000, I have to assign driveletters to multiple partitions on
a removable media.
A driveletter is assigned to the first partition by the OS. By
calling the QueryDosDevice
for that driveletter, I got the devicename for that partition. Now
from that I got the
Harddisk number, but not the partition number.
The string I obtained was “\Device\Harddisk1\DP(1)0-0+4” for the
first
partition with driveletter “F”. Now I have to assign driveletters to
the rest of the partitions.
How can I generate devicenames pointing to the next partitions? Only
if I get the device names,
can I use DefineDosDevice for assigning driveletters. Or Is there
any other method to do that?
Thanks in Advance ,
Anish
Warm Regards
Anish
mailto:xxxxx@nestec.net
You are currently subscribed to ntdev as: xxxxx@pdq.net
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
You are currently subscribed to ntdev as: xxxxx@nestec.net
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
take a look at win2000’s volume mount points functions in
http://msdn.microsoft.com/library/psdk/winbase/fsys_419v.htm
and some mount sample at
http://msdn.microsoft.com/library/psdk/winbase/fsys_9v5g.htm
regards
jeseem
mailto:xxxxx@hotmail.com
----- Original Message -----
From: “ANISH NAIR”
To: “NT Developers Interest List”
Sent: Friday, August 18, 2000 8:31 AM
Subject: [ntdev] RE: Assigning driveletters to multiple partitions.
>
> Sorry, I didn’t specifically say that the media I am working on can be
made
> non-removable too, so it can be like a fixed harddisk.
> Thanks for the reply.
>
> warm regards
> Anish
>
> -----Original Message-----
> From: Gregory G. Dyess [mailto:xxxxx@pdq.net]
> Sent: Friday, August 18, 2000 5:43 PM
> To: NT Developers Interest List
> Subject: [ntdev] RE: Assigning driveletters to multiple partitions.
>
>
> My understanding was that removable media did not support multiple
> partitions under Win NT/2K. Is this correct?
>
> Greg
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com]On Behalf Of ANISH NAIR
> > Sent: Thursday, August 17, 2000 7:05 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] Assigning driveletters to multiple partitions.
> >
> >
> >
> > Hi All,
> >
> > In Win 2000, I have to assign driveletters to multiple partitions on
> > a removable media.
> > A driveletter is assigned to the first partition by the OS. By
> > calling the QueryDosDevice
> > for that driveletter, I got the devicename for that partition. Now
> > from that I got the
> > Harddisk number, but not the partition number.
> > The string I obtained was “\Device\Harddisk1\DP(1)0-0+4” for the
> > first
> > partition with driveletter “F”. Now I have to assign driveletters to
> > the rest of the partitions.
> > How can I generate devicenames pointing to the next partitions? Only
> > if I get the device names,
> > can I use DefineDosDevice for assigning driveletters. Or Is there
> > any other method to do that?
> > Thanks in Advance ,
> > Anish
> >
> >
> >
> >
> > Warm Regards
> > Anish
> >
> > mailto:xxxxx@nestec.net
> >
Good morning.
----- Original Message -----
From: ANISH NAIR
To:
Sent: Friday, August 18, 2000 5:10 PM
Subject: RE: [ntdev] Re:Assigning driveletters to multiple partitions.
> Hi,
> First of all, Thanks for ur help. But I couldn’t try these steps,
> because when I use the functions FindFirstVolume/FindNextVolume etc. it
> generates complier error showing these as “undeclared identifier”. I think,
> these function declarations are not there in the windows.h version that I
> have. I don’t know how to get it? Any idea?
Please add the following line at the beginning of your
source file.
#define _WIN32_WINNT 0x500
API prototype definition about Volume Operations are
defined in <winbase.h> which is included in PlatformSDK.
> Also, evenif I try these, will I get the volume name for a raw partition(
> not yet formatted and without driveletter)?
Sure, of course.
Regards,
Steve Huang</winbase.h>
Hi,
I tried this after including the #define _WIN32_WINNT 0x500 in my
source file, but that too doesn’t work. And I searched for the function in
my winbase and windows header files. But couldn’t find it. What could be
done now?
Thanks,
Saritha.
----- Original Message -----
Subject: Re:Assigning driveletters to multiple partitions.
From: “Steve Huang”
Date: Sat, 19 Aug 2000 10:54:35 +0800
X-Message-Number: 26
Good morning.
----- Original Message -----
From: ANISH NAIR
To:
Sent: Friday, August 18, 2000 5:10 PM
Subject: RE: [ntdev] Re:Assigning driveletters to multiple partitions.
> Hi,
> First of all, Thanks for ur help. But I couldn’t try these steps,
> because when I use the functions FindFirstVolume/FindNextVolume etc. it
> generates complier error showing these as “undeclared identifier”. I
think,
> these function declarations are not there in the windows.h version that I
> have. I don’t know how to get it? Any idea?
Please add the following line at the beginning of your
source file.
#define _WIN32_WINNT 0x500
API prototype definition about Volume Operations are
defined in <winbase.h> which is included in PlatformSDK.
> Also, evenif I try these, will I get the volume name for a raw partition(
> not yet formatted and without driveletter)?
Sure, of course.
Regards,
Steve Huang</winbase.h>
----- Original Message -----
From: SARITHA VASUDEVAN
To: NT Developers Interest List
Sent: Saturday, August 19, 2000 12:43 PM
Subject: [ntdev] Re:Assigning driveletters to multiple partitions.
> Hi,
> I tried this after including the #define _WIN32_WINNT 0x500 in my
> source file, but that too doesn’t work. And I searched for the function in
> my winbase and windows header files. But couldn’t find it. What could be
> done now?
I guess that you have not installed Microsoft PlatformSDK.
The API of Volume Operations are defined in the <winbase.h>
which included in PlatformSDK; and not the <winbase.h>
included in VC.
Steve Huang</winbase.h></winbase.h>