Jump to content

a critical Win32 API question!


Recommended Posts

Posted

Hello,

 

I need to be able to detect programaticallly from a Windows

application the appearance of a new drive letter, e.g. z, y, etc.

Ideally I would like to use an event driven approach. Is there a

function in the Win32 API that will allow me to register a callback

function that will be called when driver letters appear(are assigned

by the Windows executive)?

 

Thank you, Bill

  • Replies 1
  • Created
  • Last Reply

Popular Days

Guest Uwe Sieber
Posted

Re: a critical Win32 API question!

 

Vasya wrote:

> Hello,

>

> I need to be able to detect programaticallly from a Windows

> application the appearance of a new drive letter, e.g. z, y, etc.

> Ideally I would like to use an event driven approach. Is there a

> function in the Win32 API that will allow me to register a callback

> function that will be called when driver letters appear(are assigned

> by the Windows executive)?

 

All toplevel windows get an WM_DEVICE_CHANGE

with wParam==DBT_DEVICEARRIVAL, see here:

http://support.microsoft.com/kb/163503

 

This describes CD media insertion and removal

but is identical to whole drive arrivals and

removals (apart from the DBTF_MEDIA flag).

 

Better ask such questions in a programmers group as

microsoft.public.win32.programmer.

 

 

Uwe


×
×
  • Create New...