How to create pseudo drive icon in file manager?

Hi,
how would you go about creating a drive icon in file
manager that “connects” to user or kernel level
program/driver? For example, a parallel port Zip drive
has a file manager icon, and is treated just like a drive.
How DO they do that? :slight_smile:

thanks
andy

The class used in the INF file used to install the driver can influence
this. For, instance any device installed with the IMAGE class name and
class GUID specified in the INF will show up with a camera icon in
DeviceManager.


Bill McKenzie

“Andy Larocco” wrote in message news:xxxxx@ntdev…
>
> Hi,
> how would you go about creating a drive icon in file
> manager that “connects” to user or kernel level
> program/driver? For example, a parallel port Zip drive
> has a file manager icon, and is treated just like a drive.
> How DO they do that? :slight_smile:
>
> thanks
> andy
>
>

He wants a disk icon in file manager, and that is accomplished by appearing
to the system as a disk device.

The sources for disk and classpnp are in the ddk. As I have no idea what
Andy is actually doing, it is difficult to get more specific than that.

-----Original Message-----
From: Bill McKenzie [mailto:xxxxx@bsquare.com]
Sent: Friday, March 29, 2002 1:25 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to create pseudo drive icon in file manager?

The class used in the INF file used to install the driver can
influence this. For, instance any device installed with the
IMAGE class name and class GUID specified in the INF will
show up with a camera icon in DeviceManager.


Bill McKenzie

“Andy Larocco” wrote in message
news:xxxxx@ntdev…
>
> Hi,
> how would you go about creating a drive icon in file
> manager that “connects” to user or kernel level program/driver? For
> example, a parallel port Zip drive has a file manager icon, and is
> treated just like a drive. How DO they do that? :slight_smile:
>
> thanks
> andy
>
>


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to %%email.unsub%%

Wow, need some sleep, sorry about that. How I got device manager out of
that, who knows.


Bill McKenzie

“Roddy, Mark” wrote in message news:xxxxx@ntdev…
>
> He wants a disk icon in file manager, and that is accomplished by
appearing
> to the system as a disk device.
>
> The sources for disk and classpnp are in the ddk. As I have no idea what
> Andy is actually doing, it is difficult to get more specific than that.
>
> > -----Original Message-----
> > From: Bill McKenzie [mailto:xxxxx@bsquare.com]
> > Sent: Friday, March 29, 2002 1:25 PM
> > To: NT Developers Interest List
> > Subject: [ntdev] Re: How to create pseudo drive icon in file manager?
> >
> >
> > The class used in the INF file used to install the driver can
> > influence this. For, instance any device installed with the
> > IMAGE class name and class GUID specified in the INF will
> > show up with a camera icon in DeviceManager.
> >
> > –
> > Bill McKenzie
> >
> >
> >
> > “Andy Larocco” wrote in message
> news:xxxxx@ntdev…
> >
> > Hi,
> > how would you go about creating a drive icon in file
> > manager that “connects” to user or kernel level program/driver? For
> > example, a parallel port Zip drive has a file manager icon, and is
> > treated just like a drive. How DO they do that? :slight_smile:
> >
> > thanks
> > andy
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@stratus.com To
> unsubscribe send a blank email to %%email.unsub%%
>
>

It is done in the registry. Search KB.

Jamey Kirby
StorageCraft, inc.
xxxxx@storagecraft.com
www.storagecraft.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Andy Larocco
Sent: Friday, March 29, 2002 9:12 AM
To: NT Developers Interest List
Subject: [ntdev] How to create pseudo drive icon in file manager?

Hi,
how would you go about creating a drive icon in file
manager that “connects” to user or kernel level
program/driver? For example, a parallel port Zip drive
has a file manager icon, and is treated just like a drive.
How DO they do that? :slight_smile:

thanks
andy


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%

Hi Andy,

I wrote the code to display those nifty Iomega icons for Zip and other
Iomega drives. There may be a new way to do it for Win2K and XP but
to get it to work under Win9X, NT 3.5 and 4X I had to spend about two
weeks tracing through the Shell’s internals and watching window
messages with Spy.

