mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
merged back WineHQ commit
svn path=/trunk/; revision=7700
This commit is contained in:
parent
25dfcd5244
commit
020f7d429d
7 changed files with 13 additions and 84 deletions
|
@ -114,67 +114,7 @@ BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL b
|
|||
}
|
||||
|
||||
|
||||
BOOL HCR_GetExecuteCommandW(LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len)
|
||||
{
|
||||
static const WCHAR swShell[] = {'\\','s','h','e','l','l','\\',0};
|
||||
static const WCHAR swCommand[] = {'\\','c','o','m','m','a','n','d',0};
|
||||
WCHAR sTemp[MAX_PATH];
|
||||
|
||||
TRACE("%s %s %p\n",debugstr_w(szClass), debugstr_w(szVerb), szDest);
|
||||
|
||||
lstrcpyW(sTemp, szClass);
|
||||
lstrcatW(sTemp, swShell);
|
||||
lstrcatW(sTemp, szVerb);
|
||||
lstrcatW(sTemp, swCommand);
|
||||
|
||||
if (ERROR_SUCCESS == SHGetValueW(HKEY_CLASSES_ROOT, sTemp, NULL, NULL, szDest, &len)) {
|
||||
TRACE("-- %s\n", debugstr_w(szDest) );
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HCR_GetExecuteCommandA(LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len)
|
||||
{
|
||||
char sTemp[MAX_PATH];
|
||||
|
||||
TRACE("%s %s\n",szClass, szVerb );
|
||||
|
||||
snprintf(sTemp, MAX_PATH, "%s\\shell\\%s\\command",szClass, szVerb);
|
||||
|
||||
if (ERROR_SUCCESS == SHGetValueA(HKEY_CLASSES_ROOT, sTemp, NULL, NULL, szDest, &len)) {
|
||||
TRACE("-- %s\n", debugstr_a(szDest) );
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HCR_GetExecuteCommandExA( HKEY hkeyClass, LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len )
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("%p %s %s\n", hkeyClass, szClass, szVerb );
|
||||
|
||||
if (szClass)
|
||||
RegOpenKeyExA(HKEY_CLASSES_ROOT, szClass, 0, 0x02000000, &hkeyClass);
|
||||
|
||||
if (hkeyClass)
|
||||
{
|
||||
char sTemp[MAX_PATH];
|
||||
|
||||
snprintf(sTemp, MAX_PATH, "shell\\%s\\command", szVerb);
|
||||
|
||||
ret = (ERROR_SUCCESS == SHGetValueA(hkeyClass, sTemp, NULL, NULL, szDest, &len));
|
||||
|
||||
if (szClass)
|
||||
RegCloseKey(hkeyClass);
|
||||
}
|
||||
|
||||
TRACE("-- %s\n", szDest );
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL HCR_GetExecuteCommandExW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len )
|
||||
BOOL HCR_GetExecuteCommandW(HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len)
|
||||
{
|
||||
static const WCHAR swShell[] = {'\\','s','h','e','l','l','\\',0};
|
||||
static const WCHAR swCommand[] = {'\\','c','o','m','m','a','n','d',0};
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndexAW
|
||||
73 stdcall SHShellFolderView_Message(long long long)
|
||||
74 stdcall SHCreateStdEnumFmtEtc(long ptr ptr)
|
||||
75 stdcall PathYetAnotherMakeUniqueName(ptr ptr ptr ptr)
|
||||
75 stdcall PathYetAnotherMakeUniqueName(ptr wstr wstr wstr)
|
||||
76 stub DragQueryInfo
|
||||
77 stdcall SHMapPIDLToSystemImageListIndex(ptr ptr ptr)
|
||||
78 stdcall OleStrToStrN(str long wstr long) OleStrToStrNAW
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright 1998 Juergen Schmied
|
||||
* Copyright 2003 Filip Navara
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -95,7 +96,7 @@ CAPTION "Proch
|
|||
FONT 8, "Helv"
|
||||
{
|
||||
DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Cancel", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Storno", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP
|
||||
LTEXT "", IDD_TITLE, 4, 4, 180, 12
|
||||
LTEXT "", IDD_STATUS, 4, 25, 180, 12
|
||||
CONTROL "", IDD_TREEVIEW, "SysTreeView32",
|
||||
|
|
|
@ -62,16 +62,13 @@ INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex );
|
|||
|
||||
/* Classes Root */
|
||||
BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot);
|
||||
BOOL HCR_GetExecuteCommandW(LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len);
|
||||
BOOL HCR_GetExecuteCommandExW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len );
|
||||
BOOL HCR_GetExecuteCommandW(HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len);
|
||||
BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, LPDWORD dwNr);
|
||||
BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, LPDWORD dwNr);
|
||||
BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len);
|
||||
|
||||
/* ANSI versions of above functions, supposed to go away as soon as they are not used anymore */
|
||||
BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot);
|
||||
BOOL HCR_GetExecuteCommandA(LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len);
|
||||
BOOL HCR_GetExecuteCommandExA( HKEY hkeyClass, LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len );
|
||||
BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr);
|
||||
BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len);
|
||||
|
||||
|
|
|
@ -1038,13 +1038,8 @@ HRESULT WINAPI SHGetFolderPathW(
|
|||
|
||||
dwCsidlFlags = CSIDL_Data[folder].dwFlags;
|
||||
hRootKey = CSIDL_Data[folder].hRootKey;
|
||||
#if 0
|
||||
strcpyW(szValueName, CSIDL_Data[folder].szValueName);
|
||||
strcpyW(szDefaultPath, CSIDL_Data[folder].szDefaultPath);
|
||||
#else
|
||||
MultiByteToWideChar(CP_ACP, 0, CSIDL_Data[folder].szValueName, -1, szValueName, MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP, 0, CSIDL_Data[folder].szDefaultPath, -1, szDefaultPath, MAX_PATH);
|
||||
#endif
|
||||
|
||||
if (dwCsidlFlags & CSIDL_MYFLAG_SHFOLDER)
|
||||
{
|
||||
|
|
|
@ -926,7 +926,7 @@ BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW psei, SHELL_ExecuteW32 execfu
|
|||
static const WCHAR wExtLnk[] = {'.','l','n','k',0};
|
||||
static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r','.','e','x','e',0};
|
||||
|
||||
WCHAR wszApplicationName[MAX_PATH+2], wszParameters[MAX_PATH], wfileName[MAX_PATH], wszDir[MAX_PATH];
|
||||
WCHAR wszApplicationName[MAX_PATH+2], wszParameters[1024], wfileName[MAX_PATH], wszDir[MAX_PATH];
|
||||
SHELLEXECUTEINFOW sei_tmp; /* modifyable copy of SHELLEXECUTEINFO struct */
|
||||
void *env;
|
||||
WCHAR wszProtocol[256];
|
||||
|
@ -1003,15 +1003,11 @@ BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW psei, SHELL_ExecuteW32 execfu
|
|||
{
|
||||
/* launch a document by fileclass like 'WordPad.Document.1' */
|
||||
/* the Commandline contains 'c:\Path\wordpad.exe "%1"' */
|
||||
/* FIXME: wszParameters should not be of a fixed size. Plus MAX_PATH is way too short! */
|
||||
if (sei_tmp.fMask & SEE_MASK_CLASSKEY)
|
||||
HCR_GetExecuteCommandExW(sei_tmp.hkeyClass,
|
||||
sei_tmp.fMask&SEE_MASK_CLASSNAME? sei_tmp.lpClass: NULL,
|
||||
sei_tmp.lpVerb? sei_tmp.lpVerb: wszOpen,
|
||||
wszParameters/*sei_tmp.lpParameters*/, sizeof(wszParameters)/sizeof(WCHAR));
|
||||
else if (sei_tmp.fMask & SEE_MASK_CLASSNAME)
|
||||
HCR_GetExecuteCommandW(sei_tmp.lpClass, sei_tmp.lpVerb? sei_tmp.lpVerb: wszOpen,
|
||||
wszParameters/*sei_tmp.lpParameters*/, sizeof(wszParameters)/sizeof(WCHAR));
|
||||
/* FIXME: wszParameters should not be of a fixed size. Fixed to 1024, MAX_PATH is way too short! */
|
||||
HCR_GetExecuteCommandW((sei_tmp.fMask & SEE_MASK_CLASSKEY)? sei_tmp.hkeyClass: NULL,
|
||||
(sei_tmp.fMask & SEE_MASK_CLASSNAME)? sei_tmp.lpClass: NULL,
|
||||
(sei_tmp.lpVerb)? sei_tmp.lpVerb: wszOpen,
|
||||
wszParameters/*sei_tmp.lpParameters*/, sizeof(wszParameters)/sizeof(WCHAR));
|
||||
|
||||
/* FIXME: get the extension of lpFile, check if it fits to the lpClass */
|
||||
TRACE("SEE_MASK_CLASSNAME->'%s', doc->'%s'\n", debugstr_w(sei_tmp.lpParameters), debugstr_w(sei_tmp.lpFile));
|
||||
|
@ -1082,7 +1078,7 @@ BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW psei, SHELL_ExecuteW32 execfu
|
|||
strcpyW(wszApplicationName, wExplorer);
|
||||
|
||||
sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST;
|
||||
} else if (HCR_GetExecuteCommandW(wszFolder, sei_tmp.lpVerb?sei_tmp.lpVerb:wszOpen, buffer, sizeof(buffer))) {
|
||||
} else if (HCR_GetExecuteCommandW(0, wszFolder, sei_tmp.lpVerb?sei_tmp.lpVerb:wszOpen, buffer, sizeof(buffer))) {
|
||||
SHELL_ArgifyW(wszApplicationName, sizeof(wszApplicationName)/sizeof(WCHAR), buffer, NULL, sei_tmp.lpIDList, NULL);
|
||||
|
||||
sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST;
|
||||
|
|
|
@ -344,7 +344,7 @@ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf,
|
|||
* file: 0x40400177 FILESYSTEM | CANMONIKER
|
||||
* drive 0xF0400154 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR | CANMONIKER | CANRENAME (LABEL)
|
||||
*
|
||||
* This functions does not set flags!! It only resets flags when nessesary.
|
||||
* This function does not set flags!! It only resets flags when necessary.
|
||||
*/
|
||||
HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue