[SHELL32]

- Formatting. No code changes.

svn path=/trunk/; revision=54845
This commit is contained in:
Rafal Harabien 2012-01-05 18:34:35 +00:00
parent 898071bb08
commit 61e7814932
4 changed files with 725 additions and 776 deletions

View file

@ -259,7 +259,6 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
case WM_CREATE: case WM_CREATE:
Control_WndProc_Create(hWnd, (CREATESTRUCTW*)lParam2); Control_WndProc_Create(hWnd, (CREATESTRUCTW*)lParam2);
return 0; return 0;
case WM_DESTROY: case WM_DESTROY:
{ {
CPlApplet *applet = panel->first; CPlApplet *applet = panel->first;
@ -267,8 +266,8 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
applet = Control_UnloadApplet(applet); applet = Control_UnloadApplet(applet);
PostQuitMessage(0); PostQuitMessage(0);
}; break; break;
}
case WM_PAINT: case WM_PAINT:
return Control_WndProc_Paint(panel, lParam1); return Control_WndProc_Paint(panel, lParam1);
case WM_LBUTTONUP: case WM_LBUTTONUP:
@ -326,25 +325,24 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
static void Control_DoWindow(CPanel *panel, HWND hWnd, HINSTANCE hInst) static void Control_DoWindow(CPanel *panel, HWND hWnd, HINSTANCE hInst)
{ {
HANDLE h; HANDLE hFind;
WIN32_FIND_DATAW fd; WIN32_FIND_DATAW wfd;
WCHAR buffer[MAX_PATH]; WCHAR wszPath[MAX_PATH];
static const WCHAR wszAllCpl[] = {'*','.','c','p','l',0}; WCHAR *Ptr = wszPath;
WCHAR *p;
GetSystemDirectoryW( buffer, MAX_PATH ); Ptr += GetSystemDirectoryW(wszPath, MAX_PATH);
p = buffer + wcslen(buffer); *Ptr++ = '\\';
*p++ = '\\'; wcscpy(Ptr, L"*.cpl");
wcscpy(p, wszAllCpl);
if ((h = FindFirstFileW(buffer, &fd)) != INVALID_HANDLE_VALUE) hFind = FindFirstFileW(wszPath, &wfd);
if (hFind != INVALID_HANDLE_VALUE)
{ {
do do
{ {
wcscpy(p, fd.cFileName); wcscpy(Ptr, wfd.cFileName);
Control_LoadApplet(hWnd, buffer, panel); Control_LoadApplet(hWnd, wszPath, panel);
} while (FindNextFileW(h, &fd)); } while (FindNextFileW(hFind, &wfd));
FindClose(h); FindClose(hFind);
} }
Control_DoInterface(panel, hWnd, hInst); Control_DoInterface(panel, hWnd, hInst);

View file

@ -36,7 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
class CControlPanelEnum : class CControlPanelEnum :
public IEnumIDListImpl public IEnumIDListImpl
{ {
private:
public: public:
CControlPanelEnum(); CControlPanelEnum();
~CControlPanelEnum(); ~CControlPanelEnum();

View file

@ -77,14 +77,12 @@ GetKeyDescription(LPWSTR szKeyName, LPWSTR szResult)
DWORD dwDesc, dwError; DWORD dwDesc, dwError;
WCHAR szDesc[100]; WCHAR szDesc[100];
static const WCHAR szFriendlyTypeName[] = { '\\','F','r','i','e','n','d','l','y','T','y','p','e','N','a','m','e',0 };
TRACE("GetKeyDescription: keyname %s\n", debugstr_w(szKeyName)); TRACE("GetKeyDescription: keyname %s\n", debugstr_w(szKeyName));
if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szKeyName, 0, KEY_READ | KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS) if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szKeyName, 0, KEY_READ | KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
return FALSE; return FALSE;
if (RegLoadMUIStringW(hKey,szFriendlyTypeName,szResult,MAX_PATH,&dwDesc,0,NULL) == ERROR_SUCCESS) if (RegLoadMUIStringW(hKey, L"\\FriendlyTypeName", szResult, MAX_PATH, &dwDesc, 0, NULL) == ERROR_SUCCESS)
{ {
TRACE("result %s\n", debugstr_w(szResult)); TRACE("result %s\n", debugstr_w(szResult));
RegCloseKey(hKey); RegCloseKey(hKey);
@ -124,37 +122,28 @@ GetKeyDescription(LPWSTR szKeyName, LPWSTR szResult)
CNewMenu::SHELLNEW_ITEM *CNewMenu::LoadItem(LPWSTR szKeyName) CNewMenu::SHELLNEW_ITEM *CNewMenu::LoadItem(LPWSTR szKeyName)
{ {
HKEY hKey; HKEY hKey;
DWORD dwIndex; DWORD dwIndex = 0;
WCHAR szName[MAX_PATH]; WCHAR szName[MAX_PATH];
WCHAR szCommand[MAX_PATH]; WCHAR szCommand[MAX_PATH];
WCHAR szDesc[MAX_PATH] = {0}; WCHAR szDesc[MAX_PATH] = L"";
WCHAR szIcon[MAX_PATH] = {0}; WCHAR szIcon[MAX_PATH] = L"";
DWORD dwName, dwCommand; DWORD dwName, dwCommand;
LONG result; LONG result;
SHELLNEW_ITEM *pNewItem; SHELLNEW_ITEM *pNewItem = NULL;
static const WCHAR szShellNew[] = { '\\','S','h','e','l','l','N','e','w',0 };
static const WCHAR szCmd[] = { 'C','o','m','m','a','n','d',0 };
static const WCHAR szData[] = { 'D','a','t','a',0 };
static const WCHAR szFileName[] = { 'F','i','l','e','N','a','m','e', 0 };
static const WCHAR szNullFile[] = { 'N','u','l','l','F','i','l','e', 0 };
wcscpy(szName, szKeyName); wcscpy(szName, szKeyName);
GetKeyDescription(szKeyName, szDesc); GetKeyDescription(szKeyName, szDesc);
wcscat(szName, szShellNew); wcscat(szName, L"\\ShellNew");
result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szName, 0, KEY_READ, &hKey); result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szName, 0, KEY_READ, &hKey);
//TRACE("LoadItem dwName %d keyname %s szName %s szDesc %s szIcon %s\n", dwName, debugstr_w(szKeyName), debugstr_w(szName), debugstr_w(szDesc), debugstr_w(szIcon)); TRACE("LoadItem dwName %d keyname %s szName %s szDesc %s szIcon %s\n", dwName, debugstr_w(szKeyName), debugstr_w(szName), debugstr_w(szDesc), debugstr_w(szIcon));
if (result != ERROR_SUCCESS) if (result != ERROR_SUCCESS)
{ {
TRACE("Failed to open key\n");
return NULL; return NULL;
} }
dwIndex = 0;
pNewItem = NULL;
do do
{ {
dwName = MAX_PATH; dwName = MAX_PATH;
@ -164,26 +153,27 @@ CNewMenu::SHELLNEW_ITEM *CNewMenu::LoadItem(LPWSTR szKeyName)
{ {
SHELLNEW_TYPE type = SHELLNEW_TYPE_INVALID; SHELLNEW_TYPE type = SHELLNEW_TYPE_INVALID;
LPWSTR szTarget = szCommand; LPWSTR szTarget = szCommand;
//TRACE("szName %s szCommand %s\n", debugstr_w(szName), debugstr_w(szCommand));
if (!wcsicmp(szName, szCmd)) TRACE("szName %s szCommand %s\n", debugstr_w(szName), debugstr_w(szCommand));
{
if (!wcsicmp(szName, L"Command"))
type = SHELLNEW_TYPE_COMMAND; type = SHELLNEW_TYPE_COMMAND;
}else if (!wcsicmp(szName, szData)) else if (!wcsicmp(szName, L"Data"))
{
type = SHELLNEW_TYPE_DATA; type = SHELLNEW_TYPE_DATA;
} else if (!wcsicmp(szName, L"FileName"))
else if (!wcsicmp(szName, szFileName))
{
type = SHELLNEW_TYPE_FILENAME; type = SHELLNEW_TYPE_FILENAME;
} else if (!wcsicmp(szName, L"NullFile"))
else if (!wcsicmp(szName, szNullFile))
{ {
type = SHELLNEW_TYPE_NULLFILE; type = SHELLNEW_TYPE_NULLFILE;
szTarget = NULL; szTarget = NULL;
} }
if (type != SHELLNEW_TYPE_INVALID) if (type != SHELLNEW_TYPE_INVALID)
{ {
pNewItem = (SHELLNEW_ITEM *)HeapAlloc(GetProcessHeap(), 0, sizeof(SHELLNEW_ITEM)); pNewItem = (SHELLNEW_ITEM *)HeapAlloc(GetProcessHeap(), 0, sizeof(SHELLNEW_ITEM));
if (!pNewItem)
break;
pNewItem->Type = type; pNewItem->Type = type;
if (szTarget) if (szTarget)
pNewItem->szTarget = _wcsdup(szTarget); pNewItem->szTarget = _wcsdup(szTarget);
@ -203,7 +193,6 @@ CNewMenu::SHELLNEW_ITEM *CNewMenu::LoadItem(LPWSTR szKeyName)
return pNewItem; return pNewItem;
} }
BOOL BOOL
CNewMenu::LoadShellNewItems() CNewMenu::LoadShellNewItems()
{ {
@ -212,12 +201,10 @@ CNewMenu::LoadShellNewItems()
LONG result; LONG result;
SHELLNEW_ITEM *pNewItem; SHELLNEW_ITEM *pNewItem;
SHELLNEW_ITEM *pCurItem = NULL; SHELLNEW_ITEM *pCurItem = NULL;
static WCHAR szLnk[] = { '.','l','n','k',0 };
/* insert do new folder action */ /* insert do new folder action */
if (!LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEW, szNew, sizeof(szNew) / sizeof(WCHAR))) if (!LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEW, szNew, sizeof(szNew) / sizeof(WCHAR)))
szNew[0] = 0; szNew[0] = 0;
szNew[MAX_PATH-1] = 0;
UnloadShellItems(); UnloadShellItems();
@ -230,7 +217,7 @@ CNewMenu::LoadShellNewItems()
pNewItem = LoadItem(szName); pNewItem = LoadItem(szName);
if (pNewItem) if (pNewItem)
{ {
if (!wcsicmp(pNewItem->szExt, szLnk)) if (!wcsicmp(pNewItem->szExt, L".lnk"))
{ {
if (s_SnHead) if (s_SnHead)
{ {
@ -355,9 +342,6 @@ CNewMenu::DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi, IShellView *psv)
CComPtr<IShellFolder> parentFolder; CComPtr<IShellFolder> parentFolder;
HRESULT hResult; HRESULT hResult;
static const WCHAR szP1[] = { '%', '1', 0 };
static const WCHAR szFormat[] = {'%','s',' ','(','%','d',')','%','s',0 };
i = 1; i = 1;
target = LOWORD(lpcmi->lpVerb); target = LOWORD(lpcmi->lpVerb);
@ -413,7 +397,7 @@ CNewMenu::DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi, IShellView *psv)
break; break;
} }
ptr = wcsstr(szBuffer, szP1); ptr = wcsstr(szBuffer, L"%1");
if (ptr) if (ptr)
{ {
ptr[1] = 's'; ptr[1] = 's';
@ -458,7 +442,7 @@ CNewMenu::DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi, IShellView *psv)
dwError = GetLastError(); dwError = GetLastError();
TRACE("FileName %s szBuffer %s i %u error %x\n", debugstr_w(szBuffer), debugstr_w(szPath), i, dwError); TRACE("FileName %s szBuffer %s i %u error %x\n", debugstr_w(szBuffer), debugstr_w(szPath), i, dwError);
swprintf(szBuffer, szFormat, szPath, i, pCurItem->szExt); swprintf(szBuffer, L"%s (%d)%s", szPath, i, pCurItem->szExt);
i++; i++;
} while(hFile == INVALID_HANDLE_VALUE && dwError == ERROR_FILE_EXISTS); } while(hFile == INVALID_HANDLE_VALUE && dwError == ERROR_FILE_EXISTS);
@ -642,11 +626,8 @@ CNewMenu::QueryContextMenu(HMENU hmenu,
TRACE("%p %p %u %u %u %u\n", this, TRACE("%p %p %u %u %u %u\n", this,
hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags ); hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags );
if (!LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEW, szBuffer, 200)) if (!LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEW, szBuffer, _countof(szBuffer)))
{
szBuffer[0] = 0; szBuffer[0] = 0;
}
szBuffer[199] = 0;
hSubMenu = CreateMenu(); hSubMenu = CreateMenu();
memset( &mii, 0, sizeof(mii) ); memset( &mii, 0, sizeof(mii) );
@ -665,7 +646,6 @@ CNewMenu::QueryContextMenu(HMENU hmenu,
mii.hSubMenu = hSubMenu; mii.hSubMenu = hSubMenu;
} }
if (!InsertMenuItemW(hmenu, indexMenu, TRUE, &mii)) if (!InsertMenuItemW(hmenu, indexMenu, TRUE, &mii))
return E_FAIL; return E_FAIL;
@ -726,7 +706,6 @@ CNewMenu::HandleMenuMsg(UINT uMsg,
TRACE("INewItem_IContextMenu_fnHandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n", this, uMsg, wParam, lParam); TRACE("INewItem_IContextMenu_fnHandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n", this, uMsg, wParam, lParam);
switch(uMsg) switch(uMsg)
{ {
case WM_MEASUREITEM: case WM_MEASUREITEM:

View file

@ -24,12 +24,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(exec); WINE_DEFAULT_DEBUG_CHANNEL(exec);
static const WCHAR wszOpen[] = {'o','p','e','n',0}; static const WCHAR wszOpen[] = L"open";
static const WCHAR wszExe[] = {'.','e','x','e',0}; static const WCHAR wszExe[] = L".exe";
static const WCHAR wszILPtr[] = {':','%','p',0}; static const WCHAR wszShell[] = L"\\shell\\";
static const WCHAR wszShell[] = {'\\','s','h','e','l','l','\\',0}; static const WCHAR wszFolder[] = L"Folder";
static const WCHAR wszFolder[] = {'F','o','l','d','e','r',0};
static const WCHAR wszEmpty[] = {0};
#define SEE_MASK_CLASSALL (SEE_MASK_CLASSNAME | SEE_MASK_CLASSKEY) #define SEE_MASK_CLASSALL (SEE_MASK_CLASSNAME | SEE_MASK_CLASSKEY)
@ -205,7 +203,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, DWORD len, const WCHAR* fmt, const WCHAR*
used++; used++;
if (used < len) if (used < len)
*res++ = '%'; *res++ = '%';
}; break; };
break;
case '*': case '*':
{ {
@ -226,7 +225,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, DWORD len, const WCHAR* fmt, const WCHAR*
break; break;
} }
} }
}; break; };
break;
case '~': case '~':
@ -258,7 +258,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, DWORD len, const WCHAR* fmt, const WCHAR*
ParseNoTildeEffect(res, args, len, used, *fmt - '2'); ParseNoTildeEffect(res, args, len, used, *fmt - '2');
} }
} }
}; break; };
break;
case '1': case '1':
if (!done || (*fmt == '1')) if (!done || (*fmt == '1'))
@ -309,7 +310,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, DWORD len, const WCHAR* fmt, const WCHAR*
LPVOID pv; LPVOID pv;
HGLOBAL hmem = SHAllocShared(pidl, ILGetSize(pidl), 0); HGLOBAL hmem = SHAllocShared(pidl, ILGetSize(pidl), 0);
pv = SHLockShared(hmem, 0); pv = SHLockShared(hmem, 0);
chars = swprintf(buf, wszILPtr, pv); chars = swprintf(buf, L":%p", pv);
if (chars >= sizeof(buf) / sizeof(WCHAR)) if (chars >= sizeof(buf) / sizeof(WCHAR))
ERR("pidl format buffer too small!\n"); ERR("pidl format buffer too small!\n");
@ -499,7 +500,7 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
*/ */
static LPWSTR SHELL_BuildEnvW( const WCHAR *path ) static LPWSTR SHELL_BuildEnvW( const WCHAR *path )
{ {
static const WCHAR wPath[] = {'P','A','T','H','=',0}; static const WCHAR wPath[] = L"PATH=";
WCHAR *strings, *new_env; WCHAR *strings, *new_env;
WCHAR *p, *p2; WCHAR *p, *p2;
int total = wcslen(path) + 1; int total = wcslen(path) + 1;
@ -559,9 +560,6 @@ static LPWSTR SHELL_BuildEnvW( const WCHAR *path )
*/ */
static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env) static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
{ {
static const WCHAR wszKeyAppPaths[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',
'\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','A','p','p',' ','P','a','t','h','s','\\',0};
static const WCHAR wPath[] = {'P','a','t','h',0};
HKEY hkApp = 0; HKEY hkApp = 0;
WCHAR buffer[1024]; WCHAR buffer[1024];
LONG len; LONG len;
@ -569,7 +567,7 @@ static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
BOOL found = FALSE; BOOL found = FALSE;
if (env) *env = NULL; if (env) *env = NULL;
wcscpy(buffer, wszKeyAppPaths); wcscpy(buffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
wcscat(buffer, szName); wcscat(buffer, szName);
res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp); res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp);
if (res) goto end; if (res) goto end;
@ -582,7 +580,7 @@ static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
if (env) if (env)
{ {
DWORD count = sizeof(buffer); DWORD count = sizeof(buffer);
if (!RegQueryValueExW(hkApp, wPath, NULL, NULL, (LPBYTE)buffer, &count) && buffer[0]) if (!RegQueryValueExW(hkApp, L"Path", NULL, NULL, (LPBYTE)buffer, &count) && buffer[0])
*env = SHELL_BuildEnvW(buffer); *env = SHELL_BuildEnvW(buffer);
} }
@ -593,7 +591,7 @@ end:
static UINT SHELL_FindExecutableByOperation(LPCWSTR lpOperation, LPWSTR key, LPWSTR filetype, LPWSTR command, LONG commandlen) static UINT SHELL_FindExecutableByOperation(LPCWSTR lpOperation, LPWSTR key, LPWSTR filetype, LPWSTR command, LONG commandlen)
{ {
static const WCHAR wCommand[] = {'\\','c','o','m','m','a','n','d',0}; static const WCHAR wCommand[] = L"\\command";
HKEY hkeyClass; HKEY hkeyClass;
WCHAR verb[MAX_PATH]; WCHAR verb[MAX_PATH];
@ -664,9 +662,6 @@ static UINT SHELL_FindExecutableByOperation(LPCWSTR lpOperation, LPWSTR key, LPW
static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
LPWSTR lpResult, DWORD resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args) LPWSTR lpResult, DWORD resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args)
{ {
static const WCHAR wWindows[] = {'w','i','n','d','o','w','s',0};
static const WCHAR wPrograms[] = {'p','r','o','g','r','a','m','s',0};
static const WCHAR wExtensions[] = {'e','x','e',' ','p','i','f',' ','b','a','t',' ','c','m','d',' ','c','o','m',0};
WCHAR *extension = NULL; /* pointer to file extension */ WCHAR *extension = NULL; /* pointer to file extension */
WCHAR filetype[256]; /* registry name for this filetype */ WCHAR filetype[256]; /* registry name for this filetype */
LONG filetypelen = sizeof(filetype); /* length of above */ LONG filetypelen = sizeof(filetype); /* length of above */
@ -744,7 +739,7 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOpera
/* See if it's a program - if GetProfileString fails, we skip this /* See if it's a program - if GetProfileString fails, we skip this
* section. Actually, if GetProfileString fails, we've probably * section. Actually, if GetProfileString fails, we've probably
* got a lot more to worry about than running a program... */ * got a lot more to worry about than running a program... */
if (GetProfileStringW(wWindows, wPrograms, wExtensions, wBuffer, sizeof(wBuffer)/sizeof(WCHAR)) > 0) if (GetProfileStringW(L"windows", L"programs", L"exe pif bat cmd com", wBuffer, sizeof(wBuffer) / sizeof(WCHAR)) > 0)
{ {
CharLowerW(wBuffer); CharLowerW(wBuffer);
tok = wBuffer; tok = wBuffer;
@ -824,11 +819,9 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOpera
} }
else /* Check win.ini */ else /* Check win.ini */
{ {
static const WCHAR wExtensions[] = {'e','x','t','e','n','s','i','o','n','s',0};
/* Toss the leading dot */ /* Toss the leading dot */
extension++; extension++;
if (GetProfileStringW(wExtensions, extension, wszEmpty, command, sizeof(command)/sizeof(WCHAR)) > 0) if (GetProfileStringW(L"extesions", extension, L"", command, sizeof(command) / sizeof(WCHAR)) > 0)
{ {
if (wcslen(command) != 0) if (wcslen(command) != 0)
{ {
@ -881,8 +874,6 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
LPCWSTR szCommandline, LPITEMIDLIST pidl, SHELL_ExecuteW32 execfunc, LPCWSTR szCommandline, LPITEMIDLIST pidl, SHELL_ExecuteW32 execfunc,
const SHELLEXECUTEINFOW *psei, LPSHELLEXECUTEINFOW psei_out) const SHELLEXECUTEINFOW *psei, LPSHELLEXECUTEINFOW psei_out)
{ {
static const WCHAR wApplication[] = {'\\','a','p','p','l','i','c','a','t','i','o','n',0};
static const WCHAR wTopic[] = {'\\','t','o','p','i','c',0};
WCHAR regkey[256]; WCHAR regkey[256];
WCHAR * endkey = regkey + wcslen(key); WCHAR * endkey = regkey + wcslen(key);
WCHAR app[256], topic[256], ifexec[256], res[256]; WCHAR app[256], topic[256], ifexec[256], res[256];
@ -898,12 +889,12 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
BOOL unicode = !(GetVersion() & 0x80000000); BOOL unicode = !(GetVersion() & 0x80000000);
wcscpy(regkey, key); wcscpy(regkey, key);
wcscpy(endkey, wApplication); wcscpy(endkey, L"application");
applen = sizeof(app); applen = sizeof(app);
if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, app, &applen) != ERROR_SUCCESS) if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, app, &applen) != ERROR_SUCCESS)
{ {
WCHAR command[1024], fullpath[MAX_PATH]; WCHAR command[1024], fullpath[MAX_PATH];
static const WCHAR wSo[] = { '.','s','o',0 }; static const WCHAR wSo[] = L".so";
DWORD sizeSo = sizeof(wSo) / sizeof(WCHAR); DWORD sizeSo = sizeof(wSo) / sizeof(WCHAR);
LPWSTR ptr = NULL; LPWSTR ptr = NULL;
DWORD ret = 0; DWORD ret = 0;
@ -949,12 +940,11 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
*ptr = 0; *ptr = 0;
} }
wcscpy(endkey, wTopic); wcscpy(endkey, L"\\topic");
topiclen = sizeof(topic); topiclen = sizeof(topic);
if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, topic, &topiclen) != ERROR_SUCCESS) if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, topic, &topiclen) != ERROR_SUCCESS)
{ {
static const WCHAR wSystem[] = {'S','y','s','t','e','m',0}; wcscpy(topic, L"System");
wcscpy(topic, wSystem);
} }
if (unicode) if (unicode)
@ -975,7 +965,6 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
exec = ddeexec; exec = ddeexec;
if (!hConv) if (!hConv)
{ {
static const WCHAR wIfexec[] = {'\\','i','f','e','x','e','c',0};
TRACE("Launching %s\n", debugstr_w(start)); TRACE("Launching %s\n", debugstr_w(start));
ret = execfunc(start, env, TRUE, psei, psei_out); ret = execfunc(start, env, TRUE, psei, psei_out);
if (ret <= 32) if (ret <= 32)
@ -991,7 +980,7 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
SetLastError(ERROR_DDE_FAIL); SetLastError(ERROR_DDE_FAIL);
return 30; /* whatever */ return 30; /* whatever */
} }
strcpyW(endkey, wIfexec); strcpyW(endkey, L"\\ifexec");
ifexeclen = sizeof(ifexec); ifexeclen = sizeof(ifexec);
if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, ifexec, &ifexeclen) == ERROR_SUCCESS) if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, ifexec, &ifexeclen) == ERROR_SUCCESS)
{ {
@ -1040,8 +1029,6 @@ static UINT_PTR execute_from_key(LPCWSTR key, LPCWSTR lpFile, WCHAR *env,
SHELL_ExecuteW32 execfunc, SHELL_ExecuteW32 execfunc,
LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out)
{ {
static const WCHAR wCommand[] = {'c','o','m','m','a','n','d',0};
static const WCHAR wDdeexec[] = {'d','d','e','e','x','e','c',0};
WCHAR cmd[256], param[1024], ddeexec[256]; WCHAR cmd[256], param[1024], ddeexec[256];
DWORD cmdlen = sizeof(cmd), ddeexeclen = sizeof(ddeexec); DWORD cmdlen = sizeof(cmd), ddeexeclen = sizeof(ddeexec);
UINT_PTR retval = SE_ERR_NOASSOC; UINT_PTR retval = SE_ERR_NOASSOC;
@ -1071,9 +1058,9 @@ static UINT_PTR execute_from_key(LPCWSTR key, LPCWSTR lpFile, WCHAR *env,
/* Get the parameters needed by the application /* Get the parameters needed by the application
from the associated ddeexec key */ from the associated ddeexec key */
tmp = const_cast<LPWSTR>(strstrW(key, wCommand)); tmp = const_cast<LPWSTR>(strstrW(key, L"command"));
assert(tmp); assert(tmp);
wcscpy(tmp, wDdeexec); wcscpy(tmp, L"ddeexec");
if (RegQueryValueW(HKEY_CLASSES_ROOT, key, ddeexec, (LONG *)&ddeexeclen) == ERROR_SUCCESS) if (RegQueryValueW(HKEY_CLASSES_ROOT, key, ddeexec, (LONG *)&ddeexeclen) == ERROR_SUCCESS)
{ {
@ -1279,7 +1266,7 @@ static HRESULT shellex_run_context_menu_default( IShellExtInit *obj,
n = GetMenuItemCount(hmenu); n = GetMenuItemCount(hmenu);
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
{ {
memset( &info, 0, sizeof info ); memset(&info, 0, sizeof(info));
info.cbSize = sizeof info; info.cbSize = sizeof info;
info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE | MIIM_DATA | MIIM_ID; info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE | MIIM_DATA | MIIM_ID;
info.dwTypeData = string; info.dwTypeData = string;
@ -1378,8 +1365,6 @@ end:
*/ */
static LONG ShellExecute_FromContextMenu( LPSHELLEXECUTEINFOW sei ) static LONG ShellExecute_FromContextMenu( LPSHELLEXECUTEINFOW sei )
{ {
static const WCHAR szcm[] = { 's','h','e','l','l','e','x','\\',
'C','o','n','t','e','x','t','M','e','n','u','H','a','n','d','l','e','r','s',0 };
HKEY hkey, hkeycm = 0; HKEY hkey, hkeycm = 0;
WCHAR szguid[39]; WCHAR szguid[39];
HRESULT hr; HRESULT hr;
@ -1393,7 +1378,7 @@ static LONG ShellExecute_FromContextMenu( LPSHELLEXECUTEINFOW sei )
if (!hkey) if (!hkey)
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
r = RegOpenKeyW( hkey, szcm, &hkeycm ); r = RegOpenKeyW(hkey, L"shellex\\ContextMenuHandlers", &hkeycm);
if (r == ERROR_SUCCESS) if (r == ERROR_SUCCESS)
{ {
i = 0; i = 0;
@ -1422,7 +1407,6 @@ static LONG ShellExecute_FromContextMenu( LPSHELLEXECUTEINFOW sei )
static UINT_PTR SHELL_execute_class(LPCWSTR wszApplicationName, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc) static UINT_PTR SHELL_execute_class(LPCWSTR wszApplicationName, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc)
{ {
static const WCHAR wSpace[] = {' ',0};
WCHAR execCmd[1024], wcmd[1024]; WCHAR execCmd[1024], wcmd[1024];
/* launch a document by fileclass like 'WordPad.Document.1' */ /* launch a document by fileclass like 'WordPad.Document.1' */
/* the Commandline contains 'c:\Path\wordpad.exe "%1"' */ /* the Commandline contains 'c:\Path\wordpad.exe "%1"' */
@ -1443,7 +1427,7 @@ static UINT_PTR SHELL_execute_class( LPCWSTR wszApplicationName, LPSHELLEXECUTEI
done = SHELL_ArgifyW(wcmd, sizeof(wcmd) / sizeof(WCHAR), execCmd, wszApplicationName, (LPITEMIDLIST)psei->lpIDList, NULL, &resultLen); done = SHELL_ArgifyW(wcmd, sizeof(wcmd) / sizeof(WCHAR), execCmd, wszApplicationName, (LPITEMIDLIST)psei->lpIDList, NULL, &resultLen);
if (!done && wszApplicationName[0]) if (!done && wszApplicationName[0])
{ {
strcatW(wcmd, wSpace); strcatW(wcmd, L" ");
strcatW(wcmd, wszApplicationName); strcatW(wcmd, wszApplicationName);
} }
if (resultLen > sizeof(wcmd) / sizeof(WCHAR)) if (resultLen > sizeof(wcmd) / sizeof(WCHAR))
@ -1453,7 +1437,7 @@ static UINT_PTR SHELL_execute_class( LPCWSTR wszApplicationName, LPSHELLEXECUTEI
static BOOL SHELL_translate_idlist(LPSHELLEXECUTEINFOW sei, LPWSTR wszParameters, DWORD parametersLen, LPWSTR wszApplicationName, DWORD dwApplicationNameLen) static BOOL SHELL_translate_idlist(LPSHELLEXECUTEINFOW sei, LPWSTR wszParameters, DWORD parametersLen, LPWSTR wszApplicationName, DWORD dwApplicationNameLen)
{ {
static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r','.','e','x','e',0}; static const WCHAR wExplorer[] = L"explorer.exe";
WCHAR buffer[MAX_PATH]; WCHAR buffer[MAX_PATH];
BOOL appKnownSingular = FALSE; BOOL appKnownSingular = FALSE;
@ -1499,8 +1483,6 @@ static BOOL SHELL_translate_idlist( LPSHELLEXECUTEINFOW sei, LPWSTR wszParameter
static UINT_PTR SHELL_quote_and_execute(LPCWSTR wcmd, LPCWSTR wszParameters, LPCWSTR lpstrProtocol, LPCWSTR wszApplicationName, LPWSTR env, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc) static UINT_PTR SHELL_quote_and_execute(LPCWSTR wcmd, LPCWSTR wszParameters, LPCWSTR lpstrProtocol, LPCWSTR wszApplicationName, LPWSTR env, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc)
{ {
static const WCHAR wQuote[] = {'"',0};
static const WCHAR wSpace[] = {' ',0};
UINT_PTR retval; UINT_PTR retval;
DWORD len; DWORD len;
WCHAR *wszQuotedCmd; WCHAR *wszQuotedCmd;
@ -1516,12 +1498,12 @@ static UINT_PTR SHELL_quote_and_execute( LPCWSTR wcmd, LPCWSTR wszParameters, LP
/* Must quote to handle case where cmd contains spaces, /* Must quote to handle case where cmd contains spaces,
* else security hole if malicious user creates executable file "C:\\Program" * else security hole if malicious user creates executable file "C:\\Program"
*/ */
strcpyW(wszQuotedCmd, wQuote); strcpyW(wszQuotedCmd, L"\"");
strcatW(wszQuotedCmd, wcmd); strcatW(wszQuotedCmd, wcmd);
strcatW(wszQuotedCmd, wQuote); strcatW(wszQuotedCmd, L"\"");
if (wszParameters[0]) if (wszParameters[0])
{ {
strcatW(wszQuotedCmd, wSpace); strcatW(wszQuotedCmd, " ");
strcatW(wszQuotedCmd, wszParameters); strcatW(wszQuotedCmd, wszParameters);
} }
@ -1537,8 +1519,8 @@ static UINT_PTR SHELL_quote_and_execute( LPCWSTR wcmd, LPCWSTR wszParameters, LP
static UINT_PTR SHELL_execute_url(LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc) static UINT_PTR SHELL_execute_url(LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc)
{ {
static const WCHAR wShell[] = {'\\','s','h','e','l','l','\\',0}; static const WCHAR wShell[] = L"\\shell\\";
static const WCHAR wCommand[] = {'\\','c','o','m','m','a','n','d',0}; static const WCHAR wCommand[] = L"\\command";
UINT_PTR retval; UINT_PTR retval;
WCHAR *lpstrProtocol; WCHAR *lpstrProtocol;
LPCWSTR lpstrRes; LPCWSTR lpstrRes;
@ -1605,10 +1587,6 @@ void do_error_dialog( UINT_PTR retval, HWND hwnd, WCHAR* filename)
*/ */
BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc) BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc)
{ {
static const WCHAR wSpace[] = {' ',0};
static const WCHAR wWww[] = {'w','w','w',0};
static const WCHAR wFile[] = {'f','i','l','e',0};
static const WCHAR wHttp[] = {'h','t','t','p',':','/','/',0};
static const DWORD unsupportedFlags = static const DWORD unsupportedFlags =
SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY | SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY |
SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT | SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT |
@ -1656,8 +1634,8 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
wszApplicationName = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwApplicationNameLen * sizeof(WCHAR)); wszApplicationName = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwApplicationNameLen * sizeof(WCHAR));
memcpy(wszApplicationName, sei_tmp.lpFile + 1, (l + 1)*sizeof(WCHAR)); memcpy(wszApplicationName, sei_tmp.lpFile + 1, (l + 1)*sizeof(WCHAR));
if (wszApplicationName[l-1] == '\"') if (wszApplicationName[l-1] == L'\"')
wszApplicationName[l-1] = '\0'; wszApplicationName[l-1] = L'\0';
appKnownSingular = TRUE; appKnownSingular = TRUE;
TRACE("wszApplicationName=%s\n", debugstr_w(wszApplicationName)); TRACE("wszApplicationName=%s\n", debugstr_w(wszApplicationName));
@ -1682,7 +1660,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
strcpyW(wszParameters, sei_tmp.lpParameters); strcpyW(wszParameters, sei_tmp.lpParameters);
} }
else else
*wszParameters = '\0'; *wszParameters = L'\0';
wszDir = dirBuffer; wszDir = dirBuffer;
if (sei_tmp.lpDirectory) if (sei_tmp.lpDirectory)
@ -1696,7 +1674,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
strcpyW(wszDir, sei_tmp.lpDirectory); strcpyW(wszDir, sei_tmp.lpDirectory);
} }
else else
*wszDir = '\0'; *wszDir = L'\0';
/* adjust string pointers to point to the new buffers */ /* adjust string pointers to point to the new buffers */
sei_tmp.lpFile = wszApplicationName; sei_tmp.lpFile = wszApplicationName;
@ -1750,8 +1728,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
if (sei_tmp.fMask & SEE_MASK_CLASSALL) if (sei_tmp.fMask & SEE_MASK_CLASSALL)
{ {
retval = SHELL_execute_class( wszApplicationName, &sei_tmp, sei, retval = SHELL_execute_class(wszApplicationName, &sei_tmp, sei, execfunc);
execfunc );
if (retval <= 32 && !(sei_tmp.fMask & SEE_MASK_FLAG_NO_UI)) if (retval <= 32 && !(sei_tmp.fMask & SEE_MASK_FLAG_NO_UI))
{ {
OPENASINFO Info; OPENASINFO Info;
@ -1839,19 +1816,19 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
if (!*sei_tmp.lpParameters && !appKnownSingular) if (!*sei_tmp.lpParameters && !appKnownSingular)
{ {
/* If the executable path is quoted, handle the rest of the command line as parameters. */ /* If the executable path is quoted, handle the rest of the command line as parameters. */
if (sei_tmp.lpFile[0] == '"') if (sei_tmp.lpFile[0] == L'"')
{ {
LPWSTR src = wszApplicationName/*sei_tmp.lpFile*/ + 1; LPWSTR src = wszApplicationName/*sei_tmp.lpFile*/ + 1;
LPWSTR dst = wfileName; LPWSTR dst = wfileName;
LPWSTR end; LPWSTR end;
/* copy the unquoted executable path to 'wfileName' */ /* copy the unquoted executable path to 'wfileName' */
while(*src && *src!='"') while(*src && *src != L'"')
*dst++ = *src++; *dst++ = *src++;
*dst = '\0'; *dst = L'\0';
if (*src == '"') if (*src == L'"')
{ {
end = ++src; end = ++src;
@ -1865,7 +1842,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
strcpyW(wszParameters, src); strcpyW(wszParameters, src);
/* terminate previous command string after the quote character */ /* terminate previous command string after the quote character */
*end = '\0'; *end = L'\0';
} }
else else
{ {
@ -1875,7 +1852,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
LPWSTR space, s; LPWSTR space, s;
LPWSTR beg = wszApplicationName/*sei_tmp.lpFile*/; LPWSTR beg = wszApplicationName/*sei_tmp.lpFile*/;
for(s=beg; (space= const_cast<LPWSTR>(strchrW(s, ' '))); s=space+1) for(s = beg; (space = const_cast<LPWSTR>(strchrW(s, L' '))); s = space + 1)
{ {
int idx = space - sei_tmp.lpFile; int idx = space - sei_tmp.lpFile;
memcpy(buffer, sei_tmp.lpFile, idx * sizeof(WCHAR)); memcpy(buffer, sei_tmp.lpFile, idx * sizeof(WCHAR));
@ -1891,7 +1868,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
++p; ++p;
strcpyW(wszParameters, p); strcpyW(wszParameters, p);
*space = '\0'; *space = L'\0';
break; break;
} }
@ -1917,7 +1894,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
swprintf(wcmd, L"\"%s\"", wszApplicationName); swprintf(wcmd, L"\"%s\"", wszApplicationName);
if (sei_tmp.lpParameters[0]) if (sei_tmp.lpParameters[0])
{ {
strcatW(wcmd, wSpace); strcatW(wcmd, L" ");
strcatW(wcmd, wszParameters); strcatW(wcmd, wszParameters);
} }
@ -1935,7 +1912,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
} }
/* Else, try to find the executable */ /* Else, try to find the executable */
wcmd[0] = '\0'; wcmd[0] = L'\0';
retval = SHELL_FindExecutable(sei_tmp.lpDirectory, lpFile, sei_tmp.lpVerb, wcmd, wcmdLen, lpstrProtocol, &env, (LPITEMIDLIST)sei_tmp.lpIDList, sei_tmp.lpParameters); retval = SHELL_FindExecutable(sei_tmp.lpDirectory, lpFile, sei_tmp.lpVerb, wcmd, wcmdLen, lpstrProtocol, &env, (LPITEMIDLIST)sei_tmp.lpIDList, sei_tmp.lpParameters);
if (retval > 32) /* Found */ if (retval > 32) /* Found */
{ {
@ -1946,21 +1923,17 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
} }
else if (PathIsDirectoryW(lpFile)) else if (PathIsDirectoryW(lpFile))
{ {
static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r',0};
static const WCHAR wQuote[] = {'"',0};
WCHAR wExec[MAX_PATH]; WCHAR wExec[MAX_PATH];
WCHAR * lpQuotedFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * (strlenW(lpFile) + 3)); WCHAR * lpQuotedFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * (strlenW(lpFile) + 3));
if (lpQuotedFile) if (lpQuotedFile)
{ {
retval = SHELL_FindExecutable( sei_tmp.lpDirectory, wExplorer, retval = SHELL_FindExecutable(sei_tmp.lpDirectory, L"explorer",
wszOpen, wExec, MAX_PATH, wszOpen, wExec, MAX_PATH,
NULL, &env, NULL, NULL); NULL, &env, NULL, NULL);
if (retval > 32) if (retval > 32)
{ {
strcpyW(lpQuotedFile, wQuote); swprintf(lpQuotedFile, L"\"%s\"", lpFile);
strcatW(lpQuotedFile, lpFile);
strcatW(lpQuotedFile, wQuote);
retval = SHELL_quote_and_execute(wExec, lpQuotedFile, retval = SHELL_quote_and_execute(wExec, lpQuotedFile,
lpstrProtocol, lpstrProtocol,
wszApplicationName, env, wszApplicationName, env,
@ -1974,14 +1947,14 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
} }
else if (PathIsURLW(lpFile)) /* File not found, check for URL */ else if (PathIsURLW(lpFile)) /* File not found, check for URL */
{ {
retval = SHELL_execute_url( lpFile, wFile, wcmd, &sei_tmp, sei, execfunc ); retval = SHELL_execute_url(lpFile, L"file", wcmd, &sei_tmp, sei, execfunc );
} }
/* Check if file specified is in the form www.??????.*** */ /* Check if file specified is in the form www.??????.*** */
else if (!strncmpiW(lpFile, wWww, 3)) else if (!strncmpiW(lpFile, L"www", 3))
{ {
/* if so, append lpFile http:// and call ShellExecute */ /* if so, append lpFile http:// and call ShellExecute */
WCHAR lpstrTmpFile[256]; WCHAR lpstrTmpFile[256];
strcpyW(lpstrTmpFile, wHttp); strcpyW(lpstrTmpFile, L"http://");
strcatW(lpstrTmpFile, lpFile); strcatW(lpstrTmpFile, lpFile);
retval = (UINT_PTR)ShellExecuteW(sei_tmp.hwnd, sei_tmp.lpVerb, lpstrTmpFile, NULL, NULL, 0); retval = (UINT_PTR)ShellExecuteW(sei_tmp.hwnd, sei_tmp.lpVerb, lpstrTmpFile, NULL, NULL, 0);
} }