80{
85
87 Info.dwFlags = 0x00000000;
89
90
91 if (ExpectedRet == -1)
92 {
94 }
95 else
96 {
97 ok(Ret == ExpectedRet,
"Line %lu: Ret = 0x%Ix, expected 0x%Ix\n", TestLine, Ret, ExpectedRet);
98 }
99
100 if (ExpectedFileName ==
NULL)
101 {
103 }
104 else
105 {
107 ok(
Info.strPath !=
NULL,
"Line %lu: strPath = NULL\n", TestLine);
109 {
110 ok(!
wcscmp(
Info.strPath, ExpectedFileName),
"Line %lu: strPath = %ls, expected %ls\n", TestLine,
Info.strPath, ExpectedFileName);
112 }
113 }
114
115 ok(
Info.dwFlags == ExpectedFlags,
"Line %lu: dwFlags = %08lx, expected %08lx\n", TestLine,
Info.dwFlags, ExpectedFlags);
116
118 {
120 }
122 {
123 ok(
Info.pidlPath ==
NULL,
"Line %lu: pidlPath = %p\n", TestLine,
Info.pidlPath);
124 }
125 else
126 {
129
131 ok(
Info.pidlPath !=
NULL,
"Line %lu: pidlPath = NULL\n", TestLine);
133 {
139
141
143 if (
wcslen(curDir) != 0 && curDir[
wcslen(curDir) - 1] !=
L'\\')
145
146 if (PidlPath)
147 {
149
151 {
154 }
155
157 {
160 }
161 }
162
164
166 {
167 ok(
_wcsicmp(pidlPathName, pidlPathTest) == 0,
"Line %lu: Path from pidl does not match; pidlPathName=%S\n", TestLine, pidlPathName);
168 }
170 {
171 ok(
wcslen(pidlPathName) == 0,
"Line %lu: Unexpected non-empty path from pidl; pidlPathName=%S\n", TestLine, pidlPathName);
172 }
173 else
174 {
176 {
179 ok(ExpectedPidl !=
NULL,
"Line %lu: SHSimpleIDListFromPath(%S) failed. pidlPathName=%S\n", TestLine, pidlPathTest, pidlPathName);
181 {
182 ok(
ILIsEqual(
Info.pidlPath, ExpectedPidl),
"Line %lu: Unexpected pidlPath value %p; pidlPathName=%S pidlPathTest=%S\n", TestLine,
Info.pidlPath, pidlPathName, pidlPathTest);
184 }
185 }
186 else
187 {
189 ok(
hr ==
S_OK,
"Line %lu: SHGetFolderLocation returned %08lx\n", TestLine,
hr);
191 {
194
195 ok(
eq,
"Line %lu: Unexpected pidlPath value %p; pidlPathName=%S CSIDL=%d\n", TestLine,
Info.pidlPath, pidlPathName, ExpectedCsidl);
196 }
197 }
198 }
199
201 }
202 }
203
205 {
206 switch (
i *
sizeof(
DWORD))
207 {
211
213
218#ifdef _WIN64
222#endif
223 break;
224 default:
225 ok(InfoWords[
i] == 0x55555555,
"Line %lu: Word 0x%02lx has been set to 0x%08lx\n", TestLine,
i *
sizeof(
DWORD), InfoWords[
i]);
226 }
227 }
228
229 {
232
235 {
237 ok(
memcmp(
ab, &
Info.clsid,
sizeof(
ab)) == 0,
"Line %lu: CLSID was %ls.\n", TestLine, psz);
238 }
239 else
240 {
241 ok(
lstrcmpiW(psz, pclsid) == 0,
"Line %lu: CLSID was %ls.\n", TestLine, psz);
242 }
244 }
245
246 if (PWriteEnd)
247 {
249
250 *PWriteEnd = 0;
251
252 for (
i =
sizeof(
Info);
i > 0;
i--)
253 {
254 if (
data[
i - 1] != 0x55)
255 {
257 break;
258 }
259 }
260 }
261}
static DWORD ReplaceSubstr(_Out_ PWCHAR OutputStr, _In_ DWORD OutputLen, _In_ PCWSTR InputStr, _In_ PCWSTR ReplaceStr, _In_ PCWSTR ReplaceWith)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define GetCurrentDirectoryW(x, y)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl)
#define FillMemory(BUF, SIZ, MASK)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
HLOCAL NTAPI LocalFree(HLOCAL hMem)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
UCHAR ab[sizeof("Hello World!") -1]
#define eq(received, expected, label, type)
void WINAPI ILFree(LPITEMIDLIST pidl)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
_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)
PIDLIST_ABSOLUTE WINAPI SHSimpleIDListFromPath(PCWSTR)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
#define FIELD_OFFSET(t, f)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList