[QMGR][BOOTDATA]
authorThomas Faber <thomas.faber@reactos.org>
Thu, 1 May 2014 19:50:37 +0000 (19:50 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Thu, 1 May 2014 19:50:37 +0000 (19:50 +0000)
- Properly register qmgr classes and create the BITS service. See https://source.winehq.org/git/wine.git/commitdiff/c1fce745
CORE-8135 #resolve

svn path=/trunk/; revision=63097

reactos/boot/bootdata/hivesft.inf
reactos/boot/bootdata/hivesys.inf
reactos/dll/win32/qmgr/CMakeLists.txt
reactos/dll/win32/qmgr/qmgr.inf [deleted file]
reactos/dll/win32/qmgr/qmgr.rgs [new file with mode: 0644]
reactos/dll/win32/qmgr/qmgr_main.c
reactos/dll/win32/qmgr/rsrc.rc

index d862f46..ee01f68 100644 (file)
@@ -1342,7 +1342,7 @@ HKLM,"SOFTWARE\Microsoft\Ole","EnableRemoteConnect",0x00000000,"N"
 \r
 ; SvcHost services\r
 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost",,0x00000012\r
-HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost", "netsvcs",0x00010000,"DHCP"\r
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost", "netsvcs",0x00010000,"DHCP","BITS"\r
 \r
 ; Win32 config\r
 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows",,0x00000012\r
index 7d8858c..8433438 100644 (file)
@@ -1304,6 +1304,16 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Beep","ImagePath",0x00020000,"system32\d
 HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Start",0x00010001,0x00000001
 HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Type",0x00010001,0x00000001
 
+; Background Intelligent Transfer Service (BITS)
+HKLM,"SYSTEM\CurrentControlSet\Services\BITS","DisplayName",0x00000000,"BITS"
+HKLM,"SYSTEM\CurrentControlSet\Services\BITS","Description",0x00000000,"Background Intelligent Transfer Service (BITS)"
+HKLM,"SYSTEM\CurrentControlSet\Services\BITS","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\BITS","ImagePath",0x00020000,"%SystemRoot%\system32\svchost.exe -k netsvcs"
+HKLM,"SYSTEM\CurrentControlSet\Services\BITS","ObjectName",0x00000000,"LocalSystem"
+HKLM,"SYSTEM\CurrentControlSet\Services\BITS","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\BITS","Type",0x00010001,0x00000020
+HKLM,"SYSTEM\CurrentControlSet\Services\BITS\Parameters","ServiceDll",0x00020000,"%SystemRoot%\system32\qmgr.dll"
+
 ; BlueScreen device driver
 HKLM,"SYSTEM\CurrentControlSet\Services\Blue","ErrorControl",0x00010001,0x00000000
 HKLM,"SYSTEM\CurrentControlSet\Services\Blue","Group",0x00000000,"Video Init"
@@ -1393,13 +1403,6 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","ImagePath",0x00020000,"system32
 HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Start",0x00010001,0x00000001
 HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Type",0x00010001,0x00000008
 
-; Kernel-Mode Tests
-;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","ErrorControl",0x00010001,0x00000000
-;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Group",0x00000000,"Base"
-;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","ImagePath",0x00020000,"system32\drivers\kmtest.sys"
-;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Start",0x00010001,0x00000001
-;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Type",0x00010001,0x00000001
-
 ; Keyboard class driver
 HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","ErrorControl",0x00010001,0x00000000
 HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","Group",0x00000000,"Keyboard Class"
index e3cdc68..c1695c2 100644 (file)
@@ -21,7 +21,7 @@ add_library(qmgr SHARED
     rsrc.rc
     ${CMAKE_CURRENT_BINARY_DIR}/qmgr.def)
 
-set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qmgr.inf)
+set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qmgr.rgs)
 add_idl_headers(qmgr_idlheader qmgr_local.idl)
 set_module_type(qmgr win32dll)
 target_link_libraries(qmgr uuid wine)
