1 /* 2 * PROJECT: Safely Remove Hardware Applet 3 * LICENSE: GPL - See COPYING in the top level directory 4 * FILE: dll/cpl/hotplug/hotplug.c 5 * PURPOSE: applet initialization 6 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) 7 */ 8 9 #include "hotplug.h" 10 11 // globals 12 HINSTANCE hApplet = 0; 13 14 /* Applets */ 15 APPLET Applets[NUM_APPLETS] = 16 { 17 {IDC_CPLICON, IDS_CPLNAME, IDS_CPLDESCRIPTION, InitApplet} 18 }; 19 20 21 LONG 22 APIENTRY 23 InitApplet( 24 HWND hwnd, 25 UINT uMsg, 26 LPARAM wParam, 27 LPARAM lParam) 28 { 29 // TODO 30 return FALSE; 31 } 32 33 34 LONG 35 CALLBACK 36 CPlApplet( 37 HWND hwndCPl, 38 UINT uMsg, 39 LPARAM lParam1, 40 LPARAM lParam2) 41 { 42 switch(uMsg) 43 { 44 case CPL_INIT: 45 { 46 return TRUE; 47 } 48 case CPL_GETCOUNT: 49 { 50 return NUM_APPLETS; 51 } 52 case CPL_INQUIRE: 53 { 54 CPLINFO *CPlInfo = (CPLINFO*)lParam2; 55 CPlInfo->idIcon = Applets[0].idIcon; 56 CPlInfo->idName = Applets[0].idName; 57 CPlInfo->idInfo = Applets[0].idDescription; 58 break; 59 } 60 case CPL_DBLCLK: 61 { 62 InitApplet(hwndCPl, uMsg, lParam1, lParam2); 63 break; 64 } 65 } 66 return FALSE; 67 } 68 69 70 INT 71 WINAPI 72 DllMain( 73 HINSTANCE hinstDLL, 74 DWORD dwReason, 75 LPVOID lpvReserved) 76 { 77 UNREFERENCED_PARAMETER(lpvReserved); 78 79 switch(dwReason) 80 { 81 case DLL_PROCESS_ATTACH: 82 case DLL_THREAD_ATTACH: 83 hApplet = hinstDLL; 84 break; 85 } 86 return TRUE; 87 } 88