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