diff --git a/reactos/dll/win32/qmgr/qmgr.inf b/reactos/dll/win32/qmgr/qmgr.inf
deleted file mode 100644 (file)
index c3d0380..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-[version]
-Signature="$CHICAGO$"
-
-[RegisterDll]
-AddReg = Qmgr.Reg
-
-[UnregisterDll]
-DelReg = Qmgr.Reg
-
-[Qmgr.Reg]
-HKCR,"AppID\BITS","AppID",,"%CLSID_BackgroundCopyQMgr%"
-HKCR,"AppID\%CLSID_BackgroundCopyQMgr%","LocalService",,"BITS"
-HKCR,"CLSID\%CLSID_BackgroundCopyManager%","AppID",,"%CLSID_BackgroundCopyQMgr%"
-
-HKLM,"Software\Microsoft\Windows NT\CurrentVersion\SvcHost","netsvcs",0x00010008,"BITS"
-HKLM,"System\CurrentControlSet\Services\BITS\Parameters","ServiceDll",0x00020000,"qmgr.dll"
diff --git a/reactos/dll/win32/qmgr/qmgr.rgs b/reactos/dll/win32/qmgr/qmgr.rgs
new file mode 100644 (file)
index 0000000..675505e
--- /dev/null
@@ -0,0 +1,15 @@
+HKCR
+{
+    NoRemove AppID
+    {
+        '{69AD4AEE-51BE-439B-A92C-86AE490E8B30}' { val LocalService = s 'BITS' }
+        BITS { val AppID = s '{69AD4AEE-51BE-439B-A92C-86AE490E8B30}' }
+    }
+    NoRemove CLSID
+    {
+        '{4991D34B-80A1-4291-83B6-3328366B9097}'
+        {
+            val AppID = s '{69AD4AEE-51BE-439B-A92C-86AE490E8B30}'
+        }
+    }
+}
index 31ff890..7576e4a 100644 (file)
 #include <winreg.h>
 #include <advpub.h>
 #include <olectl.h>
+#include <rpcproxy.h>
 #include <initguid.h>
 
 /* Handle to the base address of this DLL */
 static HINSTANCE hInst;
 
-/* Other GUIDs used by this module */
-DEFINE_GUID(CLSID_BackgroundCopyQMgr, 0x69AD4AEE, 0x51BE, 0x439b, 0xA9,0x2C, 0x86,0xAE,0x49,0x0E,0x8B,0x30);
-
 /* Entry point for DLL */
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
@@ -55,81 +53,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
     return TRUE;
 }
 
-static HRESULT init_register_strtable(STRTABLEA *strtable)
-{
-#define CLSID_EXPANSION_ENTRY(id) { "CLSID_" #id, &CLSID_ ## id }
-    static const struct {
-        const char *name;
-        const CLSID *clsid;
-    } expns[] =  {
-        CLSID_EXPANSION_ENTRY(BackgroundCopyQMgr),
-        CLSID_EXPANSION_ENTRY(BackgroundCopyManager)
-    };
-#undef CLSID_EXPANSION_ENTRY
-    static STRENTRYA pse[sizeof expns / sizeof expns[0]];
-    DWORD i;
-
-    strtable->cEntries = sizeof pse / sizeof pse[0];
-    strtable->pse = pse;
-    for (i = 0; i < strtable->cEntries; i++) {
-        static const char dummy_sample[] = "{12345678-1234-1234-1234-123456789012}";
-        const CLSID *clsid = expns[i].clsid;
-        pse[i].pszName = qmgr_strdup(expns[i].name);
-        pse[i].pszValue = HeapAlloc(GetProcessHeap(), 0, sizeof dummy_sample);
-        if (!pse[i].pszName || !pse[i].pszValue)
-            return E_OUTOFMEMORY;
-        sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
-                clsid->Data1, clsid->Data2, clsid->Data3, clsid->Data4[0],
-                clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], clsid->Data4[4],
-                clsid->Data4[5], clsid->Data4[6], clsid->Data4[7]);
-    }
-
-    return S_OK;
-}
-
-static void cleanup_register_strtable(STRTABLEA *strtable)
-{
-    DWORD i;
-    for (i = 0; i < strtable->cEntries; i++) {
-        HeapFree(GetProcessHeap(), 0, strtable->pse[i].pszName);
-        HeapFree(GetProcessHeap(), 0, strtable->pse[i].pszValue);
-        if (!strtable->pse[i].pszName || !strtable->pse[i].pszValue)
-            return;
-    }
-}
-
-/* Use an INF file to register or unregister the DLL */
-static HRESULT register_server(BOOL do_register)
-{
-    HRESULT hr;
-    STRTABLEA strtable;
-    HMODULE hAdvpack;
-    HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
-    static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
-
-    TRACE("(%x)\n", do_register);
-
-    hAdvpack = LoadLibraryW(wszAdvpack);
-    pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
-
-    hr = init_register_strtable(&strtable);
-    if (SUCCEEDED(hr))
-        hr = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll",
-                         &strtable);
-    cleanup_register_strtable(&strtable);
-
-    if (FAILED(hr))
-        ERR("RegInstall failed: %08x\n", hr);
-
-    return hr;
-}
-
 HRESULT WINAPI DllRegisterServer(void)
 {
-    return register_server(TRUE);
+    return __wine_register_resources(hInst);
 }
 
 HRESULT WINAPI DllUnregisterServer(void)
 {
-    return register_server(FALSE);
+    return __wine_unregister_resources(hInst);
 }
index dfc64d0..66fd2a5 100644 (file)
@@ -16,5 +16,5 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-/* @makedep: qmgr.inf */
-REGINST REGINST qmgr.inf
+/* @makedep: qmgr.rgs */
+1 WINE_REGISTRY qmgr.rgs