30#ifndef STARTF_SHELLPRIVATE
31#define STARTF_SHELLPRIVATE 0x400
33#define SEE_MASK_CLASSALL (SEE_MASK_CLASSNAME | SEE_MASK_CLASSKEY)
42 static INT s_bInDllProcess = -1;
44 if (s_bInDllProcess != -1)
45 return s_bInDllProcess;
49 return s_bInDllProcess;
54 bool firstCharQuote =
false;
55 bool quotes_opened =
false;
56 bool backslash_encountered =
false;
58 for (
int curArg = 0; curArg <= argNum && *
args; ++curArg)
60 firstCharQuote =
false;
64 firstCharQuote =
true;
73 backslash_encountered = !backslash_encountered;
75 else if (*
args ==
'"')
79 if (*(
args + 1) !=
'"')
81 quotes_opened =
false;
95 backslash_encountered =
false;
99 backslash_encountered =
false;
100 if (*
args ==
' ' && !firstCharQuote)
104 if (curArg == argNum)
121 bool quotes_opened =
false;
122 bool backslash_encountered =
false;
124 for (
int curArg = 0; curArg <= argNum && *
args; ++curArg)
131 backslash_encountered = !backslash_encountered;
133 else if (*
args ==
'"')
137 if (*(
args + 1) !=
'"')
139 quotes_opened =
false;
148 quotes_opened =
true;
151 backslash_encountered =
false;
155 backslash_encountered =
false;
156 if (*
args ==
' ' && !quotes_opened && curArg != argNum)
160 if (curArg == argNum)
207 bool tildeEffect =
false;
283 if ((!done || (*
fmt ==
'1')) && lpFile)
365 ERR(
"pidl format buffer too small!\n");
387 WCHAR tmpBuffer[1024];
388 PWSTR tmpB = tmpBuffer;
399 if (envRet == 0 || envRet >
MAX_PATH)
462 hr = desktop->GetDisplayNameOf(pidl, SHGDN_FORPARSING, &strret);
483 DWORD dwCreationFlags;
516 startup.dwFlags |= STARTF_TITLEISLINKNAME;
557 WARN(
"CreateProcess returned error %ld\n",
retval);
595 if (!got_path)
total += 5;
646 wcscpy(
buffer,
L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
716 commandlen /=
sizeof(
WCHAR);
736 paramlen /=
sizeof(
WCHAR);
739 commandlen += paramlen;
778 const WCHAR *search_paths[3] = {0};
792 WARN(
"(lpFile=%s,lpResult=%s): NULL parameter\n",
804 if (lpPath && *lpPath)
806 search_paths[0] = lpPath;
807 search_paths[1] = curdir;
811 search_paths[0] = curdir;
818 TRACE(
"PathResolveW returned non-zero\n");
824 while (
i > 0 && xlpFile[
i - 1] ==
'.')
847 TRACE(
"Returning SE_ERR_FNF\n");
851 extension =
wcsrchr(xlpFile,
'.');
856 if (extension ==
NULL || extension[1] == 0)
858 WARN(
"Returning SE_ERR_NOASSOC\n");
880 while (*
p && *
p !=
' ' && *
p !=
'\t')
p++;
884 while (*
p ==
' ' || *
p ==
'\t')
p++;
887 if (
_wcsicmp(tok, &extension[1]) == 0)
889 wcscpy(lpResult, xlpFile);
904 classnamelen /=
sizeof(
WCHAR);
926 if (finishedLen > resultLen)
927 ERR(
"Argify buffer not large enough.. truncated\n");
929 if (*lpResult ==
'"')
932 while (*(
p + 1) !=
'"')
943 while (*
p !=
' ' && *
p !=
'\0')
958 tok =
wcschr(lpResult,
'^');
962 wcscat(lpResult, xlpFile);
966 wcscat(lpResult, &tok[5]);
984 HSZ hsz1, HSZ hsz2, HDDEDATA hData,
987 TRACE(
"dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n",
988 uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2);
1008 WCHAR app[256],
topic[256], ifexec[256], static_res[256];
1011 LONG applen, topiclen, ifexeclen;
1015 DWORD resultLen, endkeyLen;
1028 endkeyLen =
ARRAY_SIZE(regkey) - (endkey - regkey);
1029 if (
strlenW(
L"\\application") + 1 > endkeyLen)
1034 wcscpy(endkey,
L"\\application");
1035 applen =
sizeof(app);
1047 FIXME(
"size of input parameter %s larger than buffer\n",
1094 if (
strlenW(
L"\\topic") + 1 > endkeyLen)
1100 topiclen =
sizeof(
topic);
1128 TRACE(
"Couldn't launch\n");
1132 if (ddeexec ==
NULL)
1134 TRACE(
"Exiting because ddeexec is NULL. ret=42.\n");
1140 if (
wcscmp(ddeexec,
L"") == 0)
1142 TRACE(
"Exiting because ddeexec is 'empty string'. ret=42.\n");
1150 TRACE(
"Couldn't connect. ret=%d\n",
ret);
1155 if (
strlenW(
L"\\ifexec") + 1 > endkeyLen)
1161 ifexeclen =
sizeof(ifexec);
1216 DWORD cmdlen =
sizeof(
cmd), ddeexeclen =
sizeof(ddeexec);
1233 cmdlen /=
sizeof(
WCHAR);
1240 ERR(
"Argify buffer not large enough, truncating\n");
1283 TRACE(
"returning %s\n", lpResult);
1391 sz +=
sizeof (
WCHAR);
1430 allocatedPidl.
Attach(pidl);
1439 CMINVOKECOMMANDINFOEX ici;
1457 r = cm->QueryContextMenu(
hmenu, 0, 0x20, 0x7fff, CMF_DEFAULTONLY);
1462 for (
i = 0;
i <
n;
i++)
1486 memset(&ici, 0,
sizeof ici);
1487 ici.cbSize =
sizeof ici;
1489 ici.nShow = sei->
nShow;
1491 ici.hwnd = sei->
hwnd;
1494 r = cm->InvokeCommand((LPCMINVOKECOMMANDINFO)&ici);
1496 TRACE(
"invoke command returned %08x\n",
r);
1524 hr =
obj->Initialize(
NULL, dataobj, hkey);
1565 pidl = allocatedPidl;
1596 BOOL fDefault = StrIsNullOrEmpty(sei->
lpVerb);
1597 CMINVOKECOMMANDINFOEX ici = {
sizeof(ici) };
1599 ici.nShow = sei->
nShow;
1603 ici.lpVerbW = sei->
lpVerb;
1605 ici.hwnd = sei->
hwnd;
1606 ici.lpParameters = parameters;
1608 ici.lpDirectory =
dir;
1611 ici.hIcon = sei->
hIcon;
1612 if (ici.fMask & (CMIC_MASK_HASLINKNAME | CMIC_MASK_HASTITLE))
1615 enum { idFirst = 1, idLast = 0x7fff };
1618 hr = cm->QueryContextMenu(hMenu, 0, idFirst, idLast, fDefault ? CMF_DEFAULTONLY : 0);
1624 uDefault = (uDefault != -1) ? uDefault - idFirst : 0;
1629 hr = cm->InvokeCommand((LPCMINVOKECOMMANDINFO)&ici);
1645 HKEY hkey, hkeycm = 0;
1658 r =
RegOpenKeyW(hkey,
L"shellex\\ContextMenuHandlers", &hkeycm);
1705 execCmd,
sizeof(execCmd));
1713 if (!done && wszApplicationName[0])
1718 if (*wszApplicationName !=
'"')
1721 strcatW(wcmd, wszApplicationName);
1725 strcatW(wcmd, wszApplicationName);
1729 ERR(
"Argify buffer not large enough... truncating\n");
1730 return execfunc(wcmd,
NULL,
FALSE, psei, psei_out);
1740 wszApplicationName,
NULL, psei,
1741 psei_out, execfunc );
1756 ERR(
"parameters len exceeds buffer size (%i > %i), truncating\n",
1759 if (
strlenW(
L"explorer.exe") > dwApplicationNameLen)
1760 ERR(
"application len exceeds buffer size (%i), truncating\n",
1761 dwApplicationNameLen);
1762 lstrcpynW(wszApplicationName,
L"explorer.exe", dwApplicationNameLen);
1763 appKnownSingular =
TRUE;
1765 sei->
fMask &= ~SEE_MASK_INVOKEIDLIST;
1782 if (resultLen > dwApplicationNameLen)
1783 ERR(
"Argify buffer not large enough... truncating\n");
1784 appKnownSingular =
FALSE;
1793 appKnownSingular =
TRUE;
1795 sei->
fMask &= ~SEE_MASK_INVOKEIDLIST;
1798 return appKnownSingular;
1820 CMINVOKECOMMANDINFO ici = {
sizeof(ici) };
1822 ici.nShow = sei->nShow;
1823 ici.hwnd = sei->hwnd;
1825 if (sei->lpVerb && sei->lpVerb[0])
1829 ici.lpVerb = szVerb;
1834 const INT idCmdFirst = 1, idCmdLast = 0x7FFF;
1835 hr = pCM->QueryContextMenu(hMenu, 0, idCmdFirst, idCmdLast, CMF_DEFAULTONLY);
1844 if (nDefaultID == -1)
1845 nDefaultID = idCmdFirst;
1849 hr = pCM->InvokeCommand(&ici);
1862 if (wszParameters[0])
1874 if (wszParameters[0])
1877 strcatW(wszQuotedCmd, wszParameters);
1898 lpstrRes =
strchrW(lpFile,
':');
1900 iSize = lpstrRes - lpFile;
1912 memcpy(lpstrProtocol, lpFile, iSize *
sizeof(
WCHAR));
1913 lpstrProtocol[iSize] =
'\0';
1914 strcatW(lpstrProtocol,
L"\\shell\\");
1916 strcatW(lpstrProtocol,
L"\\command");
1919 wcmd, execfunc, psei, psei_out);
1960 return buf.Detach();
1968 static const DWORD unsupportedFlags =
1978 TRACE(
"mask=0x%08x hwnd=%p verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s\n",
1992 wszApplicationName.
Allocate(dwApplicationNameLen);
1993 *wszApplicationName =
'\0';
1997 if(
len-1 >= dwApplicationNameLen)
1998 dwApplicationNameLen =
len;
2000 wszApplicationName.
Allocate(dwApplicationNameLen);
2004 wszApplicationName[
len-2] =
'\0';
2005 appKnownSingular =
TRUE;
2012 if(
l > dwApplicationNameLen) dwApplicationNameLen =
l + 1;
2013 wszApplicationName.
Allocate(dwApplicationNameLen);
2016 if (wszApplicationName[2] == 0 && wszApplicationName[1] ==
L':' &&
2017 ((
L'A' <= wszApplicationName[0] && wszApplicationName[0] <=
L'Z') ||
2018 (
L'a' <= wszApplicationName[0] && wszApplicationName[0] <=
L'z')))
2025 WCHAR parametersBuffer[1024];
2026 LPWSTR wszParameters = parametersBuffer;
2033 if (
len > parametersLen)
2036 wszParameters = wszParamAlloc;
2037 parametersLen =
len;
2042 *wszParameters =
L'\0';
2046 LPWSTR wszDir = dirBuffer;
2057 wszDir = wszDirAlloc;
2064 wszDir = wszDirAlloc;
2088 sei_tmp.
lpFile = wszApplicationName;
2092 if (sei_tmp.
fMask & unsupportedFlags)
2094 FIXME(
"flags ignored: 0x%08x\n", sei_tmp.
fMask & unsupportedFlags);
2107 hr = pSEH->Execute(&sei_tmp);
2115 if (dwApplicationNameLen)
2118 TRACE(
"Unable to get PIDL parsing path\n");
2120 appKnownSingular =
TRUE;
2129 wszApplicationName.
Attach(tmp);
2130 sei_tmp.
lpFile = wszApplicationName;
2160 Info.pcszFile = wszApplicationName;
2190 dwApplicationNameLen );
2201 wszApplicationName.
Attach(
buf.Detach());
2202 sei_tmp.
lpFile = wszApplicationName;
2213 if (sei_tmp.
lpFile[0] ==
L'"')
2219 if (parametersLen <
_countof(parametersBuffer))
2222 wszParameters = parametersBuffer;
2227 wszParameters = wszParamAlloc;
2239 LPWSTR beg = wszApplicationName;
2264 WCHAR wcmdBuffer[1024];
2265 LPWSTR wcmd = wcmdBuffer;
2294 WCHAR wszKeyname[256];
2301 wszApplicationName,
env, &sei_tmp,
2315 swprintf(lpQuotedFile,
L"\"%s\"", lpFile);
2318 wszApplicationName,
env,
2319 &sei_tmp, sei, execfunc);
2333 WCHAR lpstrTmpFile[256];
2335 strcatW(lpstrTmpFile, lpFile);
2348 Info.pcszFile = wszApplicationName;
2370 TRACE(
"%p,%s,%s,%s,%s,%d\n",
2374 sei.
cbSize =
sizeof(sei);
2381 sei.
nShow = iShowCmd;
2505 fOldMask = sei->
fMask;
2515 sei->
fMask = fOldMask;
2535 sei.
cbSize =
sizeof(sei);
2542 sei.
nShow = nShowCmd;
2572 seiW.
cbSize =
sizeof(seiW);
2575 seiW.
nShow = iShowCmd;
2634 for (
pch = psz + 1; *
pch && ich + 1 < cchArg0; ++ich, ++
pch)
2636 if (*
pch ==
L'"' &&
pch[1] ==
L'"')
2639 pszArg0[ich] =
L'"';
2641 else if (*
pch ==
L'"')
2650 pszArg0[ich] = *
pch;
2660 pszArg0[ich] = *
pch;
2688 if (pwszCommand ==
NULL)
2743 apPathList[0] = pwszStartDir;
2744 apPathList[1] =
NULL;
2785 info.lpVerb = pszVerb;
2786 info.lpFile = szFile;
2787 info.lpParameters = (pchParams && *pchParams) ? pchParams :
NULL;
2788 info.lpDirectory = pwszStartDir;
2815 TRACE(
"(%p, %s, %s, %s, %s, %p, %s, %p, %u, %p, %lu)\n",
2821 ExecInfo.
cbSize =
sizeof(ExecInfo);
2824 ExecInfo.
lpVerb = lpOperation;
2825 ExecInfo.
lpFile = lpFile;
2848 if (lphProcess ==
NULL)
2882 TRACE(
"(%p, %s, %s, %s, %s, %p, %s, %p, %u, %p, %lu)\n",
2888 ExecInfo.
cbSize =
sizeof(ExecInfo);
2891 ExecInfo.
lpVerb = lpOperation;
2892 ExecInfo.
lpFile = lpFile;
2915 if (lphProcess ==
NULL)
3010 if (*pszSrc ==
L'"')
3039 for (
INT ich = 0; ; ++ich)
3043 if (pszSrc[ich] && pszSrc[ich] !=
L' ')
3048 if (resolveRelative &&
3063 pchArg = pszSrc + ich;
3071 else if (!resolveRelative)
3090 pchArg = pszSrc + cchPath;
3102 return requiredSize;
3107 return requiredSize;
3120 if (!pszCmdLine || !*pszCmdLine)
3125 if (*pszCmdLine ==
L'?')
3129 fNewMask |= MaskValue;
3133 pszCmdLine = pch2ndQuestion + 1;
3150 execInfo.
fMask = fNewMask;
3154 execInfo.
nShow = nCmdShow;
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
static _In_ LPCWSTR _In_ DWORD _In_ int _In_ int cchDest
#define PRF_TRYPROGRAMEXTENSIONS
#define shell32_hInstance
#define SECL_ALLOW_NONEXE
static void startup(void)
static DWORD const LPVOID const lpReserved
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define UlongToHandle(ul)
#define RegCloseKey(hKey)
bool Allocate(_In_ size_t nElements=1)
static LPCWSTR LPCWSTR LPCWSTR env
HDDEDATA WINAPI DdeClientTransaction(LPBYTE, DWORD, HCONV, HSZ, UINT, UINT, DWORD, LPDWORD)
BOOL WINAPI DdeUninitialize(DWORD)
UINT WINAPI DdeInitializeW(LPDWORD, PFNCALLBACK, DWORD, DWORD)
HCONV WINAPI DdeConnect(DWORD, HSZ, HSZ, PCONVCONTEXT)
UINT WINAPI DdeGetLastError(DWORD)
HSZ WINAPI DdeCreateStringHandleW(DWORD, LPCWSTR, INT)
BOOL WINAPI DdeDisconnect(HCONV)
BOOL WINAPI DdeFreeDataHandle(HDDEDATA)
#define APPCMD_CLIENTONLY
UINT WINAPI DdeInitializeA(LPDWORD, PFNCALLBACK, DWORD, DWORD)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LSTATUS WINAPI RegQueryValueW(HKEY hkey, LPCWSTR name, LPWSTR data, LPLONG count)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
INT WINAPI StrCmpNW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
#define ERROR_INVALID_PARAMETER
#define GetCurrentDirectoryW(x, y)
#define GetEnvironmentVariableW(x, y, z)
#define WideCharToMultiByte
#define ERROR_ACCESS_DENIED
static const WCHAR *const ext[]
#define FAILED_UNEXPECTEDLY(hr)
BOOL WINAPI FreeEnvironmentStringsW(IN LPWSTR EnvironmentStrings)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI SearchPathW(IN LPCWSTR lpPath OPTIONAL, IN LPCWSTR lpFileName, IN LPCWSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart OPTIONAL)
DWORD WINAPI GetShortPathNameW(IN LPCWSTR lpszLongPath, OUT LPWSTR lpszShortPath, IN DWORD cchBuffer)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
VOID WINAPI ExitProcess(IN UINT uExitCode)
BOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName, LPDWORD lpBinaryType)
INT WINAPI GetProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT SHGetNameAndFlagsW(_In_ LPCITEMIDLIST pidl, _In_ DWORD dwFlags, _Out_opt_ LPWSTR pszText, _In_ UINT cchBuf, _Inout_opt_ DWORD *pdwAttributes)
static UINT SeeFlagsToCmicFlags(UINT flags)
EXTERN_C HRESULT SHELL_GetUIObjectOfAbsoluteItem(_In_opt_ HWND hWnd, _In_ PCIDLIST_ABSOLUTE pidl, _In_ REFIID riid, _Out_ void **ppvObj)
HRESULT SHCoInitializeAnyApartment(VOID)
void WINAPI SHFree(LPVOID pv)
BOOL WINAPI PathResolveW(_Inout_ LPWSTR path, _Inout_opt_ LPCWSTR *dirs, _In_ DWORD flags)
HRESULT WINAPI AssocQueryStringW(ASSOCF cfFlags, ASSOCSTR str, LPCWSTR pszAssoc, LPCWSTR pszExtra, LPWSTR pszOut, DWORD *pcchOut)
HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
DWORD WINAPI SHGetAppCompatFlags(DWORD dwUnknown)
PVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
BOOL WINAPI SHUnlockShared(LPVOID lpView)
void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
int WINAPI PathGetDriveNumberW(const WCHAR *path)
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath, LPDWORD pcchPath, DWORD dwReserved)
BOOL WINAPI PathFindOnPathW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs)
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
void WINAPI PathRemoveBlanksW(LPWSTR pszPath)
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
VOID WINAPI PathUnquoteSpacesW(LPWSTR lpszPath)
BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
LPWSTR WINAPI PathGetArgsW(LPCWSTR lpszPath)
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
BOOL WINAPI StrToIntExW(LPCWSTR lpszStr, DWORD dwFlags, int *lpiRet)
LPWSTR WINAPI StrCpyNW(LPWSTR dst, LPCWSTR src, int count)
BOOL WINAPI StrTrimW(LPWSTR lpszStr, LPCWSTR lpszTrim)
LPWSTR WINAPI StrDupW(LPCWSTR lpszStr)
BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
static IShellFolder IShellItem **static IBindCtx LPITEMIDLIST SFGAOF
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble r
GLsizei const GLchar *const * strings
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ BOOL _In_ HANDLE hProcess
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static IPrintDialogCallback callback
static DWORD DWORD void LPSTR DWORD cch
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
unsigned __int3264 UINT_PTR
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
#define _Out_writes_opt_(s)
#define FILE_ATTRIBUTE_DIRECTORY
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
#define PathAddExtensionW
#define PathAddBackslashW
HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc, LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
static const WCHAR szName[]
static const char topic[]
#define strncmpiW(s1, s2, n)
DWORD WINAPI GetVersion()
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define DECLSPEC_HOTPATCH
BOOL HCR_GetDefaultVerbW(HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len)
BOOL HCR_GetExecuteCommandW(HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len)
static __inline void __SHCloneStrWtoA(char **target, const WCHAR *source)
static __inline LPWSTR __SHCloneStrAtoW(WCHAR **target, const char *source)
static __inline void __SHCloneStrW(WCHAR **target, const WCHAR *source)
#define SEE_MASK_FLAG_LOG_USAGE
#define SEE_MASK_DOENVSUBST
#define SEE_MASK_USE_RESERVED
#define SEE_MASK_FLAG_SEPVDM
#define SEE_MASK_CLASSKEY
#define SEE_MASK_NOCLOSEPROCESS
struct _SHELLEXECUTEINFOW SHELLEXECUTEINFOW
#define SEE_MASK_HMONITOR
#define SEE_MASK_CLASSNAME
#define SEE_MASK_HASTITLE
#define SE_ERR_ACCESSDENIED
#define SEE_MASK_WAITFORINPUTIDLE
#define SEE_MASK_FLAG_DDEWAIT
#define SEE_MASK_CONNECTNETDRV
_In_opt_ LPCSTR lpDirectory
#define SEE_MASK_UNKNOWN_0x1000
#define SEE_MASK_INVOKEIDLIST
#define SEE_MASK_FLAG_NO_UI
#define SEE_MASK_NO_CONSOLE
#define SEE_MASK_HASLINKNAME
LONG WINAPI SHRegQueryValueExW(HKEY hkey, LPCWSTR pszValue, LPDWORD pdwReserved, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData)
BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
#define SEE_CMIC_COMMON_BASICFLAGS
static UINT_PTR SHELL_execute_class(LPCWSTR wszApplicationName, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc)
static HRESULT ShellExecute_ContextMenuVerb(LPSHELLEXECUTEINFOW sei)
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExA(LPSHELLEXECUTEINFOA sei)
EXTERN_C VOID WINAPI ShellExec_RunDLLW(_In_opt_ HWND hwnd, _In_opt_ HINSTANCE hInstance, _In_ PCWSTR pszCmdLine, _In_ INT nCmdShow)
HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult)
static HRESULT shellex_load_object_and_run(HKEY hkey, LPCGUID guid, LPSHELLEXECUTEINFOW sei)
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 void ParseNoTildeEffect(PWSTR &res, LPCWSTR &args, DWORD &len, DWORD &used, int argNum)
static BOOL SHELL_InvokePidl(_In_ LPSHELLEXECUTEINFOW sei, _In_ LPCITEMIDLIST pidl)
EXTERN_C void WINAPI OpenAs_RunDLLA(HWND hwnd, HINSTANCE hinst, LPCSTR cmdline, int cmdshow)
static LPCWSTR SplitParams(LPCWSTR psz, LPWSTR pszArg0, size_t cchArg0)
EXTERN_C HINSTANCE WINAPI RealShellExecuteExW(_In_opt_ HWND hwnd, _In_opt_ LPCWSTR lpOperation, _In_opt_ LPCWSTR lpFile, _In_opt_ LPCWSTR lpParameters, _In_opt_ LPCWSTR lpDirectory, _In_opt_ LPWSTR lpReturn, _In_opt_ LPCWSTR lpTitle, _In_opt_ LPVOID lpReserved, _In_ INT nCmdShow, _Out_opt_ PHANDLE lphProcess, _In_ DWORD dwFlags)
static UINT_PTR execute_from_key(LPCWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWSTR szCommandline, LPCWSTR executable_name, SHELL_ExecuteW32 execfunc, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out)
#define STARTF_SHELLPRIVATE
EXTERN_C void WINAPI OpenAs_RunDLLW(HWND hwnd, HINSTANCE hinst, LPCWSTR cmdline, int cmdshow)
static LONG ShellExecute_FromContextMenuHandlers(LPSHELLEXECUTEINFOW sei)
static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb, LPWSTR lpResult, DWORD resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args)
static DWORD ShellExecute_Normal(_Inout_ LPSHELLEXECUTEINFOW sei)
EXTERN_C VOID WINAPI ShellExec_RunDLLA(_In_opt_ HWND hwnd, _In_opt_ HINSTANCE hInstance, _In_ PCSTR pszCmdLine, _In_ INT nCmdShow)
EXTERN_C HINSTANCE WINAPI WOWShellExecute(HWND hWnd, LPCSTR lpVerb, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT iShowCmd, void *callback)
static BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc)
static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA hData, ULONG_PTR dwData1, ULONG_PTR dwData2)
static BOOL SHELL_ArgifyW(WCHAR *out, DWORD len, const WCHAR *fmt, const WCHAR *lpFile, LPITEMIDLIST pidl, LPCWSTR args, DWORD *out_len, const WCHAR *lpDir)
#define SEE_MASK_CLASSALL
static WCHAR * expand_environment(const WCHAR *str)
HINSTANCE WINAPI FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult)
static UINT_PTR SHELL_execute_url(LPCWSTR lpFile, LPCWSTR wcmd, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc)
EXTERN_C LONG PathProcessCommandW(_In_ PCWSTR pszSrc, _Out_writes_opt_(dwBuffSize) PWSTR pszDest, _In_ INT cchDest, _In_ DWORD dwFlags)
static unsigned dde_connect(const WCHAR *key, const WCHAR *start, WCHAR *ddeexec, const WCHAR *lpFile, WCHAR *env, LPCWSTR szCommandline, LPITEMIDLIST pidl, SHELL_ExecuteW32 execfunc, const SHELLEXECUTEINFOW *psei, LPSHELLEXECUTEINFOW psei_out)
static VOID ShellExecute_ShowError(_In_ const SHELLEXECUTEINFOW *ExecInfo, _In_opt_ LPCWSTR pszCaption, _In_ DWORD dwError)
EXTERN_C BOOL PathIsExeW(LPCWSTR lpszPath)
static HRESULT shellex_run_context_menu_default(IShellExtInit *obj, LPSHELLEXECUTEINFOW sei)
static void do_error_dialog(UINT_PTR retval, HWND hwnd, WCHAR *filename)
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
static UINT SHELL_FindExecutableByVerb(LPCWSTR lpVerb, LPWSTR key, LPWSTR classname, LPWSTR command, LONG commandlen)
static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, const SHELLEXECUTEINFOW *psei, LPSHELLEXECUTEINFOW psei_out)
static BOOL SHELL_InRunDllProcess(VOID)
static BOOL SHELL_translate_idlist(LPSHELLEXECUTEINFOW sei, LPWSTR wszParameters, DWORD parametersLen, LPWSTR wszApplicationName, DWORD dwApplicationNameLen)
static HKEY ShellExecute_GetClassKey(const SHELLEXECUTEINFOW *sei)
static HRESULT shellex_get_contextmenu(LPSHELLEXECUTEINFOW sei, CComPtr< IContextMenu > &cm)
EXTERN_C HINSTANCE WINAPI RealShellExecuteA(_In_opt_ HWND hwnd, _In_opt_ LPCSTR lpOperation, _In_opt_ LPCSTR lpFile, _In_opt_ LPCSTR lpParameters, _In_opt_ LPCSTR lpDirectory, _In_opt_ LPSTR lpReturn, _In_opt_ LPCSTR lpTitle, _In_opt_ LPVOID lpReserved, _In_ INT nCmdShow, _Out_opt_ PHANDLE lphProcess)
static HRESULT shellex_get_dataobj(LPSHELLEXECUTEINFOW sei, CComPtr< IDataObject > &dataObj)
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
static VOID ShellExec_RunDLL_Helper(_In_opt_ HWND hwnd, _In_opt_ HINSTANCE hInstance, _In_ PCWSTR pszCmdLine, _In_ INT nCmdShow)
static LPWSTR SHELL_BuildEnvW(const WCHAR *path)
UINT_PTR(* SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, const SHELLEXECUTEINFOW *sei, LPSHELLEXECUTEINFOW sei_out)
static HRESULT SHELL_GetPathFromIDListForExecuteW(LPCITEMIDLIST pidl, LPWSTR pszPath, UINT uOutSize)
static void ParseTildeEffect(PWSTR &res, LPCWSTR &args, DWORD &len, DWORD &used, int argNum)
HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpVerb, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT iShowCmd)
EXTERN_C HINSTANCE WINAPI RealShellExecuteExA(_In_opt_ HWND hwnd, _In_opt_ LPCSTR lpOperation, _In_opt_ LPCSTR lpFile, _In_opt_ LPCSTR lpParameters, _In_opt_ LPCSTR lpDirectory, _In_opt_ LPSTR lpReturn, _In_opt_ LPCSTR lpTitle, _In_opt_ LPVOID lpReserved, _In_ INT nCmdShow, _Out_opt_ PHANDLE lphProcess, _In_ DWORD dwFlags)
static BOOL SHELL_TryAppPathW(LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
EXTERN_C HINSTANCE WINAPI RealShellExecuteW(_In_opt_ HWND hwnd, _In_opt_ LPCWSTR lpOperation, _In_opt_ LPCWSTR lpFile, _In_opt_ LPCWSTR lpParameters, _In_opt_ LPCWSTR lpDirectory, _In_opt_ LPWSTR lpReturn, _In_opt_ LPCWSTR lpTitle, _In_opt_ LPVOID lpReserved, _In_ INT nCmdShow, _Out_opt_ PHANDLE lphProcess)
#define PPCF_FORCEQUALIFY
#define PPCF_LONGESTPOSSIBLE
@ OAIF_ALLOW_REGISTRATION
#define PPCF_ADDARGUMENTS
#define PPCF_NODIRECTORIES
#define SHACF_WIN95SHLEXEC
#define IDS_FILE_NOT_FOUND
#define IDS_SHLEXEC_NOASSOC
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
#define EXCEPTION_NONCONTINUABLE
#define LANG_USER_DEFAULT
#define INVALID_FILE_ATTRIBUTES
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
DWORD WINAPI GetLastError(void)
#define STARTF_USESHOWWINDOW
#define CREATE_UNICODE_ENVIRONMENT
#define FORMAT_MESSAGE_FROM_SYSTEM
#define CREATE_SEPARATE_WOW_VDM
#define FORMAT_MESSAGE_ARGUMENT_ARRAY
LPWSTR WINAPI GetEnvironmentStringsW(void)
#define EXCEPTION_ACCESS_VIOLATION
#define CREATE_NEW_CONSOLE
struct _STARTUPINFOW STARTUPINFOW
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define ERROR_DLL_NOT_FOUND
#define HRESULT_FROM_WIN32(x)
#define ERROR_FUNCTION_FAILED
#define HKEY_LOCAL_MACHINE
#define HKEY_CLASSES_ROOT
HMENU WINAPI CreatePopupMenu(void)
UINT WINAPI GetMenuDefaultItem(_In_ HMENU hMenu, _In_ UINT fByPos, _In_ UINT gmdiFlags)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HMENU WINAPI CreateMenu(void)
LPWSTR WINAPI CharLowerW(_Inout_ LPWSTR)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
DWORD WINAPI WaitForInputIdle(_In_ HANDLE, _In_ DWORD)
#define MAKEINTRESOURCEA(i)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
#define MAKEINTRESOURCEW(i)
#define IID_PPV_ARG(Itype, ppType)
#define IID_NULL_PPV_ARG(Itype, ppType)