[COMCTL32] Install comctl32 v6 and its manifest in first stage
[reactos.git] / dll / win32 / comctl32 / commctrl.c
index e091ccc..df063c0 100644 (file)
@@ -129,64 +129,6 @@ static WCHAR* GetManifestPath(BOOL create, BOOL bV6)
     return pwszBuf;
 }
 
-static BOOL create_manifest(BOOL install, BOOL bV6)
-{
-    WCHAR *pwszBuf;
-    HRSRC hResInfo;
-    HGLOBAL hResData;
-    PVOID pManifest;
-    DWORD cbManifest, cbWritten;
-    HANDLE hFile;
-    BOOL bRet = FALSE;
-
-    if (bV6)
-        hResInfo = FindResourceW(COMCTL32_hModule, L"WINE_MANIFEST", (LPWSTR)RT_MANIFEST);
-    else
-        hResInfo = FindResourceW(COMCTL32_hModule, L"WINE_MANIFESTV5", (LPWSTR)RT_MANIFEST);
-
-    if (!hResInfo)
-        return FALSE;
-
-    cbManifest = SizeofResource(COMCTL32_hModule, hResInfo);
-    if (!cbManifest)
-        return FALSE;
-
-    hResData = LoadResource(COMCTL32_hModule, hResInfo);
-    if (!hResData)
-        return FALSE;
-
-    pManifest = LockResource(hResData);
-    if (!pManifest)
-        return FALSE;
-
-    pwszBuf = GetManifestPath(TRUE, bV6);
-    if (!pwszBuf)
-        return FALSE;
-
-    if (install)
-    {
-        hFile = CreateFileW(pwszBuf, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
-        if (hFile != INVALID_HANDLE_VALUE)
-        {
-            if (WriteFile(hFile, pManifest, cbManifest, &cbWritten, NULL) && cbWritten == cbManifest)
-                bRet = TRUE;
-
-            CloseHandle(hFile);
-
-            if (!bRet)
-                DeleteFileW(pwszBuf);
-            else
-                TRACE("created %s\n", debugstr_w(pwszBuf));
-        }
-    }
-    else
-        bRet = DeleteFileW(pwszBuf);
-
-    HeapFree(GetProcessHeap(), 0, pwszBuf);
-
-    return bRet;
-}
-
 static HANDLE CreateComctl32ActCtx(BOOL bV6)
 {
     HANDLE ret;
@@ -1179,21 +1121,6 @@ HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
 {
     TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
 
-#ifdef __REACTOS__
-
-    if (!create_manifest(bInstall, TRUE))
-    {
-        ERR("Failed to install comctl32 v6 manifest!\n");
-        return HRESULT_FROM_WIN32(GetLastError());
-    }
-
-    if (!create_manifest(bInstall, FALSE))
-    {
-        ERR("Failed to install comctl32 v5 manifest!\n");
-        return HRESULT_FROM_WIN32(GetLastError());
-    }
-#endif
-
     return S_OK;
 }