mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
merged back commited WINE patches
svn path=/trunk/; revision=7896
This commit is contained in:
parent
f6966e84c8
commit
d276fcc1d3
4 changed files with 33 additions and 87 deletions
|
@ -331,7 +331,7 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
|
|||
break;
|
||||
case SHCNF_PRINTERA:
|
||||
case SHCNF_PRINTERW:
|
||||
FIXME("SHChangeNotify with (uFlags & SHCNF_PRINTER)");
|
||||
FIXME("SHChangeNotify with (uFlags & SHCNF_PRINTER)\n");
|
||||
return;
|
||||
case SHCNF_DWORD:
|
||||
default:
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "shlguid.h"
|
||||
#include "winerror.h"
|
||||
#include "winnls.h"
|
||||
#include "winternl.h"
|
||||
#include "undocshell.h"
|
||||
#include "shell32_main.h"
|
||||
#include "shellapi.h"
|
||||
|
@ -124,7 +123,7 @@ BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR pa
|
|||
flag = SHGDN_INFOLDER;
|
||||
break;
|
||||
default:
|
||||
FIXME("Unknown type parameter = %lx", type);
|
||||
FIXME("Unknown type parameter = %lx\n", type);
|
||||
flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR;
|
||||
break;
|
||||
}
|
||||
|
@ -1040,35 +1039,24 @@ static HRESULT WINAPI _ILParsePathW(LPCWSTR path, LPWIN32_FIND_DATAW lpFindFile,
|
|||
*/
|
||||
LPITEMIDLIST WINAPI SHSimpleIDListFromPathA(LPCSTR lpszPath)
|
||||
{
|
||||
LPITEMIDLIST pidl = NULL;
|
||||
|
||||
#if 0 /* don't link directly to ntdll */
|
||||
UNICODE_STRING wPath;
|
||||
|
||||
RtlCreateUnicodeStringFromAsciiz(&wPath, lpszPath);
|
||||
_ILParsePathW(wPath.Buffer, NULL, TRUE, &pidl, NULL);
|
||||
RtlFreeUnicodeString(&wPath);
|
||||
#else
|
||||
LPWSTR wPath;
|
||||
LPITEMIDLIST pidl = NULL;
|
||||
LPWSTR wPath = NULL;
|
||||
int len;
|
||||
|
||||
TRACE("%s\n", debugstr_a(lpszPath));
|
||||
TRACE("%s\n", debugstr_a(lpszPath));
|
||||
|
||||
if (lpszPath) {
|
||||
len = MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, NULL, 0);
|
||||
wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len);
|
||||
} else
|
||||
wPath = NULL;
|
||||
if (lpszPath)
|
||||
{
|
||||
len = MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, NULL, 0);
|
||||
wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len);
|
||||
}
|
||||
|
||||
_ILParsePathW(wPath, NULL, TRUE, &pidl, NULL);
|
||||
|
||||
if (wPath)
|
||||
HeapFree(GetProcessHeap(), 0, wPath);
|
||||
#endif
|
||||
|
||||
TRACE("%s %p\n", debugstr_a(lpszPath), pidl);
|
||||
return pidl;
|
||||
if (wPath) HeapFree(GetProcessHeap(), 0, wPath);
|
||||
TRACE("%s %p\n", debugstr_a(lpszPath), pidl);
|
||||
return pidl;
|
||||
}
|
||||
|
||||
LPITEMIDLIST WINAPI SHSimpleIDListFromPathW(LPCWSTR lpszPath)
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "winternl.h"
|
||||
#include "dlgs.h"
|
||||
#include "shellapi.h"
|
||||
#include "winuser.h"
|
||||
|
@ -799,42 +798,26 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
|
|||
BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon )
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
#if 0 /* don't link directly to ntdll */
|
||||
UNICODE_STRING appW, otherW;
|
||||
|
||||
RtlCreateUnicodeStringFromAsciiz( &appW, szApp );
|
||||
RtlCreateUnicodeStringFromAsciiz( &otherW, szOtherStuff );
|
||||
ret = ShellAboutW( hWnd, appW.Buffer, otherW.Buffer, hIcon );
|
||||
RtlFreeUnicodeString( &appW );
|
||||
RtlFreeUnicodeString( &otherW );
|
||||
#else
|
||||
LPWSTR appW, otherW;
|
||||
LPWSTR appW = NULL, otherW = NULL;
|
||||
int len;
|
||||
|
||||
if (szApp) {
|
||||
len = MultiByteToWideChar(CP_ACP, 0, szApp, -1, NULL, 0);
|
||||
appW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, szApp, -1, appW, len);
|
||||
} else
|
||||
appW = NULL;
|
||||
|
||||
if (szOtherStuff) {
|
||||
len = MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, NULL, 0);
|
||||
otherW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, otherW, len);
|
||||
} else
|
||||
otherW = NULL;
|
||||
if (szApp)
|
||||
{
|
||||
len = MultiByteToWideChar(CP_ACP, 0, szApp, -1, NULL, 0);
|
||||
appW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, szApp, -1, appW, len);
|
||||
}
|
||||
if (szOtherStuff)
|
||||
{
|
||||
len = MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, NULL, 0);
|
||||
otherW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, otherW, len);
|
||||
}
|
||||
|
||||
ret = ShellAboutW(hWnd, appW, otherW, hIcon);
|
||||
|
||||
if (otherW)
|
||||
HeapFree(GetProcessHeap(), 0, otherW);
|
||||
|
||||
if (appW)
|
||||
HeapFree(GetProcessHeap(), 0, appW);
|
||||
#endif
|
||||
|
||||
if (otherW) HeapFree(GetProcessHeap(), 0, otherW);
|
||||
if (appW) HeapFree(GetProcessHeap(), 0, appW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -909,8 +892,6 @@ HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi)
|
|||
* all are once per process
|
||||
*
|
||||
*/
|
||||
void (WINAPI *pDLLInitComctl)(LPVOID);
|
||||
|
||||
HINSTANCE shell32_hInstance = 0;
|
||||
HIMAGELIST ShellSmallIconList = 0;
|
||||
HIMAGELIST ShellBigIconList = 0;
|
||||
|
@ -931,31 +912,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
|||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
shell32_hInstance = hinstDLL;
|
||||
|
||||
/* get full path to this DLL for IExtractIconW_fnGetIconLocation() */
|
||||
GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH);
|
||||
WideCharToMultiByte(CP_ACP, 0, swShell32Name, -1, sShell32Name, MAX_PATH, NULL, NULL);
|
||||
|
||||
#if 0 /* why not directly link to InitCommonControlsEx()? */
|
||||
hComctl32 = GetModuleHandleA("COMCTL32.DLL");
|
||||
DisableThreadLibraryCalls(shell32_hInstance);
|
||||
|
||||
if (!hComctl32)
|
||||
{
|
||||
ERR("P A N I C SHELL32 loading failed\n");
|
||||
return FALSE;
|
||||
}
|
||||
/* get full path to this DLL for IExtractIconW_fnGetIconLocation() */
|
||||
GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH);
|
||||
WideCharToMultiByte(CP_ACP, 0, swShell32Name, -1, sShell32Name, MAX_PATH, NULL, NULL);
|
||||
|
||||
/* comctl32 */
|
||||
pDLLInitComctl = (void*)GetProcAddress(hComctl32,"InitCommonControlsEx");
|
||||
/* initialize the common controls */
|
||||
if (pDLLInitComctl)
|
||||
{
|
||||
pDLLInitComctl(NULL);
|
||||
}
|
||||
#else
|
||||
InitCommonControlsEx(NULL);
|
||||
#endif
|
||||
InitCommonControlsEx(NULL);
|
||||
|
||||
SIC_Initialize();
|
||||
SYSTRAY_Init();
|
||||
|
|
|
@ -46,11 +46,6 @@ extern HIMAGELIST ShellSmallIconList;
|
|||
extern HIMAGELIST ShellBigIconList;
|
||||
extern HDPA sic_hdpa;
|
||||
|
||||
/*******************************************
|
||||
* pointer to functions dynamically loaded
|
||||
*/
|
||||
extern void (WINAPI *pDLLInitComctl)(LPVOID);
|
||||
|
||||
BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList);
|
||||
|
||||
/* Iconcache */
|
||||
|
|
Loading…
Reference in a new issue