Author: rharabien
Date: Mon Mar 12 14:24:25 2012
New Revision: 56133
URL:
http://svn.reactos.org/svn/reactos?rev=56133&view=rev
Log:
[COMCTL32]
- Update diff file
Modified:
trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] Mon Mar 12 14:24:25
2012
@@ -2,7 +2,108 @@
===================================================================
--- commctrl.c (revision 55577)
+++ commctrl.c (working copy)
-@@ -1593,12 +1593,114 @@
+@@ -71,6 +71,19 @@
+
+ WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
+
++#define NAME L"microsoft.windows.common-controls"
++#define VERSION L"6.0.2600.2982"
++#define PUBLIC_KEY L"6595b64144ccf1df"
++
++#ifdef __i386__
++#define ARCH L"x86"
++#elif defined __x86_64__
++#define ARCH L"amd64"
++#else
++#define ARCH L"none"
++#endif
++
++static const WCHAR manifest_filename[] = ARCH L"_" NAME L"_"
PUBLIC_KEY L"_" VERSION L"_none_deadbeef.manifest";
+
+ static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
lParam);
+
+@@ -92,6 +105,67 @@
+
'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0
+ };
+
++static BOOL create_manifest(BOOL install)
++{
++ WCHAR *pwszBuf;
++ HRSRC hResInfo;
++ HGLOBAL hResData;
++ PVOID pManifest;
++ DWORD cchBuf, cbManifest, cbWritten;
++ HANDLE hFile;
++ BOOL bRet = FALSE;
++
++ hResInfo = FindResourceW(COMCTL32_hModule, L"WINE_MANIFEST",
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;
++
++ cchBuf = GetWindowsDirectoryW(NULL, 0) * sizeof(WCHAR) +
sizeof(L"\\winsxs\\manifests\\") + sizeof(manifest_filename);
++ pwszBuf = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, cchBuf * sizeof(WCHAR));
++ if (!pwszBuf)
++ return FALSE;
++
++ GetWindowsDirectoryW(pwszBuf, cchBuf);
++ lstrcatW(pwszBuf, L"\\winsxs");
++ CreateDirectoryW(pwszBuf, NULL);
++ lstrcatW(pwszBuf, L"\\manifests\\");
++ CreateDirectoryW(pwszBuf, NULL);
++ lstrcatW(pwszBuf, manifest_filename);
++ 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;
++}
++
+
+ /***********************************************************************
+ * DllMain [Internal]
+@@ -930,6 +1004,12 @@
+ HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
+ {
+ TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
++ if (!create_manifest(bInstall))
++ {
++ ERR("create_manifest failed!\n");
++ return HRESULT_FROM_WIN32(GetLastError());
++ }
++
+ return S_OK;
+ }
+
+@@ -1593,12 +1673,114 @@
*
* Draw text with shadow.
*/