I ended up creating a global Window hook that monitors the creation of
top level Windows and then hooks the Shell and Explorer windows as
they are created. The window hooks monitor the tree view messages
going to the shell and Explorer windows and replaces the original
icons when it see the the SetIcon request. It is harder than it
appears because the code has to attach to each individual process and
thread that is created by the shell and IE Explorer. Also the message
structures being used were not documented and they changed with with
each new release of Windows.

I didn’t receive a request to update the code for Win2K or XP so I
assume Microsoft has implemented a new way to set the icons or they
didn’t change the structures in the newer OS releases.

John Hensley
SmartSoft

On Fri, 29 Mar 2002 12:11:40 -0500, “Andy Larocco”
wrote:

>
>Hi,
>how would you go about creating a drive icon in file
>manager that “connects” to user or kernel level
>program/driver? For example, a parallel port Zip drive
>has a file manager icon, and is treated just like a drive.
> How DO they do that? :slight_smile:
>
>thanks
>andy
>

What OS?

On w2k and XP, they just have a disk class driver for it, which possibly registers PartMgr as an upper filter.
PartMgr then does all of the job of registering the disk in MountMgr, which in turn causes the drive letter to appear.

So, write a disk class driver or a SCSI miniport to maintain your disk.

Max

----- Original Message -----
From: “Andy Larocco”
To: “NT Developers Interest List”
Sent: Friday, March 29, 2002 8:11 PM
Subject: [ntdev] How to create pseudo drive icon in file manager?

> Hi,
> how would you go about creating a drive icon in file
> manager that “connects” to user or kernel level
> program/driver? For example, a parallel port Zip drive
> has a file manager icon, and is treated just like a drive.
> How DO they do that? :slight_smile:
>
> thanks
> andy
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>

> I ended up creating a global Window hook that monitors the creation of

top level Windows and then hooks the Shell and Explorer windows as
they are created.

Its is better to replace the shell’s “Drive” COM class with your own, which will send some IOCTLs to the disk driver in icon
handling path.
COM hooking is rather easy.

Max

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Dr
iveI
cons

For each drive letter, do something like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Dr
iveI
cons\F\DefaultIcon
(default) REG_SZ c:\MYICON.ICO
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Dr
iveI
cons\F\DefaultLable
(default) REG_SZ “My Drive”

These icons can also be changed dynamically by the software in response
to state changes in the button status and write protect status. Simply
change the registry setting and issue a WM_DEVICECHANGE message. All
windows will be refreshed with the new icon and label.

Jamey Kirby
StorageCraft, inc.
xxxxx@storagecraft.com
www.storagecraft.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Saturday, March 30, 2002 1:30 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to create pseudo drive icon in file manager?

What OS?

On w2k and XP, they just have a disk class driver for it, which possibly
registers PartMgr as an upper filter.
PartMgr then does all of the job of registering the disk in MountMgr,
which in turn causes the drive letter to appear.

So, write a disk class driver or a SCSI miniport to maintain your disk.

Max

----- Original Message -----
From: “Andy Larocco”
To: “NT Developers Interest List”
Sent: Friday, March 29, 2002 8:11 PM
Subject: [ntdev] How to create pseudo drive icon in file manager?

> Hi,
> how would you go about creating a drive icon in file
> manager that “connects” to user or kernel level
> program/driver? For example, a parallel port Zip drive
> has a file manager icon, and is treated just like a drive.
> How DO they do that? :slight_smile:
>
> thanks
> andy
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%

On Sun, 31 Mar 2002 01:01:07 +0300, “Maxim S. Shatskih”
wrote:

>
>> I ended up creating a global Window hook that monitors the creation of
>> top level Windows and then hooks the Shell and Explorer windows as
>> they are created.
>
>Its is better to replace the shell’s “Drive” COM class with your own, which will send some IOCTLs to the disk driver in icon
>handling path.
>COM hooking is rather easy.
>
> Max

I couldn’t finda a way to make this work under earlier versions of
Windows 9x and NT 4. The Drive COM class only controled the drive
context menus and not the drive icons under these ealier versions. I
spoke with the Shell development team at Microsoft in the spring of
'95 hoping to convience them to add a COM interface for the icons but
they were close to shipping and brushed off the suggestion and thus I
had to find another way to change the icons. The Zip tools do use the
COM approach for modifying the drive context menus.

…John