https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f8f83d4d4d4b1ccb62a3b…
commit f8f83d4d4d4b1ccb62a3bdc931bc62466932d925
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Thu Sep 20 17:53:08 2018 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Thu Sep 20 17:53:08 2018 +0200
[BTHCI] Add a bluetooth class installer stub.
Now we really need a tango-compatible bluetooth icon!
---
dll/win32/CMakeLists.txt | 1 +
dll/win32/bthci/CMakeLists.txt | 11 +++++++++
dll/win32/bthci/bthci.c | 56 ++++++++++++++++++++++++++++++++++++++++++
dll/win32/bthci/bthci.rc | 23 +++++++++++++++++
dll/win32/bthci/bthci.spec | 1 +
media/inf/bth.inf | 10 ++++++--
6 files changed, 100 insertions(+), 2 deletions(-)
diff --git a/dll/win32/CMakeLists.txt b/dll/win32/CMakeLists.txt
index 91407c7d04..917c43d06d 100644
--- a/dll/win32/CMakeLists.txt
+++ b/dll/win32/CMakeLists.txt
@@ -16,6 +16,7 @@ add_subdirectory(batt)
add_subdirectory(bcrypt)
add_subdirectory(beepmidi)
add_subdirectory(browseui)
+add_subdirectory(bthci)
add_subdirectory(cabinet)
add_subdirectory(cards)
add_subdirectory(cfgmgr32)
diff --git a/dll/win32/bthci/CMakeLists.txt b/dll/win32/bthci/CMakeLists.txt
new file mode 100644
index 0000000000..f8de46d10e
--- /dev/null
+++ b/dll/win32/bthci/CMakeLists.txt
@@ -0,0 +1,11 @@
+
+spec2def(bthci.dll bthci.spec)
+
+add_library(bthci SHARED
+ bthci.c
+ bthci.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/bthci.def)
+
+set_module_type(bthci win32dll UNICODE)
+add_importlibs(bthci msvcrt kernel32 ntdll)
+add_cd_file(TARGET bthci DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/bthci/bthci.c b/dll/win32/bthci/bthci.c
new file mode 100644
index 0000000000..f2e0bc48a3
--- /dev/null
+++ b/dll/win32/bthci/bthci.c
@@ -0,0 +1,56 @@
+/*
+ * PROJECT: ReactOS system libraries
+ * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
+ * PURPOSE: Bluetooth Class installer
+ * COPYRIGHT: Copyright 2018 Eric Kohl (eric.kohl(a)reactos.org)
+ */
+
+#define WIN32_NO_STATUS
+#include <stdarg.h>
+#include <windef.h>
+#include <winbase.h>
+#include <winreg.h>
+#include <winuser.h>
+#include <setupapi.h>
+
+#define NDEBUG
+#include <debug.h>
+
+
+DWORD
+WINAPI
+BluetoothClassInstaller(
+ _In_ DI_FUNCTION InstallFunction,
+ _In_ HDEVINFO DeviceInfoSet,
+ _In_ PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
+{
+ switch (InstallFunction)
+ {
+ default:
+ DPRINT1("Install function %u\n", InstallFunction);
+ return ERROR_DI_DO_DEFAULT;
+ }
+}
+
+
+BOOL
+WINAPI
+DllMain(
+ _In_ HINSTANCE hinstDll,
+ _In_ DWORD dwReason,
+ _In_ LPVOID reserved)
+{
+ switch (dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(hinstDll);
+ break;
+
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+
+ return TRUE;
+}
+
+/* EOF */
diff --git a/dll/win32/bthci/bthci.rc b/dll/win32/bthci/bthci.rc
new file mode 100644
index 0000000000..eaef1c4d08
--- /dev/null
+++ b/dll/win32/bthci/bthci.rc
@@ -0,0 +1,23 @@
+#include <windef.h>
+#include <winuser.h>
+
+//#include "resource.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "Bluetooth Class Installer"
+#define REACTOS_STR_INTERNAL_NAME "bthci"
+#define REACTOS_STR_ORIGINAL_FILENAME "bthci.dll"
+
+#include <reactos/version.rc>
+#include <reactos/manifest_dll.rc>
+
+//IDI_BLUETOOTH ICON "resources/bluetooth.ico"
+
+/* UTF-8 */
+#pragma code_page(65001)
+
+//#ifdef LANGUAGE_EN_US
+// #include "lang/en-US.rc"
+//#endif
diff --git a/dll/win32/bthci/bthci.spec b/dll/win32/bthci/bthci.spec
new file mode 100644
index 0000000000..988207133b
--- /dev/null
+++ b/dll/win32/bthci/bthci.spec
@@ -0,0 +1 @@
+1 stdcall BluetoothClassInstaller(long ptr ptr)
diff --git a/media/inf/bth.inf b/media/inf/bth.inf
index 22960239c0..35f9be39cd 100644
--- a/media/inf/bth.inf
+++ b/media/inf/bth.inf
@@ -6,17 +6,23 @@ Provider=%ReactOS%
DriverVer=03/27/2012,1.0.0
[DestinationDirs]
-DefaultDestDir = 12
+DefaultDestDir = 11
+BluetoothClass.NT.Files = 11
+FreeBT.Files = 12
[ClassInstall32.NT]
AddReg=BluetoothClass.NT.AddReg
+CopyFiles=BluetoothClass.NT.Files
[BluetoothClass.NT.AddReg]
HKR, , , 0, %BluetoothClassName%
HKR, , NoInstallClass, 0, 1
-;HKR,,Installer32,,"bthci.dll,BluetoothClassInstaller"
+HKR, , Installer32, , "bthci.dll,BluetoothClassInstaller"
;HKR, , Icon, 0, "201"
+[BluetoothClass.NT.Files]
+bthci.dll
+
[Manufacturer]
%ReactOS%=ReactOS