Re: WM_DEVICECHANGE and Windows Vista
- From: hdang <hdang@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 9 Sep 2009 08:00:01 -0700
Ah, that could be the problem. I'm logged into the computer as a user that's
part of the Domain Administrators group and am mapping the network drive
using the same user account. So if I select "Run as administrator", is the
application running in the context of the local Administrator account? Is
there a way to get notified of WM_DEVICECHANGE messages for network drives
regardless of user context?
"Scot T Brennecke" wrote:
hdang wrote:.
I've got an application that uses WM_DEVICECHANGE (via CWnd::OnDeviceChange)
to detect when logical volumes are added to/removed from a system. I've
noticed a peculiar behavior when running the application under Windows Vista.
If I run the application with standard user rights, the application catches
the WM_DEVICECHANGE message and is able to detect when logical volumes (both
local and network) are added to/removed from the system as expected.
However, when running the application as an Administrator (i.e., right-click
the application and select "Run as administrator"), the application only
catches the WM_DEVICECHANGE message when a local logical volume is
added/removed. It is not able to detect when network logical volumes are
added/removed (i.e., if the application is running and I map a network drive,
the application does not detect that the network drive has just been mapped).
Has anyone run into this problem before?
Are you mapping the network drive as the Administrator user, or as a standard user? If the application is not running in the same
user context, it will most likely not be notified.
- Follow-Ups:
- Re: WM_DEVICECHANGE and Windows Vista
- From: Mikep
- Re: WM_DEVICECHANGE and Windows Vista
- References:
- WM_DEVICECHANGE and Windows Vista
- From: hdang
- Re: WM_DEVICECHANGE and Windows Vista
- From: Scot T Brennecke
- WM_DEVICECHANGE and Windows Vista
- Prev by Date: SetTimer not calling OnTimer?
- Next by Date: Re: How to convert 2 WCHAR to 1 WCHAR
- Previous by thread: Re: WM_DEVICECHANGE and Windows Vista
- Next by thread: Re: WM_DEVICECHANGE and Windows Vista
- Index(es):
Relevant Pages
|