[BTHCI] Add a bluetooth class installer stub.
authorEric Kohl <eric.kohl@reactos.org>
Thu, 20 Sep 2018 15:53:08 +0000 (17:53 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Thu, 20 Sep 2018 15:53:08 +0000 (17:53 +0200)
Now we really need a tango-compatible bluetooth icon!

dll/win32/CMakeLists.txt
dll/win32/bthci/CMakeLists.txt [new file with mode: 0644]
dll/win32/bthci/bthci.c [new file with mode: 0644]
dll/win32/bthci/bthci.rc [new file with mode: 0644]
dll/win32/bthci/bthci.spec [new file with mode: 0644]
media/inf/bth.inf

index 91407c7..917c43d 100644 (file)
@@ -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 (file)
index 0000000..f8de46d
--- /dev/null
@@ -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 (file)
index 0000000..f2e0bc4
--- /dev/null
@@ -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@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 (file)
index 0000000..eaef1c4
--- /dev/null
@@ -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 (file)
index 0000000..9882071
--- /dev/null
@@ -0,0 +1 @@
+1 stdcall BluetoothClassInstaller(long ptr ptr)
index 2296023..35f9be3 100644 (file)
@@ -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