From 2ebb30633eb521af178e69d00a95e4e43b80527a Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 25 Aug 2011 15:34:02 +0200 Subject: [PATCH] comctl32: Create the WinSxS manifest from a resource. --- dlls/comctl32/comctl32.manifest | 34 ++++++++++++ dlls/comctl32/comctl32.rc | 3 ++ dlls/comctl32/commctrl.c | 92 --------------------------------- tools/wine.inf.in | 1 - 4 files changed, 37 insertions(+), 93 deletions(-) create mode 100644 dlls/comctl32/comctl32.manifest diff --git a/dlls/comctl32/comctl32.manifest b/dlls/comctl32/comctl32.manifest new file mode 100644 index 00000000000..4c86137667e --- /dev/null +++ b/dlls/comctl32/comctl32.manifest @@ -0,0 +1,34 @@ + + + + + Button + ButtonListBox + ComboBoxEx32 + ComboLBox + Combobox + Edit + Listbox + NativeFontCtl + ReBarWindow32 + ScrollBar + Static + SysAnimate32 + SysDateTimePick32 + SysHeader32 + SysIPAddress32 + SysLink + SysListView32 + SysMonthCal32 + SysPager + SysTabControl32 + SysTreeView32 + ToolbarWindow32 + msctls_hotkey32 + msctls_progress32 + msctls_statusbar32 + msctls_trackbar32 + msctls_updown32 + tooltips_class32 + + diff --git a/dlls/comctl32/comctl32.rc b/dlls/comctl32/comctl32.rc index a525111f99f..7f3d178f817 100644 --- a/dlls/comctl32/comctl32.rc +++ b/dlls/comctl32/comctl32.rc @@ -55,6 +55,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "wine/wine_common_ver.rc" +/* @makedep: comctl32.manifest */ +WINE_MANIFEST RT_MANIFEST comctl32.manifest + /* @makedep: idt_check.bmp */ IDT_CHECK BITMAP idt_check.bmp diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 38cadada663..76ab3a1dfe7 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -72,57 +72,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(commctrl); -#define NAME "microsoft.windows.common-controls" -#define FILE "comctl32.dll" -#define VERSION "6.0.2600.2982" -#define PUBLIC_KEY "6595b64144ccf1df" - -#ifdef __i386__ -#define ARCH "x86" -#elif defined __x86_64__ -#define ARCH "amd64" -#else -#define ARCH "none" -#endif - -static const char manifest[] = - "\n" - "\n" - " \n" - " \n" - " Button\n" - " ButtonListBox\n" - " ComboBoxEx32\n" - " ComboLBox\n" - " Combobox\n" - " Edit\n" - " Listbox\n" - " NativeFontCtl\n" - " ReBarWindow32\n" - " ScrollBar\n" - " Static\n" - " SysAnimate32\n" - " SysDateTimePick32\n" - " SysHeader32\n" - " SysIPAddress32\n" - " SysLink\n" - " SysListView32\n" - " SysMonthCal32\n" - " SysPager\n" - " SysTabControl32\n" - " SysTreeView32\n" - " ToolbarWindow32\n" - " msctls_hotkey32\n" - " msctls_progress32\n" - " msctls_statusbar32\n" - " msctls_trackbar32\n" - " msctls_updown32\n" - " tooltips_class32\n" - " \n" - "\n"; - -static const char manifest_filename[] = ARCH "_" NAME "_" PUBLIC_KEY "_" VERSION "_none_deadbeef.manifest"; - static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static LPWSTR COMCTL32_wSubclass = NULL; @@ -143,46 +92,6 @@ static const WCHAR strCC32SubclassInfo[] = { 'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0 }; -static BOOL create_manifest( BOOL install ) -{ - static const WCHAR winsxsW[] = {'\\','w','i','n','s','x','s',0}; - static const WCHAR manifestsW[] = {'\\','m','a','n','i','f','e','s','t','s','\\',0}; - - DWORD len, written; - WCHAR *buffer; - HANDLE file; - BOOL ret = FALSE; - - len = MultiByteToWideChar( CP_UTF8, 0, manifest_filename, sizeof(manifest_filename), NULL, 0 ); - len += GetWindowsDirectoryW( NULL, 0 ); - len += lstrlenW(winsxsW); - len += lstrlenW(manifestsW); - if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return FALSE; - GetWindowsDirectoryW( buffer, len ); - lstrcatW( buffer, winsxsW ); - CreateDirectoryW( buffer, NULL ); - lstrcatW( buffer, manifestsW ); - CreateDirectoryW( buffer, NULL ); - MultiByteToWideChar( CP_UTF8, 0, manifest_filename, sizeof(manifest_filename), - buffer + lstrlenW(buffer), len ); - if (install) - { - file = CreateFileW( buffer, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL ); - if (file != INVALID_HANDLE_VALUE) - { - ret = (WriteFile( file, manifest, sizeof(manifest)-1, &written, NULL ) && - written == sizeof(manifest)-1); - CloseHandle( file ); - if (!ret) DeleteFileW( buffer ); - else TRACE("created %s\n", debugstr_w(buffer)); - } - } - else ret = DeleteFileW( buffer ); - - HeapFree( GetProcessHeap(), 0, buffer ); - return ret; -} - /*********************************************************************** * DllMain [Internal] @@ -1018,7 +927,6 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi) HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline) { TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline)); - if (!create_manifest( bInstall )) return HRESULT_FROM_WIN32(GetLastError()); return S_OK; } diff --git a/tools/wine.inf.in b/tools/wine.inf.in index af19c90ff36..cd5e0e827a4 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -2501,7 +2501,6 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,shell32.dll,1 11,,quartz.dll,1 -11,,comctl32.dll,2 11,,cryptdlg.dll,1 11,,cryptnet.dll,1 11,,devenum.dll,1