30#define SEE_MASK_CLASSALL (SEE_MASK_CLASSNAME | SEE_MASK_CLASSKEY)
37 bool firstCharQuote =
false;
38 bool quotes_opened =
false;
39 bool backslash_encountered =
false;
41 for (
int curArg = 0; curArg <= argNum && *
args; ++curArg)
43 firstCharQuote =
false;
47 firstCharQuote =
true;
56 backslash_encountered = !backslash_encountered;
58 else if (*
args ==
'"')
62 if (*(
args + 1) !=
'"')
64 quotes_opened =
false;
78 backslash_encountered =
false;
82 backslash_encountered =
false;
83 if (*
args ==
' ' && !firstCharQuote)
104 bool quotes_opened =
false;
105 bool backslash_encountered =
false;
107 for (
int curArg = 0; curArg <= argNum && *
args; ++curArg)
114 backslash_encountered = !backslash_encountered;
116 else if (*
args ==
'"')
120 if (*(
args + 1) !=
'"')
122 quotes_opened =
false;
131 quotes_opened =
true;
134 backslash_encountered =
false;
138 backslash_encountered =
false;
139 if (*
args ==
' ' && !quotes_opened && curArg != argNum)
143 if (curArg == argNum)
192 bool tildeEffect =
false;
268 if (!done || (*
fmt ==
'1'))
355 ERR(
"pidl format buffer too small!\n");
377 WCHAR tmpBuffer[1024];
378 PWSTR tmpB = tmpBuffer;
389 if (envRet == 0 || envRet >
MAX_PATH)
452 hr = desktop->GetDisplayNameOf(pidl, SHGDN_FORPARSING, &strret);
473 DWORD dwCreationFlags;
504 startup.dwFlags |= STARTF_TITLEISLINKNAME;
524 WARN(
"CreateProcess returned error %ld\n", retval);
528 TRACE(
"returning %lu\n", retval);
562 if (!got_path)
total += 5;
613 wcscpy(
buffer,
L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
683 commandlen /=
sizeof(
WCHAR);
703 paramlen /=
sizeof(
WCHAR);
706 commandlen += paramlen;
757 WARN(
"(lpFile=%s,lpResult=%s): NULL parameter\n",
770 TRACE(
"SearchPathW returned non-zero\n");
776 TRACE(
"SearchPathW returned non-zero\n");
791 TRACE(
"Returning SE_ERR_FNF\n");
795 extension =
wcsrchr(xlpFile,
'.');
800 if (extension ==
NULL || extension[1] == 0)
802 WARN(
"Returning SE_ERR_NOASSOC\n");
824 while (*
p && *
p !=
' ' && *
p !=
'\t')
p++;
828 while (*
p ==
' ' || *
p ==
'\t')
p++;
831 if (
wcsicmp(tok, &extension[1]) == 0)
833 wcscpy(lpResult, xlpFile);
848 classnamelen /=
sizeof(
WCHAR);
870 if (finishedLen > resultLen)
871 ERR(
"Argify buffer not large enough.. truncated\n");
873 if (*lpResult ==
'"')
876 while (*(
p + 1) !=
'"')
887 while (*
p !=
' ' && *
p !=
'\0')
902 tok =
wcschr(lpResult,
'^');
906 wcscat(lpResult, xlpFile);
910 wcscat(lpResult, &tok[5]);
928 HSZ hsz1, HSZ hsz2, HDDEDATA hData,
931 TRACE(
"dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n",
932 uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2);
952 WCHAR app[256],
topic[256], ifexec[256], static_res[256];
955 LONG applen, topiclen, ifexeclen;
959 DWORD resultLen, endkeyLen;
972 endkeyLen =
ARRAY_SIZE(regkey) - (endkey - regkey);
973 if (
strlenW(
L"\\application") + 1 > endkeyLen)
978 wcscpy(endkey,
L"\\application");
979 applen =
sizeof(app);
991 FIXME(
"size of input parameter %s larger than buffer\n",
1038 if (
strlenW(
L"\\topic") + 1 > endkeyLen)
1044 topiclen =
sizeof(
topic);
1072 TRACE(
"Couldn't launch\n");
1076 if (ddeexec ==
NULL)
1078 TRACE(
"Exiting because ddeexec is NULL. ret=42.\n");
1084 if (
wcscmp(ddeexec,
L"") == 0)
1086 TRACE(
"Exiting because ddeexec is 'empty string'. ret=42.\n");
1094 TRACE(
"Couldn't connect. ret=%d\n",
ret);
1099 if (
strlenW(
L"\\ifexec") + 1 > endkeyLen)
1105 ifexeclen =
sizeof(ifexec);
1161 DWORD cmdlen =
sizeof(
cmd), ddeexeclen =
sizeof(ddeexec);
1178 cmdlen /=
sizeof(
WCHAR);
1185 ERR(
"Argify buffer not large enough, truncating\n");
1228 TRACE(
"returning %s\n", lpResult);
1336 sz +=
sizeof (
WCHAR);
1377 allocatedPidl.
Attach(pidl);
1393 CMINVOKECOMMANDINFOEX ici;
1411 r = cm->QueryContextMenu(
hmenu, 0, 0x20, 0x7fff, CMF_DEFAULTONLY);
1416 for (
i = 0;
i <
n;
i++)
1440 memset(&ici, 0,
sizeof ici);
1441 ici.cbSize =
sizeof ici;
1443 ici.nShow = sei->
nShow;
1445 ici.hwnd = sei->
hwnd;
1448 r = cm->InvokeCommand((LPCMINVOKECOMMANDINFO)&ici);
1450 TRACE(
"invoke command returned %08x\n",
r);
1478 hr =
obj->Initialize(
NULL, dataobj, hkey);
1519 pidl = allocatedPidl;
1549 CMINVOKECOMMANDINFOEX ici = {};
1550 ici.cbSize =
sizeof ici;
1552 ici.nShow = sei->
nShow;
1554 ici.hwnd = sei->
hwnd;
1555 ici.lpParameters = parameters;
1558 BOOL fDefault = !ici.lpVerb || !ici.lpVerb[0];
1559 hr = cm->QueryContextMenu(hMenu, 0, 1, 0x7fff, fDefault ? CMF_DEFAULTONLY : 0);
1565 uDefault = (uDefault != -1) ? uDefault - 1 : 0;
1569 hr = cm->InvokeCommand((LPCMINVOKECOMMANDINFO)&ici);
1586 HKEY hkey, hkeycm = 0;
1599 r =
RegOpenKeyW(hkey,
L"shellex\\ContextMenuHandlers", &hkeycm);
1646 execCmd,
sizeof(execCmd));
1654 if (!done && wszApplicationName[0])
1657 if (*wszApplicationName !=
'"')
1660 strcatW(wcmd, wszApplicationName);
1664 strcatW(wcmd, wszApplicationName);
1667 ERR(
"Argify buffer not large enough... truncating\n");
1668 return execfunc(wcmd,
NULL,
FALSE, psei, psei_out);
1678 wszApplicationName,
NULL, psei,
1679 psei_out, execfunc );
1694 ERR(
"parameters len exceeds buffer size (%i > %i), truncating\n",
1697 if (
strlenW(
L"explorer.exe") > dwApplicationNameLen)
1698 ERR(
"application len exceeds buffer size (%i), truncating\n",
1699 dwApplicationNameLen);
1700 lstrcpynW(wszApplicationName,
L"explorer.exe", dwApplicationNameLen);
1701 appKnownSingular =
TRUE;
1703 sei->
fMask &= ~SEE_MASK_INVOKEIDLIST;
1720 if (resultLen > dwApplicationNameLen)
1721 ERR(
"Argify buffer not large enough... truncating\n");
1722 appKnownSingular =
FALSE;
1724 sei->
fMask &= ~SEE_MASK_INVOKEIDLIST;
1727 return appKnownSingular;
1734 WCHAR *wszQuotedCmd;
1738 if (wszParameters[0])
1750 if (wszParameters[0])
1753 strcatW(wszQuotedCmd, wszParameters);
1761 retval = execfunc(wszQuotedCmd,
env,
FALSE, psei, psei_out);
1769 WCHAR *lpstrProtocol;
1774 lpstrRes =
strchrW(lpFile,
':');
1776 iSize = lpstrRes - lpFile;
1788 memcpy(lpstrProtocol, lpFile, iSize *
sizeof(
WCHAR));
1789 lpstrProtocol[iSize] =
'\0';
1790 strcatW(lpstrProtocol,
L"\\shell\\");
1792 strcatW(lpstrProtocol,
L"\\command");
1795 wcmd, execfunc, psei, psei_out);
1846 static const DWORD unsupportedFlags =
1851 WCHAR parametersBuffer[1024], dirBuffer[
MAX_PATH], wcmdBuffer[1024];
1852 WCHAR *wszApplicationName, *wszParameters, *wszDir, *wcmd;
1861 WCHAR wszKeyname[256];
1869 TRACE(
"mask=0x%08x hwnd=%p verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s\n",
1882 *wszApplicationName =
'\0';
1886 if(
len-1 >= dwApplicationNameLen)
1887 dwApplicationNameLen =
len;
1893 wszApplicationName[
len-2] =
'\0';
1894 appKnownSingular =
TRUE;
1901 if(
l > dwApplicationNameLen) dwApplicationNameLen =
l + 1;
1905 if (wszApplicationName[2] == 0 && wszApplicationName[1] ==
L':' &&
1906 ((
L'A' <= wszApplicationName[0] && wszApplicationName[0] <=
L'Z') ||
1907 (
L'a' <= wszApplicationName[0] && wszApplicationName[0] <=
L'z')))
1914 wszParameters = parametersBuffer;
1918 if (
len > parametersLen)
1921 parametersLen =
len;
1926 *wszParameters =
L'\0';
1943 sei_tmp.
lpFile = wszApplicationName;
1947 if (sei_tmp.
fMask & unsupportedFlags)
1949 FIXME(
"flags ignored: 0x%08x\n", sei_tmp.
fMask & unsupportedFlags);
1962 hr = pSEH->Execute(&sei_tmp);
1967 if (wszParameters != parametersBuffer)
1969 if (wszDir != dirBuffer)
1976 appKnownSingular =
TRUE;
1990 sei_tmp.
lpFile = wszApplicationName = tmp;
2008 if (wszParameters != parametersBuffer)
2010 if (wszDir != dirBuffer)
2021 if (wszParameters != parametersBuffer)
2023 if (wszDir != dirBuffer)
2038 Info.pcszFile = wszApplicationName;
2047 if (wszParameters != parametersBuffer)
2049 if (wszDir != dirBuffer)
2060 dwApplicationNameLen );
2078 wszApplicationName =
buf;
2079 sei_tmp.
lpFile = wszApplicationName;
2091 wszApplicationName =
buf;
2094 sei_tmp.
lpFile = wszApplicationName;
2107 if (wszDir != dirBuffer)
2121 if (sei_tmp.
lpFile[0] ==
L'"')
2159 LPWSTR beg = wszApplicationName;
2204 swprintf(wcmd,
L"\"%s\"", wszApplicationName);
2211 retval = execfunc(wcmd,
NULL,
FALSE, &sei_tmp, sei);
2215 if (wszParameters != parametersBuffer)
2217 if (wszDir != dirBuffer)
2219 if (wcmd != wcmdBuffer)
2231 wszApplicationName,
env, &sei_tmp,
2247 swprintf(lpQuotedFile,
L"\"%s\"", lpFile);
2250 wszApplicationName,
env,
2251 &sei_tmp, sei, execfunc);
2267 WCHAR lpstrTmpFile[256];
2269 strcatW(lpstrTmpFile, lpFile);
2273 TRACE(
"retval %lu\n", retval);
2282 Info.pcszFile = wszApplicationName;
2292 if (wszParameters != parametersBuffer)
2294 if (wszDir != dirBuffer)
2296 if (wcmd != wcmdBuffer)
2312 TRACE(
"%p,%s,%s,%s,%s,%d\n",
2316 sei.
cbSize =
sizeof(sei);
2323 sei.
nShow = iShowCmd;
2408 sei.
cbSize =
sizeof(sei);
2415 sei.
nShow = nShowCmd;
2443 seiW.
cbSize =
sizeof(seiW);
2446 seiW.
nShow = iShowCmd;
2505 for (
pch = psz + 1; *
pch && ich + 1 < cchArg0; ++ich, ++
pch)
2507 if (*
pch ==
L'"' &&
pch[1] ==
L'"')
2510 pszArg0[ich] =
L'"';
2512 else if (*
pch ==
L'"')
2521 pszArg0[ich] = *
pch;
2531 pszArg0[ich] = *
pch;
2559 if (pwszCommand ==
NULL)
2613 apPathList[0] = pwszStartDir;
2614 apPathList[1] =
NULL;
2655 info.lpVerb = pszVerb;
2656 info.lpFile = szFile;
2657 info.lpParameters = (pchParams && *pchParams) ? pchParams :
NULL;
2658 info.lpDirectory = pwszStartDir;
2697 TRACE(
"(%p, %s, %s, %s, %s, %p, %s, %p, %u, %p, %lu)\n",
2700 lpReserved, nCmdShow, lphProcess,
dwFlags);
2703 ExecInfo.
cbSize =
sizeof(ExecInfo);
2706 ExecInfo.
lpVerb = lpOperation;
2707 ExecInfo.
lpFile = lpFile;
2730 if (lphProcess ==
NULL)
2764 TRACE(
"(%p, %s, %s, %s, %s, %p, %s, %p, %u, %p, %lu)\n",
2767 lpReserved, nCmdShow, lphProcess,
dwFlags);
2770 ExecInfo.
cbSize =
sizeof(ExecInfo);
2773 ExecInfo.
lpVerb = lpOperation;
2774 ExecInfo.
lpFile = lpFile;
2797 if (lphProcess ==
NULL)
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define PRF_TRYPROGRAMEXTENSIONS
#define shell32_hInstance
#define SECL_ALLOW_NONEXE
#define DECLSPEC_HOTPATCH
static void startup(void)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
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)
#define ERROR_INVALID_PARAMETER
#define GetCurrentDirectoryW(x, y)
#define GetEnvironmentVariableW(x, y, z)
#define HeapFree(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)
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)
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)
BOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName, LPDWORD lpBinaryType)
INT WINAPI GetProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
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)
PVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
BOOL WINAPI SHUnlockShared(LPVOID lpView)
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath, LPDWORD pcchPath, DWORD dwReserved)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
BOOL WINAPI StrTrimW(LPWSTR lpszStr, LPCWSTR lpszTrim)
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 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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
_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
#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)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
static const WCHAR szName[]
static const char topic[]
#define strncmpiW(s1, s2, n)
DWORD WINAPI GetVersion()
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_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)
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
#define SEE_MASK_HMONITOR
#define SEE_MASK_CLASSNAME
#define SEE_MASK_HASTITLE
#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)
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)
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)
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)
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)
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)
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)
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_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 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)
@ OAIF_ALLOW_REGISTRATION
#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
_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 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 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 IID_PPV_ARG(Itype, ppType)
#define IID_NULL_PPV_ARG(Itype, ppType)