mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[BROWSEUI][BROWSEUI_APITEST] SHExplorerParseCmdLine(): Sync and improve (#3231)
ROSTESTS-302 - SHCreateFromDesktop(): Sync declaration and spec. - SHExplorerParseCmdLine(): Sync declaration, header and spec. - SHExplorerParseCmdLine: Enforce 'UINT_PTR' return type. Addendum toe39876d
and0f8439a
. - SHExplorerParseCmdLine: Replace '*EXPLORER_INFO' - SHExplorerParseCmdLine: Fix x64 support; Fix some results.
This commit is contained in:
parent
25019525f8
commit
7e22dc05ca
5 changed files with 90 additions and 82 deletions
|
@ -3,8 +3,8 @@
|
|||
103 stdcall -noname SHOpenNewFrame(ptr ptr long long)
|
||||
@ stdcall -private DllCanUnloadNow()
|
||||
105 stdcall -noname SHCreateSavedWindows()
|
||||
106 stdcall -noname SHCreateFromDesktop(long)
|
||||
107 stdcall -noname SHExplorerParseCmdLine(wstr)
|
||||
106 stdcall -noname SHCreateFromDesktop(ptr)
|
||||
107 stdcall -noname SHExplorerParseCmdLine(ptr)
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllGetVersion(ptr)
|
||||
@ stdcall -private DllInstall(long wstr)
|
||||
|
|
|
@ -609,7 +609,7 @@ extern "C" HRESULT WINAPI SHOpenNewFrame(LPITEMIDLIST pidl, IUnknown *paramC, lo
|
|||
* SHCreateFromDesktop [BROWSEUI.106]
|
||||
* parameter is a FolderInfo
|
||||
*/
|
||||
BOOL WINAPI SHCreateFromDesktop(ExplorerCommandLineParseResults * parseResults)
|
||||
BOOL WINAPI SHCreateFromDesktop(_In_ PEXPLORER_CMDLINE_PARSE_RESULTS parseResults)
|
||||
{
|
||||
TRACE("SHCreateFromDesktop\n");
|
||||
|
||||
|
|
|
@ -225,10 +225,11 @@ static LPITEMIDLIST _GetDocumentsPidl()
|
|||
/*************************************************************************
|
||||
* SHExplorerParseCmdLine [BROWSEUI.107]
|
||||
*/
|
||||
// Returns FALSE, TRUE or an address.
|
||||
extern "C"
|
||||
UINT_PTR
|
||||
WINAPI
|
||||
SHExplorerParseCmdLine(ExplorerCommandLineParseResults * pInfo)
|
||||
SHExplorerParseCmdLine(_Out_ PEXPLORER_CMDLINE_PARSE_RESULTS pInfo)
|
||||
{
|
||||
WCHAR strField[MAX_PATH];
|
||||
WCHAR strDir[MAX_PATH];
|
||||
|
@ -246,7 +247,7 @@ SHExplorerParseCmdLine(ExplorerCommandLineParseResults * pInfo)
|
|||
PathStripToRootW(strDir);
|
||||
pInfo->pidlPath = ILCreateFromPathW(strDir);
|
||||
}
|
||||
return (LONG_PTR)(pInfo->pidlPath);
|
||||
return (UINT_PTR)pInfo->pidlPath;
|
||||
}
|
||||
|
||||
PCWSTR strNextArg = _FindFirstField(strFieldArray);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
//#define UNICODE
|
||||
#include <strsafe.h>
|
||||
#include <shlobj.h>
|
||||
#include <browseui_undoc.h>
|
||||
|
||||
// Macro parameters are only expanded in the second nesting...
|
||||
#define _WIDEN(x) L##x
|
||||
|
@ -22,21 +23,8 @@
|
|||
#define TEST_PATHA "C:\\SHExplorerParseCmdLine.test"
|
||||
#define TEST_PATHW WIDEN(TEST_PATHA)
|
||||
|
||||
#define PADDING_SIZE 0x100
|
||||
|
||||
typedef struct _EXPLORER_INFO
|
||||
{
|
||||
PWSTR FileName;
|
||||
PIDLIST_ABSOLUTE pidl;
|
||||
DWORD dwFlags;
|
||||
ULONG Unknown1[5];
|
||||
PIDLIST_ABSOLUTE pidlRoot;
|
||||
CLSID clsid;
|
||||
GUID guidInproc;
|
||||
ULONG Padding[PADDING_SIZE];
|
||||
} EXPLORER_INFO, *PEXPLORER_INFO;
|
||||
|
||||
UINT_PTR (WINAPI *SHExplorerParseCmdLine)(_Out_ PEXPLORER_INFO Info);
|
||||
typedef UINT_PTR (WINAPI * SHExplorerParseCmdLine_Type)(PEXPLORER_CMDLINE_PARSE_RESULTS);
|
||||
static SHExplorerParseCmdLine_Type pSHExplorerParseCmdLine;
|
||||
|
||||
#define PIDL_IS_UNTOUCHED -1
|
||||
#define PIDL_IS_NULL -2
|
||||
|
@ -46,6 +34,7 @@ UINT_PTR (WINAPI *SHExplorerParseCmdLine)(_Out_ PEXPLORER_INFO Info);
|
|||
|
||||
#define InvalidPointer ((PVOID)0x5555555555555555ULL)
|
||||
|
||||
static
|
||||
DWORD ReplaceSubstr(
|
||||
_Out_ PWCHAR OutputStr,
|
||||
_In_ DWORD OutputLen,
|
||||
|
@ -81,7 +70,7 @@ static
|
|||
VOID
|
||||
TestCommandLine(
|
||||
_In_ ULONG TestLine,
|
||||
_In_ INT ExpectedRet,
|
||||
_In_ UINT_PTR ExpectedRet,
|
||||
_In_ INT ExpectedCsidl,
|
||||
_In_ DWORD ExpectedFlags,
|
||||
_In_ PCWSTR ExpectedFileName,
|
||||
|
@ -89,46 +78,58 @@ _In_ PCWSTR PidlPath,
|
|||
_In_ PCWSTR pclsid,
|
||||
_Out_opt_ PUINT PWriteEnd)
|
||||
{
|
||||
EXPLORER_INFO Info;
|
||||
EXPLORER_CMDLINE_PARSE_RESULTS Info;
|
||||
UINT_PTR Ret;
|
||||
ULONG i;
|
||||
PDWORD InfoWords = (PDWORD) &Info;
|
||||
|
||||
FillMemory(&Info, sizeof(Info), 0x55);
|
||||
Info.dwFlags = 0x00000000;
|
||||
Ret = SHExplorerParseCmdLine(&Info);
|
||||
Ret = pSHExplorerParseCmdLine(&Info);
|
||||
|
||||
// Special case for empty cmdline: Ret is the PIDL for the selected folder.
|
||||
if (ExpectedRet == -1)
|
||||
ok((LPITEMIDLIST) Ret == Info.pidl, "Line %lu: Ret = %x, expected %p\n", TestLine, Ret, Info.pidl);
|
||||
else
|
||||
ok(Ret == ExpectedRet, "Line %lu: Ret = %x, expected %08x\n", TestLine, Ret, ExpectedRet);
|
||||
|
||||
if (ExpectedFileName == NULL)
|
||||
ok(Info.FileName == InvalidPointer, "Line %lu: FileName = %p\n", TestLine, Info.FileName);
|
||||
{
|
||||
ok(Ret == (UINT_PTR)Info.pidlPath, "Line %lu: Ret = %p, expected %p\n", TestLine, (PVOID)Ret, Info.pidlPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
ok(Info.FileName != NULL && Info.FileName != InvalidPointer, "Line %lu: FileName = %p\n", TestLine, Info.FileName);
|
||||
if (Info.FileName != NULL && Info.FileName != InvalidPointer)
|
||||
ok(Ret == ExpectedRet, "Line %lu: Ret = 0x%Ix, expected 0x%Ix\n", TestLine, Ret, ExpectedRet);
|
||||
}
|
||||
|
||||
if (ExpectedFileName == NULL)
|
||||
{
|
||||
ok(Info.strPath == InvalidPointer, "Line %lu: strPath = %p\n", TestLine, Info.strPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
ok(Info.strPath != InvalidPointer, "Line %lu: strPath = InvalidPointer\n", TestLine);
|
||||
ok(Info.strPath != NULL, "Line %lu: strPath = NULL\n", TestLine);
|
||||
if (Info.strPath != NULL && Info.strPath != InvalidPointer)
|
||||
{
|
||||
ok(!wcscmp(Info.FileName, ExpectedFileName), "Line %lu: FileName = %ls, expected %ls\n", TestLine, Info.FileName, ExpectedFileName);
|
||||
LocalFree(Info.FileName);
|
||||
ok(!wcscmp(Info.strPath, ExpectedFileName), "Line %lu: strPath = %ls, expected %ls\n", TestLine, Info.strPath, ExpectedFileName);
|
||||
LocalFree(Info.strPath);
|
||||
}
|
||||
}
|
||||
|
||||
ok(Info.dwFlags == ExpectedFlags, "Line %lu: dwFlags = %08lx, expected %08lx\n", TestLine, Info.dwFlags, ExpectedFlags);
|
||||
|
||||
if (ExpectedCsidl == PIDL_IS_UNTOUCHED)
|
||||
ok(Info.pidl == InvalidPointer, "Line %lu: pidl = %p\n", TestLine, Info.pidl);
|
||||
{
|
||||
ok(Info.pidlPath == InvalidPointer, "Line %lu: pidlPath = %p\n", TestLine, Info.pidlPath);
|
||||
}
|
||||
else if (ExpectedCsidl == PIDL_IS_NULL)
|
||||
ok(Info.pidl == NULL, "Line %lu: pidl = %p\n", TestLine, Info.pidl);
|
||||
{
|
||||
ok(Info.pidlPath == NULL, "Line %lu: pidlPath = %p\n", TestLine, Info.pidlPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
PIDLIST_ABSOLUTE ExpectedPidl;
|
||||
HRESULT hr;
|
||||
|
||||
ok(Info.pidl != NULL, "Line %lu: pidl = %p\n", TestLine, Info.pidl);
|
||||
if (Info.pidl != NULL && Info.pidl != InvalidPointer)
|
||||
ok(Info.pidlPath != InvalidPointer, "Line %lu: pidlPath = InvalidPointer\n", TestLine);
|
||||
ok(Info.pidlPath != NULL, "Line %lu: pidlPath = NULL\n", TestLine);
|
||||
if (Info.pidlPath != NULL && Info.pidlPath != InvalidPointer)
|
||||
{
|
||||
WCHAR pidlPathName[MAX_PATH] = L"";
|
||||
WCHAR pidlPathTest[MAX_PATH] = L"";
|
||||
|
@ -159,10 +160,7 @@ _Out_opt_ PUINT PWriteEnd)
|
|||
}
|
||||
}
|
||||
|
||||
if (Info.pidl != NULL && Info.pidl != (LPITEMIDLIST) 0x55555555)
|
||||
{
|
||||
SHGetPathFromIDListW(Info.pidl, pidlPathName);
|
||||
}
|
||||
SHGetPathFromIDListW(Info.pidlPath, pidlPathName);
|
||||
|
||||
if (ExpectedCsidl == PIDL_PATH_EQUALS_PATH)
|
||||
{
|
||||
|
@ -181,7 +179,7 @@ _Out_opt_ PUINT PWriteEnd)
|
|||
ok(ExpectedPidl != NULL, "Line %lu: SHSimpleIDListFromPath(%S) failed. pidlPathName=%S\n", TestLine, pidlPathTest, pidlPathName);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
ok(ILIsEqual(Info.pidl, ExpectedPidl), "Line %lu: Unexpected pidl value %p; pidlPathName=%S pidlPathTest=%S\n", TestLine, Info.pidl, pidlPathName, pidlPathTest);
|
||||
ok(ILIsEqual(Info.pidlPath, ExpectedPidl), "Line %lu: Unexpected pidlPath value %p; pidlPathName=%S pidlPathTest=%S\n", TestLine, Info.pidlPath, pidlPathName, pidlPathTest);
|
||||
ILFree(ExpectedPidl);
|
||||
}
|
||||
}
|
||||
|
@ -191,34 +189,40 @@ _Out_opt_ PUINT PWriteEnd)
|
|||
ok(hr == S_OK, "Line %lu: SHGetFolderLocation returned %08lx\n", TestLine, hr);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
BOOL eq = ILIsEqual(Info.pidl, ExpectedPidl);
|
||||
BOOL eq = ILIsEqual(Info.pidlPath, ExpectedPidl);
|
||||
ILFree(ExpectedPidl);
|
||||
|
||||
ok(eq, "Line %lu: Unexpected pidl value %p; pidlPathName=%S CSIDL=%d\n", TestLine, Info.pidl, pidlPathName, ExpectedCsidl);
|
||||
ok(eq, "Line %lu: Unexpected pidlPath value %p; pidlPathName=%S CSIDL=%d\n", TestLine, Info.pidlPath, pidlPathName, ExpectedCsidl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Info.pidl != NULL && Info.pidl != (LPITEMIDLIST) 0x55555555)
|
||||
ILFree(Info.pidl);
|
||||
ILFree(Info.pidlPath);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < sizeof(Info) / sizeof(DWORD); i++)
|
||||
{
|
||||
switch (i*4)
|
||||
switch (i * sizeof(DWORD))
|
||||
{
|
||||
case 0x00: // FileName
|
||||
case 0x04: // pidl
|
||||
case 0x08: // dwFlags
|
||||
case 0x20: // pidlRoot
|
||||
case 0x34: // guidInproc (1/4)
|
||||
case 0x38: // guidInproc (2/4)
|
||||
case 0x3C: // guidInproc (3/4)
|
||||
case 0x40: // guidInproc (4/4)
|
||||
break;
|
||||
default:
|
||||
ok(InfoWords[i] == 0x55555555, "Line %lu: Word 0x%02lx has been set to 0x%08lx\n", TestLine, i * 4, InfoWords[i]);
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, strPath):
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, pidlPath):
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, dwFlags):
|
||||
// TODO: 'case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, nCmdShow):'?
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, pidlRoot):
|
||||
// TODO: 'case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, clsid):'?
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, guidInproc) + (0 * sizeof(DWORD)):
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, guidInproc) + (1 * sizeof(DWORD)):
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, guidInproc) + (2 * sizeof(DWORD)):
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, guidInproc) + (3 * sizeof(DWORD)):
|
||||
#ifdef _WIN64
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, strPath) + sizeof(DWORD):
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, pidlPath) + sizeof(DWORD):
|
||||
case FIELD_OFFSET(EXPLORER_CMDLINE_PARSE_RESULTS, pidlRoot) + sizeof(DWORD):
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
ok(InfoWords[i] == 0x55555555, "Line %lu: Word 0x%02lx has been set to 0x%08lx\n", TestLine, i * sizeof(DWORD), InfoWords[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,7 +266,7 @@ START_TEST(SHExplorerParseCmdLine)
|
|||
{
|
||||
INT TestLine;
|
||||
PCWSTR CommandLine;
|
||||
INT ExpectedRet;
|
||||
UINT_PTR ExpectedRet;
|
||||
INT ExpectedCsidl;
|
||||
DWORD ExpectedFlags;
|
||||
PCWSTR ExpectedFileName;
|
||||
|
@ -309,17 +313,17 @@ START_TEST(SHExplorerParseCmdLine)
|
|||
{ __LINE__, L"\"c:\\\" program files", TRUE, PIDL_IS_NULL, 0x02000000, L"c:\\ program files"},
|
||||
{ __LINE__, L"\"c:\\\", \"c:\\program files\"", TRUE, PIDL_IS_PATH, 0x00000200, NULL, L"C:\\Program Files" },
|
||||
{ __LINE__, L"c:\\,c:\\program files", TRUE, PIDL_IS_PATH, 0x00000200, NULL, L"C:\\Program Files" },
|
||||
{ __LINE__, L"/root", 0, CSIDL_MYDOCUMENTS, 0x00000000},
|
||||
{ __LINE__, L"\"/root\"", 0, CSIDL_MYDOCUMENTS, 0x00000000},
|
||||
{ __LINE__, L"/root,", TRUE, CSIDL_MYDOCUMENTS, 0x00000000},
|
||||
{ __LINE__, L"/root,c", TRUE, CSIDL_MYDOCUMENTS, 0x00000000},
|
||||
{ __LINE__, L"/root,\"\"", TRUE, CSIDL_MYDOCUMENTS, 0x00000000},
|
||||
{ __LINE__, L"/root,wrong", TRUE, CSIDL_MYDOCUMENTS, 0x00000000},
|
||||
{ __LINE__, L"/root,0", TRUE, CSIDL_MYDOCUMENTS, 0x00000000},
|
||||
{ __LINE__, L"/root", FALSE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"\"/root\"", FALSE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"/root,", TRUE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"/root,c", TRUE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"/root,\"\"", TRUE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"/root,wrong", TRUE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"/root,0", TRUE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"/root,c:\\", TRUE, PIDL_PATH_EQUALS_PATH, 0x00000000, NULL, L"c:\\" },
|
||||
{ __LINE__, L"/root,\"c:\\\"", TRUE, PIDL_PATH_EQUALS_PATH, 0x00000000, NULL, L"c:\\" },
|
||||
{ __LINE__, L"/root \"c:\\\"", TRUE, PIDL_IS_NULL, 0x02000000, L"/root c:\\"},
|
||||
{ __LINE__, L"/root,\"c:\\\"\"program files\"", TRUE, PIDL_IS_PATH, 0x00000000},
|
||||
{ __LINE__, L"/root,\"c:\\\"\"program files\"", TRUE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"/root,\"c:\\\"program files", TRUE, PIDL_PATH_EQUALS_PATH, 0x00000000, NULL, L"c:\\Program Files" },
|
||||
{ __LINE__, L"/root,c:\\,c:\\Program Files", TRUE, PIDL_IS_PATH, 0x00000200, NULL, L"C:\\Program Files" },
|
||||
{ __LINE__, L"/root,c:\\,Program Files", TRUE, PIDL_IS_NULL, 0x02000000, L"Program Files"},
|
||||
|
@ -328,7 +332,7 @@ START_TEST(SHExplorerParseCmdLine)
|
|||
// { __LINE__, L"a:\\,/root,c:\\", TRUE, PIDL_PATH_EQUALS_PATH, 0x00000200, NULL, L"c:\\" },
|
||||
// { __LINE__, L"a:\\,/root,c", TRUE, PIDL_IS_PATH, 0x00000200, NULL, L"A:\\" },
|
||||
{ __LINE__, L"c:\\,/root,c", TRUE, PIDL_IS_PATH, 0x00000200, NULL, L"C:\\" },
|
||||
{ __LINE__, L"/select", TRUE, CSIDL_MYDOCUMENTS, 0x00000040},
|
||||
{ __LINE__, L"/select", TRUE, PIDL_IS_UNTOUCHED, 0x00000040 },
|
||||
{ __LINE__, L"/select,", TRUE, CSIDL_DRIVES, 0x00000240 },
|
||||
{ __LINE__, L"/select,c", TRUE, PIDL_IS_NULL, 0x02000040, L"c"},
|
||||
{ __LINE__, L"/select,0", TRUE, PIDL_IS_NULL, 0x02000040, L"0"},
|
||||
|
@ -345,7 +349,7 @@ START_TEST(SHExplorerParseCmdLine)
|
|||
// { __LINE__, L"a:\\,/select,c:\\", TRUE, PIDL_IS_PATH, 0x00000240, NULL, L"C:\\" },
|
||||
{ __LINE__, L"a:\\,/select,c", TRUE, PIDL_IS_NULL, 0x02000040, L"c"},
|
||||
{ __LINE__, L"c:\\,/select,c", TRUE, PIDL_IS_NULL, 0x02000240, L"c"},
|
||||
{ __LINE__, L"/e", TRUE, CSIDL_MYDOCUMENTS, 0x00000008},
|
||||
{ __LINE__, L"/e", TRUE, PIDL_IS_UNTOUCHED, 0x00000008 },
|
||||
{ __LINE__, L"/e,", TRUE, CSIDL_DRIVES, 0x00000208 },
|
||||
{ __LINE__, L"/e,\"", TRUE, CSIDL_DRIVES, 0x00000208 },
|
||||
{ __LINE__, L"/e,\"\"", TRUE, CSIDL_DRIVES, 0x00000208 },
|
||||
|
@ -365,7 +369,7 @@ START_TEST(SHExplorerParseCmdLine)
|
|||
{ __LINE__, L"http:\\\\www.reactos.org", TRUE, PIDL_IS_NULL, 0x02000000, L"http:\\\\www.reactos.org"},
|
||||
{ __LINE__, L"/e,http:\\\\www.reactos.org", TRUE, PIDL_IS_NULL, 0x02000008, L"http:\\\\www.reactos.org"},
|
||||
{ __LINE__, L"/root,c:\\,http:\\\\www.reactos.org", TRUE, PIDL_IS_NULL, 0x02000000, L"http:\\\\www.reactos.org"},
|
||||
{ __LINE__, L"/separate ", TRUE, CSIDL_MYDOCUMENTS, 0x00020000},
|
||||
{ __LINE__, L"/separate ", TRUE, PIDL_IS_UNTOUCHED, 0x00020000 },
|
||||
{ __LINE__, L"/separate,c:\\ program files", TRUE, PIDL_IS_NULL, 0x02020000, L"c:\\ program files"},
|
||||
{ __LINE__, L"/separate, c:\\program files", TRUE, PIDL_IS_PATH, 0x00020200, NULL, L"C:\\Program Files" },
|
||||
{ __LINE__, L"/separate, c:\\program files ,/e", TRUE, PIDL_IS_PATH, 0x00020208, NULL, L"C:\\Program Files" },
|
||||
|
@ -411,10 +415,10 @@ START_TEST(SHExplorerParseCmdLine)
|
|||
{ __LINE__, L"\"\"\"", TRUE, PIDL_IS_NULL, 0x02000000, L"\""},
|
||||
{ __LINE__, L"\"\"\"\"", TRUE, PIDL_IS_NULL, 0x02000000, L"\""},
|
||||
{ __LINE__, L"\"\"\"\"\"", TRUE, PIDL_IS_NULL, 0x02000000, L"\"\""},
|
||||
{ __LINE__, L"/s", TRUE, CSIDL_MYDOCUMENTS, 0x00000002},
|
||||
{ __LINE__, L"/noui", TRUE, CSIDL_MYDOCUMENTS, 0x00001000},
|
||||
{ __LINE__, L"/s", TRUE, PIDL_IS_UNTOUCHED, 0x00000002 },
|
||||
{ __LINE__, L"/noui", TRUE, PIDL_IS_UNTOUCHED, 0x00001000 },
|
||||
{ __LINE__, L"/idlist", TRUE, PIDL_IS_UNTOUCHED, 0x00000000},
|
||||
{ __LINE__, L"-embedding", TRUE, CSIDL_MYDOCUMENTS, 0x00000080 },
|
||||
{ __LINE__, L"-embedding", TRUE, PIDL_IS_UNTOUCHED, 0x00000080 },
|
||||
{ __LINE__, L"/inproc", FALSE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"/inproc,1", FALSE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
{ __LINE__, L"/inproc,a", FALSE, PIDL_IS_UNTOUCHED, 0x00000000 },
|
||||
|
@ -433,10 +437,10 @@ START_TEST(SHExplorerParseCmdLine)
|
|||
WCHAR winDir[MAX_PATH];
|
||||
|
||||
HMODULE browseui = LoadLibraryA("browseui.dll");
|
||||
SHExplorerParseCmdLine = (UINT_PTR (__stdcall *)(PEXPLORER_INFO))GetProcAddress(browseui, MAKEINTRESOURCEA(107));
|
||||
if (!SHExplorerParseCmdLine)
|
||||
pSHExplorerParseCmdLine = (SHExplorerParseCmdLine_Type)GetProcAddress(browseui, MAKEINTRESOURCEA(107));
|
||||
if (!pSHExplorerParseCmdLine)
|
||||
{
|
||||
skip("SHExplorerParseCmdLine not found, NT 6.0?\n");
|
||||
skip("SHExplorerParseCmdLine not found, as on NT6+\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,16 +98,19 @@ typedef struct IEThreadParamBlock
|
|||
typedef struct ExplorerCommandLineParseResults
|
||||
{
|
||||
LPWSTR strPath;
|
||||
// TODO: PIDLIST_ABSOLUTE?
|
||||
LPITEMIDLIST pidlPath;
|
||||
DWORD dwFlags;
|
||||
int nCmdShow;
|
||||
DWORD offset10;
|
||||
DWORD offset14;
|
||||
DWORD offset18;
|
||||
DWORD offset1C;
|
||||
DWORD offset10_18;
|
||||
DWORD offset14_1C;
|
||||
DWORD offset18_20;
|
||||
DWORD offset1C_24;
|
||||
// TODO: PIDLIST_ABSOLUTE?
|
||||
LPITEMIDLIST pidlRoot;
|
||||
CLSID clsid;
|
||||
GUID guidInproc;
|
||||
// TODO: 'ULONG Padding[0x100];'?
|
||||
} EXPLORER_CMDLINE_PARSE_RESULTS, *PEXPLORER_CMDLINE_PARSE_RESULTS;
|
||||
|
||||
#define SH_EXPLORER_CMDLINE_FLAG_ONE 0x00000001
|
||||
|
@ -143,8 +146,8 @@ typedef struct ExplorerCommandLineParseResults
|
|||
void WINAPI InitOCHostClass(long param8);
|
||||
long WINAPI SHOpenFolderWindow(PIE_THREAD_PARAM_BLOCK parameters);
|
||||
void WINAPI SHCreateSavedWindows(void);
|
||||
BOOL WINAPI SHCreateFromDesktop(PEXPLORER_CMDLINE_PARSE_RESULTS parseResults);
|
||||
UINT_PTR WINAPI SHExplorerParseCmdLine(PEXPLORER_CMDLINE_PARSE_RESULTS pParseResults);
|
||||
BOOL WINAPI SHCreateFromDesktop(_In_ PEXPLORER_CMDLINE_PARSE_RESULTS parseResults);
|
||||
UINT_PTR WINAPI SHExplorerParseCmdLine(_Out_ PEXPLORER_CMDLINE_PARSE_RESULTS pInfo);
|
||||
void WINAPI UEMRegisterNotify(long param8, long paramC);
|
||||
HRESULT WINAPI SHCreateBandForPidl(LPCITEMIDLIST param8, IUnknown *paramC, BOOL param10);
|
||||
HRESULT WINAPI SHPidlFromDataObject(IDataObject *param8, long *paramC, long param10, FILEDESCRIPTORW *param14);
|
||||
|
|
Loading…
Reference in a new issue