1 #pragma once 2 3 #define WIN32_NO_STATUS 4 #include <stdarg.h> 5 #include <windef.h> 6 #include <winbase.h> 7 #include <wingdi.h> 8 #include <winuser.h> 9 #include <wincon.h> 10 #include <winreg.h> 11 #include <windowsx.h> 12 #include <commctrl.h> 13 #include <cpl.h> 14 #include <tchar.h> 15 #include <limits.h> 16 #include <setupapi.h> 17 #include <cfgmgr32.h> 18 #include <dbt.h> 19 #include <regstr.h> 20 21 #include "resource.h" 22 23 /* Hotplug Flags */ 24 #define HOTPLUG_DISPLAY_DEVICE_COMPONENTS 0x00000002 25 26 // Globals 27 extern HINSTANCE hApplet; 28 29 // defines 30 #define NUM_APPLETS (1) 31 32 // global structures 33 typedef struct 34 { 35 int idIcon; 36 int idName; 37 int idDescription; 38 APPLET_PROC AppletProc; 39 }APPLET, *PAPPLET; 40 41 typedef struct _HOTPLUG_DATA 42 { 43 HICON hIcon; 44 HICON hIconSm; 45 SP_CLASSIMAGELIST_DATA ImageListData; 46 HMENU hPopupMenu; 47 HWND hwndDeviceTree; 48 DWORD dwFlags; 49 } HOTPLUG_DATA, *PHOTPLUG_DATA; 50 51 // eject.c 52 DEVINST 53 GetDeviceInstForRemoval( 54 _In_ PHOTPLUG_DATA pHotplugData); 55 56 INT_PTR 57 CALLBACK 58 ConfirmRemovalDlgProc( 59 _In_ HWND hwndDlg, 60 _In_ UINT uMsg, 61 _In_ WPARAM wParam, 62 _In_ LPARAM lParam); 63 64 // enum.c 65 VOID 66 EnumHotpluggedDevices( 67 _In_ PHOTPLUG_DATA pHotplugData); 68 69 VOID 70 CfmListEnumDevices( 71 _In_ HWND hwndCfmDeviceList, 72 _In_ PHOTPLUG_DATA pHotplugData); 73 74 // hotplug.c 75 LONG 76 APIENTRY 77 InitApplet( 78 HWND hwnd, 79 UINT uMsg, 80 LPARAM wParam, 81 LPARAM lParam); 82