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);
1260 WCHAR old_dir[1024];
1313 sz +=
sizeof (
WCHAR);
1354 allocatedPidl.
Attach(pidl);
1370 CMINVOKECOMMANDINFOEX ici;
1388 r = cm->QueryContextMenu(
hmenu, 0, 0x20, 0x7fff, CMF_DEFAULTONLY);
1393 for (
i = 0;
i <
n;
i++)
1417 memset(&ici, 0,
sizeof ici);
1418 ici.cbSize =
sizeof ici;
1420 ici.nShow = sei->
nShow;
1422 ici.hwnd = sei->
hwnd;
1425 r = cm->InvokeCommand((LPCMINVOKECOMMANDINFO)&ici);
1427 TRACE(
"invoke command returned %08x\n",
r);
1455 hr =
obj->Initialize(
NULL, dataobj, hkey);
1496 pidl = allocatedPidl;
1526 CMINVOKECOMMANDINFOEX ici = {};
1527 ici.cbSize =
sizeof ici;
1529 ici.nShow = sei->
nShow;
1531 ici.hwnd = sei->
hwnd;
1532 ici.lpParameters = parameters;
1535 BOOL fDefault = !ici.lpVerb || !ici.lpVerb[0];
1536 hr = cm->QueryContextMenu(hMenu, 0, 1, 0x7fff, fDefault ? CMF_DEFAULTONLY : 0);
1542 uDefault = (uDefault != -1) ? uDefault - 1 : 0;
1546 hr = cm->InvokeCommand((LPCMINVOKECOMMANDINFO)&ici);
1563 HKEY hkey, hkeycm = 0;
1576 r =
RegOpenKeyW(hkey,
L"shellex\\ContextMenuHandlers", &hkeycm);
1623 execCmd,
sizeof(execCmd));
1631 if (!done && wszApplicationName[0])
1634 if (*wszApplicationName !=
'"')
1637 strcatW(wcmd, wszApplicationName);
1641 strcatW(wcmd, wszApplicationName);
1644 ERR(
"Argify buffer not large enough... truncating\n");
1645 return execfunc(wcmd,
NULL,
FALSE, psei, psei_out);
1655 wszApplicationName,
NULL, psei,
1656 psei_out, execfunc );
1671 ERR(
"parameters len exceeds buffer size (%i > %i), truncating\n",
1674 if (
strlenW(
L"explorer.exe") > dwApplicationNameLen)
1675 ERR(
"application len exceeds buffer size (%i), truncating\n",
1676 dwApplicationNameLen);
1677 lstrcpynW(wszApplicationName,
L"explorer.exe", dwApplicationNameLen);
1678 appKnownSingular =
TRUE;
1680 sei->
fMask &= ~SEE_MASK_INVOKEIDLIST;
1697 if (resultLen > dwApplicationNameLen)
1698 ERR(
"Argify buffer not large enough... truncating\n");
1699 appKnownSingular =
FALSE;
1701 sei->
fMask &= ~SEE_MASK_INVOKEIDLIST;
1704 return appKnownSingular;
1711 WCHAR *wszQuotedCmd;
1715 if (wszParameters[0])
1727 if (wszParameters[0])
1730 strcatW(wszQuotedCmd, wszParameters);
1738 retval = execfunc(wszQuotedCmd,
env,
FALSE, psei, psei_out);
1746 WCHAR *lpstrProtocol;
1751 lpstrRes =
strchrW(lpFile,
':');
1753 iSize = lpstrRes - lpFile;
1765 memcpy(lpstrProtocol, lpFile, iSize *
sizeof(
WCHAR));
1766 lpstrProtocol[iSize] =
'\0';
1767 strcatW(lpstrProtocol,
L"\\shell\\");
1769 strcatW(lpstrProtocol,
L"\\command");
1772 wcmd, execfunc, psei, psei_out);
1823 static const DWORD unsupportedFlags =
1828 WCHAR parametersBuffer[1024], dirBuffer[
MAX_PATH], wcmdBuffer[1024];
1829 WCHAR *wszApplicationName, *wszParameters, *wszDir, *wcmd;
1838 WCHAR wszKeyname[256];
1846 TRACE(
"mask=0x%08x hwnd=%p verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s\n",
1859 *wszApplicationName =
'\0';
1863 if(
len-1 >= dwApplicationNameLen)
1864 dwApplicationNameLen =
len;
1870 wszApplicationName[
len-2] =
'\0';
1871 appKnownSingular =
TRUE;
1878 if(
l > dwApplicationNameLen) dwApplicationNameLen =
l + 1;
1882 if (wszApplicationName[2] == 0 && wszApplicationName[1] ==
L':' &&
1883 ((
L'A' <= wszApplicationName[0] && wszApplicationName[0] <=
L'Z') ||
1884 (
L'a' <= wszApplicationName[0] && wszApplicationName[0] <=
L'z')))
1891 wszParameters = parametersBuffer;
1895 if (
len > parametersLen)
1898 parametersLen =
len;
1903 *wszParameters =
L'\0';
1920 sei_tmp.
lpFile = wszApplicationName;
1924 if (sei_tmp.
fMask & unsupportedFlags)
1926 FIXME(
"flags ignored: 0x%08x\n", sei_tmp.
fMask & unsupportedFlags);
1939 hr = pSEH->Execute(&sei_tmp);
1944 if (wszParameters != parametersBuffer)
1946 if (wszDir != dirBuffer)
1953 appKnownSingular =
TRUE;
1967 sei_tmp.
lpFile = wszApplicationName = tmp;
1985 if (wszParameters != parametersBuffer)
1987 if (wszDir != dirBuffer)
1998 if (wszParameters != parametersBuffer)
2000 if (wszDir != dirBuffer)
2015 Info.pcszFile = wszApplicationName;
2024 if (wszParameters != parametersBuffer)
2026 if (wszDir != dirBuffer)
2037 dwApplicationNameLen );
2055 wszApplicationName =
buf;
2056 sei_tmp.
lpFile = wszApplicationName;
2068 wszApplicationName =
buf;
2071 sei_tmp.
lpFile = wszApplicationName;
2084 if (wszDir != dirBuffer)
2098 if (sei_tmp.
lpFile[0] ==
L'"')
2136 LPWSTR beg = wszApplicationName;
2181 swprintf(wcmd,
L"\"%s\"", wszApplicationName);
2188 retval = execfunc(wcmd,
NULL,
FALSE, &sei_tmp, sei);
2192 if (wszParameters != parametersBuffer)
2194 if (wszDir != dirBuffer)
2196 if (wcmd != wcmdBuffer)
2208 wszApplicationName,
env, &sei_tmp,
2224 swprintf(lpQuotedFile,
L"\"%s\"", lpFile);
2227 wszApplicationName,
env,
2228 &sei_tmp, sei, execfunc);
2244 WCHAR lpstrTmpFile[256];
2246 strcatW(lpstrTmpFile, lpFile);
2250 TRACE(
"retval %lu\n", retval);
2259 Info.pcszFile = wszApplicationName;
2269 if (wszParameters != parametersBuffer)
2271 if (wszDir != dirBuffer)
2273 if (wcmd != wcmdBuffer)
2289 TRACE(
"%p,%s,%s,%s,%s,%d\n",
2293 sei.
cbSize =
sizeof(sei);
2300 sei.
nShow = iShowCmd;
2385 sei.
cbSize =
sizeof(sei);
2392 sei.
nShow = nShowCmd;
2420 seiW.
cbSize =
sizeof(seiW);
2423 seiW.
nShow = iShowCmd;
2482 for (
pch = psz + 1; *
pch && ich + 1 < cchArg0; ++ich, ++
pch)
2484 if (*
pch ==
L'"' &&
pch[1] ==
L'"')
2487 pszArg0[ich] =
L'"';
2489 else if (*
pch ==
L'"')
2498 pszArg0[ich] = *
pch;
2508 pszArg0[ich] = *
pch;
2536 if (pwszCommand ==
NULL)
2590 apPathList[0] = pwszStartDir;
2591 apPathList[1] =
NULL;
2632 info.lpVerb = pszVerb;
2633 info.lpFile = szFile;
2634 info.lpParameters = (pchParams && *pchParams) ? pchParams :
NULL;
2635 info.lpDirectory = pwszStartDir;
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#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[]
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 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)
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)
LPWSTR WINAPI PathAddBackslashW(LPWSTR lpszPath)
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 PathAddExtensionW(LPWSTR lpszPath, LPCWSTR lpszExtension)
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 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)
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_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_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 FAILED_UNEXPECTEDLY(hr)
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)
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)
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)
static BOOL SHELL_TryAppPathW(LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
@ 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 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 EXCEPTION_NONCONTINUABLE
#define IID_PPV_ARG(Itype, ppType)
#define IID_NULL_PPV_ARG(Itype, ppType)