PC Review


Reply
Thread Tools Rate Thread

a critical Win32 API question!

 
 
Vasya
Guest
Posts: n/a
 
      7th Sep 2008
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
 
Reply With Quote
 
 
 
 
Uwe Sieber
Guest
Posts: n/a
 
      8th Sep 2008
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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Win32 DLL def file question Kid Microsoft VC .NET 4 8th Aug 2008 02:48 AM
Re: Win32 question =?Utf-8?B?Y2FwZXI=?= Microsoft Outlook Discussion 0 28th Aug 2007 03:38 PM
Win32.SillyDI.FG, Win32.BETTInet,HTML.MHTMLREDIR/EXPLOIT,WIN32.SILLYDL.HQ Terry Windows XP New Users 3 8th Apr 2005 03:11 PM
Win32 Resources in .NET Question Christopher Burr Microsoft Dot NET 3 22nd Jan 2004 02:21 PM
FindWinow win32 API question DotNet Microsoft Dot NET 0 30th Oct 2003 08:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:43 AM.