16#define DISPLAY_NAME_LEN 40
47 DWORD dwCapabilities = 0,
dwSize =
sizeof(dwCapabilities);
48 ULONG ulStatus = 0, ulProblem = 0;
126 TRACE(
"Hotplug_Init\n");
141 TRACE(
"Hotplug_Update\n");
147 TRACE(
"Hotplug_Shutdown\n");
160 L"shell32.dll,Control_RunDLL hotplug.dll",
176 StrCpyW(dispName,
L"Unknown Device");
247 TRACE(
"HotplugDeviceTimer()\n");
265 TRACE(
"Hotplug_Message: WM_USER+220\n");
282 TRACE(
"Hotplug_Message: WM_USER+221\n");
337 TRACE(
"WM_DEVICECHANGE : DBT_DEVNODES_CHANGED\n");
361 TRACE(
"Hotplug_Message received for unknown ID %d, ignoring.\n");
#define STDMETHODCALLTYPE
#define CM_DEVCAP_EJECTSUPPORTED
#define CM_DRP_CAPABILITIES
#define CM_DRP_DEVICEDESC
#define CM_Get_DevNode_Registry_Property
#define CM_Request_Device_Eject_Ex
#define CM_DEVCAP_SURPRISEREMOVALOK
#define CM_DEVCAP_DOCKDEVICE
#define CM_DEVCAP_REMOVABLE
CONFIGRET WINAPI CM_Get_DevNode_Status(_Out_ PULONG pulStatus, _Out_ PULONG pulProblemNumber, _In_ DEVINST dnDevInst, _In_ ULONG ulFlags)
void __cdecl Format(UINT nFormatID,...)
#define DBT_DEVICEREMOVEPENDING
#define DBT_DEVNODES_CHANGED
#define DBT_DEVICEQUERYREMOVE
#define DBT_DEVICEARRIVAL
#define DBT_DEVICEREMOVECOMPLETE
#define DBT_DEVICEQUERYREMOVEFAILED
#define HOTPLUG_SERVICE_FLAG
#define HOTPLUG_DEVICE_TIMER_ID
#define IDS_HOTPLUG_REMOVE_1
#define IDS_HOTPLUG_REMOVE_2
#define IDS_HOTPLUG_REMOVE_3
#define INVALID_HANDLE_VALUE
#define ERROR_NO_MORE_ITEMS
BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO devinfo, DWORD index, PSP_DEVINFO_DATA info)
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
LPWSTR WINAPI StrCpyW(LPWSTR lpszStr, LPCWSTR lpszSrc)
HRESULT NotifyBalloon(CSysTray *pSysTray, LPCWSTR szTitle=NULL, LPCWSTR szInfo=NULL, UINT uId=ID_ICON_HOTPLUG)
HRESULT STDMETHODCALLTYPE Hotplug_Init(_In_ CSysTray *pSysTray)
HRESULT EnumHotpluggedDevices(CSimpleArray< DEVINST > &devList)
HRESULT STDMETHODCALLTYPE Hotplug_Shutdown(_In_ CSysTray *pSysTray)
HRESULT STDMETHODCALLTYPE Hotplug_Message(_In_ CSysTray *pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)
VOID HotplugDeviceTimer(_In_ CSysTray *pSysTray)
static WCHAR g_strMenuSel[DISPLAY_NAME_LEN]
static HICON g_hIconHotplug
HRESULT STDMETHODCALLTYPE Hotplug_Update(_In_ CSysTray *pSysTray)
static void _ShowContextMenuR(CSysTray *pSysTray)
CSimpleArray< DEVINST > g_devList
CString g_strHotplugTooltip
static void _RunHotplug(CSysTray *pSysTray)
static void _ShowContextMenu(CSysTray *pSysTray)
TCHAR szTitle[MAX_LOADSTRING]
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define SetupDiGetClassDevs
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
DWORD WINAPI GetLastError(void)
HMENU WINAPI CreatePopupMenu(void)
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
UINT WINAPI GetDoubleClickTime(void)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define MB_ICONEXCLAMATION
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
BOOL WINAPI DestroyIcon(_In_ HICON)