Author: janderwald Date: Sun Feb 17 15:51:07 2013 New Revision: 58337
URL: http://svn.reactos.org/svn/reactos?rev=58337&view=rev Log: [HOTPLUG] - start on safely remove hardware applet - resources are not yet commited
Added: trunk/reactos/dll/cpl/hotplug/ (with props) trunk/reactos/dll/cpl/hotplug/CMakeLists.txt (with props) trunk/reactos/dll/cpl/hotplug/enum.c (with props) trunk/reactos/dll/cpl/hotplug/hotplug.c (with props) trunk/reactos/dll/cpl/hotplug/hotplug.h (with props) trunk/reactos/dll/cpl/hotplug/hotplug.rc (with props) trunk/reactos/dll/cpl/hotplug/hotplug.spec (with props) trunk/reactos/dll/cpl/hotplug/resource.h (with props) trunk/reactos/dll/cpl/hotplug/rsrc.rc (with props)
Propchange: trunk/reactos/dll/cpl/hotplug/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Sun Feb 17 15:51:07 2013 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+)
Propchange: trunk/reactos/dll/cpl/hotplug/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/reactos/dll/cpl/hotplug/ ------------------------------------------------------------------------------ bugtraq:url = http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/dll/cpl/hotplug/ ------------------------------------------------------------------------------ tsvn:logminsize = 10
Added: trunk/reactos/dll/cpl/hotplug/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hotplug/CMakeLists.... ============================================================================== --- trunk/reactos/dll/cpl/hotplug/CMakeLists.txt (added) +++ trunk/reactos/dll/cpl/hotplug/CMakeLists.txt [iso-8859-1] Sun Feb 17 15:51:07 2013 @@ -1,0 +1,26 @@ + + +spec2def(hotplug.dll hotplug.spec) + +list(APPEND SOURCE + hotplug.c + enum.c + hotplug.rc + ${CMAKE_CURRENT_BINARY_DIR}/hotplug.def) + +add_library(hotplug SHARED ${SOURCE}) + +set_module_type(hotplug win32dll UNICODE) + +add_importlibs(hotplug + msvcrt + user32 + gdi32 + advapi32 + ntdll + setupapi + comctl32 + kernel32) + +add_pch(hotplug hotplug.h) +add_cd_file(TARGET hotplug DESTINATION reactos/system32 FOR all)
Propchange: trunk/reactos/dll/cpl/hotplug/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/cpl/hotplug/enum.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hotplug/enum.c?rev=... ============================================================================== --- trunk/reactos/dll/cpl/hotplug/enum.c (added) +++ trunk/reactos/dll/cpl/hotplug/enum.c [iso-8859-1] Sun Feb 17 15:51:07 2013 @@ -1,0 +1,7 @@ +/* + * PROJECT: Safely Remove Hardware Applet + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/cpl/hotplug/hotplug.c + * PURPOSE: device enumeration + * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + */
Propchange: trunk/reactos/dll/cpl/hotplug/enum.c ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/cpl/hotplug/hotplug.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hotplug/hotplug.c?r... ============================================================================== --- trunk/reactos/dll/cpl/hotplug/hotplug.c (added) +++ trunk/reactos/dll/cpl/hotplug/hotplug.c [iso-8859-1] Sun Feb 17 15:51:07 2013 @@ -1,0 +1,87 @@ +/* +* PROJECT: Safely Remove Hardware Applet +* LICENSE: GPL - See COPYING in the top level directory +* FILE: dll/cpl/hotplug/hotplug.c +* PURPOSE: applet initialization +* PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) +*/ + +#include "hotplug.h" + +// globals +HINSTANCE hApplet = 0; + +/* Applets */ +APPLET Applets[NUM_APPLETS] = +{ + {IDC_CPLICON, IDS_CPLNAME, IDS_CPLDESCRIPTION, InitApplet} +}; + + +LONG +APIENTRY +InitApplet( + HWND hwnd, + UINT uMsg, + LPARAM wParam, + LPARAM lParam) +{ + // TODO + return FALSE; +} + + +LONG +CALLBACK +CPlApplet( + HWND hwndCPl, + UINT uMsg, + LPARAM lParam1, + LPARAM lParam2) +{ + switch(uMsg) + { + case CPL_INIT: + { + return TRUE; + } + case CPL_GETCOUNT: + { + return NUM_APPLETS; + } + case CPL_INQUIRE: + { + CPLINFO *CPlInfo = (CPLINFO*)lParam2; + CPlInfo->idIcon = Applets[0].idIcon; + CPlInfo->idName = Applets[0].idName; + CPlInfo->idInfo = Applets[0].idDescription; + break; + } + case CPL_DBLCLK: + { + InitApplet(hwndCPl, uMsg, lParam1, lParam2); + break; + } + } + return FALSE; +} + + +INT +WINAPI +DllMain( + HINSTANCE hinstDLL, + DWORD dwReason, + LPVOID lpvReserved) +{ + UNREFERENCED_PARAMETER(lpvReserved); + + switch(dwReason) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + hApplet = hinstDLL; + break; + } + return TRUE; +}
Propchange: trunk/reactos/dll/cpl/hotplug/hotplug.c ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/cpl/hotplug/hotplug.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hotplug/hotplug.h?r... ============================================================================== --- trunk/reactos/dll/cpl/hotplug/hotplug.h (added) +++ trunk/reactos/dll/cpl/hotplug/hotplug.h [iso-8859-1] Sun Feb 17 15:51:07 2013 @@ -1,0 +1,41 @@ +#pragma once + +#define WIN32_NO_STATUS +#include <stdarg.h> +#include <windef.h> +#include <winbase.h> +#include <wingdi.h> +#include <winuser.h> +#include <wincon.h> +#include <commctrl.h> +#include <cpl.h> +#include <tchar.h> +#include <limits.h> + +#include "resource.h" + +// Globals +extern HINSTANCE hApplet; + +// defines +#define NUM_APPLETS (1) + +// global structures +typedef struct +{ + int idIcon; + int idName; + int idDescription; + APPLET_PROC AppletProc; +}APPLET, *PAPPLET; + + + +// hotplug.c +LONG +APIENTRY +InitApplet( + HWND hwnd, + UINT uMsg, + LPARAM wParam, + LPARAM lParam);
Propchange: trunk/reactos/dll/cpl/hotplug/hotplug.h ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/cpl/hotplug/hotplug.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hotplug/hotplug.rc?... ============================================================================== --- trunk/reactos/dll/cpl/hotplug/hotplug.rc (added) +++ trunk/reactos/dll/cpl/hotplug/hotplug.rc [iso-8859-1] Sun Feb 17 15:51:07 2013 @@ -1,0 +1,20 @@ +/* + * PROJECT: ReactOS Safely Remove Hardware Applet + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/cpl/hotplug/hotplug.rc + * PURPOSE: main resource file + * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + */ + +#include <windef.h> +#include <winuser.h> + +#include "resource.h" + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Hardware Safe Removal Support\0" +#define REACTOS_STR_INTERNAL_NAME "hotplug\0" +#define REACTOS_STR_ORIGINAL_FILENAME "hotplug.dll\0" +#include <reactos/version.rc> + +#include "rsrc.rc"
Propchange: trunk/reactos/dll/cpl/hotplug/hotplug.rc ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/cpl/hotplug/hotplug.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hotplug/hotplug.spe... ============================================================================== --- trunk/reactos/dll/cpl/hotplug/hotplug.spec (added) +++ trunk/reactos/dll/cpl/hotplug/hotplug.spec [iso-8859-1] Sun Feb 17 15:51:07 2013 @@ -1,0 +1,12 @@ +@ stdcall CPlApplet(ptr long ptr ptr) +;@ stub HotPlugChildWithInvalidIdW +;@ stub HotPlugDriverBlockedW +;@ stub HotPlugEjectDevice +;@ stub HotPlugEjectDeviceEx +;@ stub HotPlugEjectVetoedW +;@ stub HotPlugHibernateVetoedW +;@ stub HotPlugRemovealVetoedW +;@ stub HotPlugSafeRemovalDriveNotificationW +;@ stub HotPlugSafeRemovalNotificationW +;@ stub HotPlugStandyVetoedW +;@ stub HotPlugWarmEjectVetoedW
Propchange: trunk/reactos/dll/cpl/hotplug/hotplug.spec ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/cpl/hotplug/resource.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hotplug/resource.h?... ============================================================================== --- trunk/reactos/dll/cpl/hotplug/resource.h (added) +++ trunk/reactos/dll/cpl/hotplug/resource.h [iso-8859-1] Sun Feb 17 15:51:07 2013 @@ -1,0 +1,11 @@ + +// dialog ids +#define IDD_SAFE_REMOVE_HARDWARE_DIALOG 100 +#define IDD_CONFIRM_STOP_HARDWARE_DIALOG 101 + +// resource strings ids +#define IDS_CPLNAME 1000 +#define IDS_CPLDESCRIPTION 1001 + +// control ids +#define IDC_CPLICON 10000
Propchange: trunk/reactos/dll/cpl/hotplug/resource.h ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/cpl/hotplug/rsrc.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hotplug/rsrc.rc?rev... ============================================================================== --- trunk/reactos/dll/cpl/hotplug/rsrc.rc (added) +++ trunk/reactos/dll/cpl/hotplug/rsrc.rc [iso-8859-1] Sun Feb 17 15:51:07 2013 @@ -1,0 +1,8 @@ +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#ifdef LANGUAGE_DE_DE + #include "lang/de-DE.rc" +#endif +#ifdef LANGUAGE_EN_US + #include "lang/en-US.rc" +#endif
Propchange: trunk/reactos/dll/cpl/hotplug/rsrc.rc ------------------------------------------------------------------------------ svn:eol-style = native