Click here to Skip to main content
13,095,004 members (85,303 online)
Click here to Skip to main content


318 bookmarked
Posted 19 Jun 2006

Detecting Hardware Insertion and/or Removal

, 19 Jun 2006
A user-mode application to detect hardware add/remove with WM_DEVICECHANGE and RegisterDeviceNotification()
// Microsoft Visual C++ generated include file.
// Used by HWDetect.rc
#define IDM_ABOUTBOX                    0x0010
#define IDD_ABOUTBOX                    100
#define IDS_ABOUTBOX                    101
#define IDD_HWDETECT_DIALOG             102
#define IDR_MAINFRAME                   128
#define IDR_POPUP_MENU                  129
#define IDC_HW_TREE                     1000
#define IDC_EDIT1                       1001
#define IDC_EDIT_LOG                    1001
#define ID_POPUP_ENABLE                 32771
#define ID_POPUP_DISABLE                32772

// Next default values for new objects
#define _APS_NEXT_RESOURCE_VALUE        130
#define _APS_NEXT_COMMAND_VALUE         32773
#define _APS_NEXT_CONTROL_VALUE         1002
#define _APS_NEXT_SYMED_VALUE           101

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Sam NG
Hong Kong Hong Kong
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170813.1 | Last Updated 19 Jun 2006
Article Copyright 2006 by Sam NG
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid