diff options
-rw-r--r-- | project/VS2010Express/XBMC.vcxproj | 2 | ||||
-rw-r--r-- | project/VS2010Express/XBMC.vcxproj.filters | 6 | ||||
-rw-r--r-- | xbmc/Application.cpp | 3 | ||||
-rw-r--r-- | xbmc/win32/WIN32USBScan.cpp | 15 | ||||
-rw-r--r-- | xbmc/win32/WIN32USBScan.h | 5 |
5 files changed, 31 insertions, 0 deletions
diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj index 6383f120cd..4f96dad400 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -818,6 +818,7 @@ <ClCompile Include="..\..\xbmc\win32\strverscmp.cpp" /> <ClCompile Include="..\..\xbmc\win32\Win32DelayedDllLoad.cpp" /> <ClCompile Include="..\..\xbmc\win32\win32env.cpp" /> + <ClCompile Include="..\..\xbmc\win32\WIN32USBScan.cpp" /> <ClCompile Include="..\..\xbmc\win32\WIN32Util.cpp" /> <ClCompile Include="..\..\xbmc\win32\WINDirectSound.cpp" /> <ClCompile Include="..\..\xbmc\win32\WindowHelper.cpp" /> @@ -1644,6 +1645,7 @@ <ClInclude Include="..\..\xbmc\ViewState.h" /> <ClInclude Include="..\..\xbmc\win32\pch.h" /> <ClInclude Include="..\..\xbmc\win32\PlatformDefs.h" /> + <ClInclude Include="..\..\xbmc\win32\WIN32USBScan.h" /> <ClInclude Include="..\..\xbmc\XBDateTime.h" /> <CustomBuild Include="..\..\xbmc\win32\PlatformInclude.h"> <Command Condition="'$(Configuration)|$(Platform)'=='Release (DirectX)|Win32'">update_git_rev.bat</Command> diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters index ed1eb85114..684954bc6e 100644 --- a/project/VS2010Express/XBMC.vcxproj.filters +++ b/project/VS2010Express/XBMC.vcxproj.filters @@ -1820,6 +1820,9 @@ <ClCompile Include="..\..\xbmc\settings\VideoSettings.cpp"> <Filter>settings</Filter> </ClCompile> + <ClCompile Include="..\..\xbmc\win32\WIN32USBScan.cpp"> + <Filter>win32</Filter> + </ClCompile> <ClCompile Include="..\..\xbmc\storage\AutorunMediaJob.cpp"> <Filter>storage</Filter> </ClCompile> @@ -4288,6 +4291,9 @@ <ClInclude Include="..\..\xbmc\settings\VideoSettings.h"> <Filter>settings</Filter> </ClInclude> + <ClInclude Include="..\..\xbmc\win32\WIN32USBScan.h"> + <Filter>win32</Filter> + </ClInclude> <ClInclude Include="..\..\xbmc\storage\AutorunMediaJob.h"> <Filter>storage</Filter> </ClInclude> diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index b7fc2e20f1..85bf328b65 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -234,6 +234,7 @@ #ifdef _WIN32 #include <shlobj.h> #include "win32util.h" +#include "win32/WIN32USBScan.h" #endif #ifdef HAS_XRANDR #include "windowing/X11/XRandR.h" @@ -464,6 +465,8 @@ bool CApplication::Create() /* install win32 exception translator, win32 exceptions * can now be caught using c++ try catch */ win32_exception::install_handler(); + + CWIN32USBScan(); #endif // only the InitDirectories* for the current platform should return true diff --git a/xbmc/win32/WIN32USBScan.cpp b/xbmc/win32/WIN32USBScan.cpp new file mode 100644 index 0000000000..eb4225db73 --- /dev/null +++ b/xbmc/win32/WIN32USBScan.cpp @@ -0,0 +1,15 @@ +#include <setupapi.h> +#include "WIN32USBScan.h" + +CWIN32USBScan::CWIN32USBScan() +{ + HDEVINFO hDevInfo; + SP_DEVINFO_DATA DeviceInfoData; + + hDevInfo = SetupDiGetClassDevs(NULL, 0, 0, DIGCF_PRESENT | DIGCF_ALLCLASSES); + DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); + for (DWORD i = 0; SetupDiEnumDeviceInfo(hDevInfo, i, &DeviceInfoData); i++) + { + + } +}
\ No newline at end of file diff --git a/xbmc/win32/WIN32USBScan.h b/xbmc/win32/WIN32USBScan.h new file mode 100644 index 0000000000..f580911b55 --- /dev/null +++ b/xbmc/win32/WIN32USBScan.h @@ -0,0 +1,5 @@ +class CWIN32USBScan +{ + public: + CWIN32USBScan(); +};
\ No newline at end of file |