24#define CHECK_CUR_POS(a, b) _check_cur_pos((IStream *)a, b, FALSE, __LINE__)
25#define CHECK_CUR_POS_TODO(a, b) _check_cur_pos((IStream *)a, b, TRUE, __LINE__)
34 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get current position, hr %#x.\n",
hr);
36 ok_(__FILE__,
line)(
pos.QuadPart == expected_pos,
"Unexpected stream position %s.\n",
44 const BYTE CmpMem[] = {
45 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
46 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
47 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
48 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
50 const BYTE CmpMemOverlap[] = {
51 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
52 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
53 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
54 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
56 const BYTE ZeroMem[10] = {0};
60 ULONG uBytesRead, uBytesWritten;
70 hr =
CoCreateInstance(&CLSID_WICImagingFactory,
NULL, CLSCTX_INPROC_SERVER, &IID_IWICImagingFactory, (
void**)&pFactory);
72 skip(
"CoCreateInstance returned with %#x, expected %#x\n",
hr,
S_OK);
76 hr = IWICImagingFactory_CreateStream(pFactory, &pStream);
77 ok(
hr ==
S_OK,
"CreateStream returned with %#x, expected %#x\n",
hr,
S_OK);
79 skip(
"Failed to create stream\n");
84 hr = IWICStream_InitializeFromMemory(pStream,
NULL,
sizeof(
Memory));
87 hr = IWICStream_InitializeFromMemory(pStream,
Memory, 0);
88 ok(
hr ==
S_OK,
"InitializeFromMemory returned with %#x, expected %#x\n",
hr,
S_OK);
90 hr = IWICStream_InitializeFromMemory(pStream,
Memory,
sizeof(
Memory));
94 IWICStream_Release(pStream);
95 hr = IWICImagingFactory_CreateStream(pFactory, &pStream);
96 ok(
hr ==
S_OK,
"CreateStream failed with %#x\n",
hr);
98 hr = IWICStream_InitializeFromMemory(pStream,
Memory,
sizeof(
Memory));
99 ok(
hr ==
S_OK,
"InitializeFromMemory returned with %#x, expected %#x\n",
hr,
S_OK);
103 hr = IWICStream_Read(pStream, MemBuf,
sizeof(ZeroMem), &uBytesRead);
104 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
106 ok(uBytesRead ==
sizeof(ZeroMem),
"Read %u bytes\n", uBytesRead);
107 ok(
memcmp(MemBuf, ZeroMem,
sizeof(ZeroMem)) == 0,
"Read returned invalid data!\n");
110 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
112 hr = IWICStream_Write(pStream, CmpMem,
sizeof(CmpMem), &uBytesWritten);
113 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
116 hr = IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET, &uNewPos);
117 ok(
hr ==
S_OK,
"Seek returned with %#x, expected %#x\n",
hr,
S_OK);
118 ok(uNewPos.
u.HighPart == 0 && uNewPos.
u.LowPart == 0,
"Seek cursor moved to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0, 0);
120 hr = IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
121 ok(
hr ==
S_OK,
"Seek returned with %#x, expected %#x\n",
hr,
S_OK);
123 LargeInt.
u.HighPart = 1;
124 LargeInt.
u.LowPart = 0;
125 uNewPos.
u.HighPart = 0xdeadbeef;
126 uNewPos.
u.LowPart = 0xdeadbeef;
127 hr = IWICStream_Seek(pStream, LargeInt, STREAM_SEEK_SET, &uNewPos);
129 ok(uNewPos.
u.HighPart == 0xdeadbeef && uNewPos.
u.LowPart == 0xdeadbeef,
"Seek cursor initialized to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0xdeadbeef, 0xdeadbeef);
133 uNewPos.
u.HighPart = 0xdeadbeef;
134 uNewPos.
u.LowPart = 0xdeadbeef;
135 hr = IWICStream_Seek(pStream, LargeInt, STREAM_SEEK_SET, &uNewPos);
137 ok(uNewPos.
u.HighPart == 0xdeadbeef && uNewPos.
u.LowPart == 0xdeadbeef,
"Seek cursor initialized to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0xdeadbeef, 0xdeadbeef);
141 uNewPos.
u.HighPart = 0xdeadbeef;
142 uNewPos.
u.LowPart = 0xdeadbeef;
143 hr = IWICStream_Seek(pStream, LargeInt, STREAM_SEEK_END, &uNewPos);
145 ok(uNewPos.
u.HighPart == 0xdeadbeef && uNewPos.
u.LowPart == 0xdeadbeef,
"Seek cursor initialized to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0xdeadbeef, 0xdeadbeef);
149 hr = IWICStream_Seek(pStream, LargeInt, STREAM_SEEK_END, &uNewPos);
150 ok(
hr ==
S_OK,
"Seek returned with %#x, expected %#x\n",
hr,
S_OK);
151 ok(uNewPos.
u.HighPart == 0 && uNewPos.
u.LowPart ==
sizeof(
Memory) - 1,
"bSeek cursor moved to position (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart);
153 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET, &uNewPos);
155 uNewPos.
u.HighPart = 0xdeadbeef;
156 uNewPos.
u.LowPart = 0xdeadbeef;
157 hr = IWICStream_Seek(pStream, LargeInt, STREAM_SEEK_END, &uNewPos);
160 ok(uNewPos.
u.HighPart == 0xdeadbeef && uNewPos.
u.LowPart == 0xdeadbeef,
"Seek cursor initialized to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0xdeadbeef, 0xdeadbeef);
162 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
165 hr = IWICStream_Read(pStream, MemBuf, 12, &uBytesRead);
166 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
168 ok(uBytesRead == 12,
"Read %u bytes, expected %u\n", uBytesRead, 12);
169 ok(
memcmp(MemBuf, CmpMem, 12) == 0,
"Read returned invalid data!\n");
175 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
177 hr = IWICStream_Read(pStream,
Memory, 10, &uBytesRead);
178 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
180 ok(uBytesRead == 10,
"Read %u bytes, expected %u\n", uBytesRead, 10);
181 ok(
memcmp(
Memory, CmpMem, uBytesRead) == 0,
"Read returned invalid data!\n");
184 IWICStream_Seek(pStream, SeekPos, STREAM_SEEK_SET,
NULL);
186 hr = IWICStream_Read(pStream,
Memory, 10, &uBytesRead);
187 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
189 ok(uBytesRead == 10,
"Read %u bytes, expected %u\n", uBytesRead, 10);
190 ok(
memcmp(
Memory, CmpMemOverlap, uBytesRead) == 0,
"Read returned invalid data!\n");
195 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
197 hr = IWICStream_Read(pStream,
Memory,
sizeof(
Memory) + 10, &uBytesRead);
198 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
200 ok(uBytesRead ==
sizeof(
Memory),
"Read %u bytes\n", uBytesRead);
201 ok(
memcmp(
Memory, CmpMem, uBytesRead) == 0,
"Read returned invalid data!\n");
204 hr = IWICStream_Read(pStream,
NULL, 1, &uBytesRead);
207 hr = IWICStream_Read(pStream, MemBuf, 0, &uBytesRead);
208 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
210 hr = IWICStream_Read(pStream,
NULL, 0, &uBytesRead);
216 hr = IWICStream_Read(pStream, MemBuf, 1,
NULL);
217 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
219 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
221 hr = IWICStream_Read(pStream, MemBuf,
sizeof(
Memory) + 10, &uBytesRead);
222 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
224 ok(uBytesRead ==
sizeof(
Memory),
"Read %u bytes\n", uBytesRead);
225 ok(
memcmp(
Memory, CmpMem, 64) == 0,
"Read returned invalid data!\n");
227 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
231 MemBuf[0] = CmpMem[0] + 1;
232 MemBuf[1] = CmpMem[1] + 1;
233 MemBuf[2] = CmpMem[2] + 1;
234 hr = IWICStream_Write(pStream, MemBuf, 3, &uBytesWritten);
235 ok(
hr ==
S_OK,
"Write returned with %#x, expected %#x\n",
hr,
S_OK);
237 ok(uBytesWritten == 3,
"Wrote %u bytes, expected %u\n", uBytesWritten, 3);
238 ok(
memcmp(MemBuf,
Memory, 3) == 0,
"Wrote returned invalid data!\n");
243 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
245 hr = IWICStream_Write(pStream, MemBuf, 0, &uBytesWritten);
246 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
249 hr = IWICStream_Write(pStream, CmpMem,
sizeof(CmpMem), &uBytesWritten);
250 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
252 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
255 hr = IWICStream_Write(pStream,
Memory + 5, 10, &uBytesWritten);
256 ok(
hr ==
S_OK,
"Write returned with %#x, expected %#x\n",
hr,
S_OK);
258 ok(uBytesWritten == 10,
"Wrote %u bytes, expected %u\n", uBytesWritten, 10);
259 ok(
memcmp(CmpMemOverlap,
Memory,
sizeof(CmpMemOverlap)) == 0,
"Wrote returned invalid data!\n");
262 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
264 uBytesWritten = 0xdeadbeef;
265 hr = IWICStream_Write(pStream,
NULL, 3, &uBytesWritten);
267 ok(uBytesWritten == 0xdeadbeef,
"Expected uBytesWritten to be unchanged, got %u\n", uBytesWritten);
270 uBytesWritten = 0xdeadbeef;
271 hr = IWICStream_Write(pStream,
NULL, 0, &uBytesWritten);
273 ok(uBytesWritten == 0xdeadbeef,
"Expected uBytesWritten to be unchanged, got %u\n", uBytesWritten);
276 uBytesWritten = 0xdeadbeef;
277 hr = IWICStream_Write(pStream, CmpMem,
sizeof(
Memory) + 10, &uBytesWritten);
279 ok(uBytesWritten == 0xdeadbeef,
"Expected uBytesWritten to be unchanged, got %u\n", uBytesWritten);
281 IWICStream_Seek(pStream, LargeNull, STREAM_SEEK_SET,
NULL);
285 uNewPos.
u.HighPart = 0;
286 uNewPos.
u.LowPart =
sizeof(
Memory) + 10;
287 hr = IWICStream_SetSize(pStream, uNewPos);
290 uNewPos.
u.HighPart = 0;
291 uNewPos.
u.LowPart =
sizeof(
Memory);
292 hr = IWICStream_SetSize(pStream, uNewPos);
295 uNewPos.
u.HighPart = 0;
296 uNewPos.
u.LowPart =
sizeof(
Memory) - 10;
297 hr = IWICStream_SetSize(pStream, uNewPos);
300 uNewPos.
u.HighPart = 0;
301 uNewPos.
u.LowPart = 0;
302 hr = IWICStream_SetSize(pStream, uNewPos);
306 hr = IWICStream_SetSize(pStream, uNewPos);
311 uNewPos.
u.HighPart = 0;
312 uNewPos.
u.LowPart = 5;
316 hr = IWICImagingFactory_CreateStream(pFactory, &pBufStream);
317 ok(
hr ==
S_OK,
"CreateStream failed with %#x\n",
hr);
319 hr = IWICStream_InitializeFromMemory(pBufStream,
Memory,
sizeof(
Memory));
320 ok(
hr ==
S_OK,
"InitializeFromMemory returned with %#x, expected %#x\n",
hr,
S_OK);
324 IWICStream_Release(pBufStream);
328 hr = IWICStream_Commit(pStream, STGC_DEFAULT);
331 hr = IWICStream_Commit(pStream, STGC_OVERWRITE);
334 hr = IWICStream_Commit(pStream, STGC_ONLYIFCURRENT);
337 hr = IWICStream_Commit(pStream, STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE);
340 hr = IWICStream_Commit(pStream, STGC_CONSOLIDATE);
345 IWICStream_Write(pStream, &MemBuf[5], 6,
NULL);
346 hr = IWICStream_Revert(pStream);
352 hr = IWICStream_LockRegion(pStream, uLargeNull, uLargeNull, 0);
355 hr = IWICStream_UnlockRegion(pStream, uLargeNull, uLargeNull, 0);
360 hr = IWICStream_Stat(pStream,
NULL, 0);
363 hr = IWICStream_Stat(pStream, &Stats, 0);
365 ok(Stats.pwcsName ==
NULL,
"Stat returned name %p, expected %p\n", Stats.pwcsName,
NULL);
366 ok(Stats.type == STGTY_STREAM,
"Stat returned type %d, expected %d\n", Stats.type, STGTY_STREAM);
367 ok(Stats.cbSize.u.HighPart == 0 && Stats.cbSize.u.LowPart ==
sizeof(
Memory),
"Stat returned size (%u;%u)\n", Stats.cbSize.u.HighPart, Stats.cbSize.u.LowPart);
368 ok(Stats.mtime.dwHighDateTime == 0 && Stats.mtime.dwLowDateTime == 0,
"Stat returned mtime (%u;%u), expected (%u;%u)\n", Stats.mtime.dwHighDateTime, Stats.mtime.dwLowDateTime, 0, 0);
369 ok(Stats.ctime.dwHighDateTime == 0 && Stats.ctime.dwLowDateTime == 0,
"Stat returned ctime (%u;%u), expected (%u;%u)\n", Stats.ctime.dwHighDateTime, Stats.ctime.dwLowDateTime, 0, 0);
370 ok(Stats.atime.dwHighDateTime == 0 && Stats.atime.dwLowDateTime == 0,
"Stat returned atime (%u;%u), expected (%u;%u)\n", Stats.atime.dwHighDateTime, Stats.atime.dwLowDateTime, 0, 0);
371 ok(Stats.grfMode == 0,
"Stat returned access mode %d, expected %d\n", Stats.grfMode, 0);
372 ok(Stats.grfLocksSupported == 0,
"Stat returned supported locks %#x, expected %#x\n", Stats.grfLocksSupported, 0);
373 ok(Stats.grfStateBits == 0,
"Stat returned state bits %#x, expected %#x\n", Stats.grfStateBits, 0);
377 hr = IWICStream_Clone(pStream, (
IStream**)&pBufStream);
381 IWICStream_Release(pStream);
382 IWICImagingFactory_Release(pFactory);
390 const BYTE CmpMem[] = {
391 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
392 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
393 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
394 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
399 ULONG uBytesRead, uBytesWritten;
410 hr =
CoCreateInstance(&CLSID_WICImagingFactory,
NULL, CLSCTX_INPROC_SERVER, &IID_IWICImagingFactory, (
void**)&pFactory);
412 skip(
"CoCreateInstance returned with %#x, expected %#x\n",
hr,
S_OK);
416 hr = IWICImagingFactory_CreateStream(pFactory, &pStream);
417 ok(
hr ==
S_OK,
"CreateStream returned with %#x, expected %#x\n",
hr,
S_OK);
419 skip(
"Failed to create stream\n");
423 hr = IWICStream_InitializeFromMemory(pStream,
Memory,
sizeof(
Memory));
424 ok(
hr ==
S_OK,
"InitializeFromMemory returned with %#x, expected %#x\n",
hr,
S_OK);
426 hr = IWICImagingFactory_CreateStream(pFactory, &pSubStream);
427 ok(
hr ==
S_OK,
"CreateStream returned with %#x, expected %#x\n",
hr,
S_OK);
431 hr = IWICStream_InitializeFromIStreamRegion(pSubStream, (
IStream*)pStream, uNewPos, uSize);
432 ok(
hr ==
S_OK,
"InitializeFromIStreamRegion returned with %#x, expected %#x\n",
hr,
S_OK);
434 skip(
"InitializeFromIStreamRegion unimplemented\n");
435 IWICStream_Release(pSubStream);
436 IWICStream_Release(pStream);
437 IWICImagingFactory_Release(pFactory);
444 hr = IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_END, &uNewPos);
445 ok(uNewPos.
u.HighPart == 0 && uNewPos.
u.LowPart == 20,
"Seek cursor moved to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0, 20);
446 ok(
hr ==
S_OK,
"Seek returned with %#x, expected %#x\n",
hr,
S_OK);
449 hr = IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET, &uNewPos);
450 ok(
hr ==
S_OK,
"Seek returned with %#x, expected %#x\n",
hr,
S_OK);
451 ok(uNewPos.
u.HighPart == 0 && uNewPos.
u.LowPart == 0,
"Seek cursor moved to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0, 0);
454 hr = IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
455 ok(
hr ==
S_OK,
"Seek returned with %#x, expected %#x\n",
hr,
S_OK);
457 LargeInt.
u.HighPart = 1;
458 LargeInt.
u.LowPart = 0;
459 uNewPos.
u.HighPart = 0xdeadbeef;
460 uNewPos.
u.LowPart = 0xdeadbeef;
461 hr = IWICStream_Seek(pSubStream, LargeInt, STREAM_SEEK_SET, &uNewPos);
463 ok(uNewPos.
u.HighPart == 0xdeadbeef && uNewPos.
u.LowPart == 0xdeadbeef,
"Seek cursor initialized to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0xdeadbeef, 0xdeadbeef);
467 uNewPos.
u.HighPart = 0xdeadbeef;
468 uNewPos.
u.LowPart = 0xdeadbeef;
469 hr = IWICStream_Seek(pSubStream, LargeInt, STREAM_SEEK_SET, &uNewPos);
471 ok(uNewPos.
u.HighPart == 0xdeadbeef && uNewPos.
u.LowPart == 0xdeadbeef,
"Seek cursor initialized to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0xdeadbeef, 0xdeadbeef);
475 uNewPos.
u.HighPart = 0xdeadbeef;
476 uNewPos.
u.LowPart = 0xdeadbeef;
477 hr = IWICStream_Seek(pSubStream, LargeInt, STREAM_SEEK_END, &uNewPos);
479 ok(uNewPos.
u.HighPart == 0xdeadbeef && uNewPos.
u.LowPart == 0xdeadbeef,
"Seek cursor initialized to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0xdeadbeef, 0xdeadbeef);
483 hr = IWICStream_Seek(pSubStream, LargeInt, STREAM_SEEK_END, &uNewPos);
484 ok(
hr ==
S_OK,
"Seek returned with %#x, expected %#x\n",
hr,
S_OK);
485 ok(uNewPos.
u.HighPart == 0 && uNewPos.
u.LowPart == 19,
"bSeek cursor moved to position (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart);
488 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET, &uNewPos);
490 uNewPos.
u.HighPart = 0xdeadbeef;
491 uNewPos.
u.LowPart = 0xdeadbeef;
492 hr = IWICStream_Seek(pSubStream, LargeInt, STREAM_SEEK_END, &uNewPos);
495 ok(uNewPos.
u.HighPart == 0xdeadbeef && uNewPos.
u.LowPart == 0xdeadbeef,
"Seek cursor initialized to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0xdeadbeef, 0xdeadbeef);
497 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
501 hr = IWICStream_Read(pSubStream, MemBuf, 12, &uBytesRead);
502 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
504 ok(uBytesRead == 12,
"Read %u bytes, expected %u\n", uBytesRead, 12);
505 ok(
memcmp(MemBuf, CmpMem+20, 12) == 0,
"Read returned invalid data!\n");
512 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
514 hr = IWICStream_Read(pSubStream,
Memory, 10, &uBytesRead);
515 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
517 ok(uBytesRead == 10,
"Read %u bytes, expected %u\n", uBytesRead, 10);
518 ok(
memcmp(
Memory, CmpMem+20, uBytesRead) == 0,
"Read returned invalid data!\n");
522 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
524 hr = IWICStream_Read(pSubStream,
Memory, 30, &uBytesRead);
525 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
527 ok(uBytesRead == 20,
"Read %u bytes\n", uBytesRead);
528 ok(
memcmp(
Memory, CmpMem+20, uBytesRead) == 0,
"Read returned invalid data!\n");
532 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
533 uBytesRead = 0xdeadbeef;
534 hr = IWICStream_Read(pSubStream,
NULL, 1, &uBytesRead);
536 ok(uBytesRead == 0xdeadbeef,
"Expected uBytesRead to be unchanged, got %u\n", uBytesRead);
538 hr = IWICStream_Read(pSubStream, MemBuf, 0, &uBytesRead);
539 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
541 uBytesRead = 0xdeadbeef;
542 hr = IWICStream_Read(pSubStream,
NULL, 0, &uBytesRead);
544 ok(uBytesRead == 0xdeadbeef,
"Expected uBytesRead to be unchanged, got %u\n", uBytesRead);
546 hr = IWICStream_Read(pSubStream,
NULL, 0,
NULL);
549 hr = IWICStream_Read(pSubStream, MemBuf, 1,
NULL);
550 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
552 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
554 hr = IWICStream_Read(pSubStream, MemBuf, 30, &uBytesRead);
555 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
557 ok(uBytesRead == 20,
"Read %u bytes\n", uBytesRead);
558 ok(
memcmp(
Memory, CmpMem+20, 20) == 0,
"Read returned invalid data!\n");
560 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
564 MemBuf[0] = CmpMem[0] + 1;
565 MemBuf[1] = CmpMem[1] + 1;
566 MemBuf[2] = CmpMem[2] + 1;
567 hr = IWICStream_Write(pSubStream, MemBuf, 3, &uBytesWritten);
568 ok(
hr ==
S_OK,
"Write returned with %#x, expected %#x\n",
hr,
S_OK);
570 ok(uBytesWritten == 3,
"Wrote %u bytes, expected %u\n", uBytesWritten, 3);
571 ok(
memcmp(MemBuf,
Memory+20, 3) == 0,
"Wrote returned invalid data!\n");
577 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
579 hr = IWICStream_Write(pSubStream, MemBuf, 0, &uBytesWritten);
580 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
582 uBytesWritten = 0xdeadbeef;
583 hr = IWICStream_Write(pSubStream,
NULL, 3, &uBytesWritten);
585 ok(uBytesWritten == 0xdeadbeef,
"Expected uBytesWritten to be unchanged, got %u\n", uBytesWritten);
589 uBytesWritten = 0xdeadbeef;
590 hr = IWICStream_Write(pSubStream,
NULL, 0, &uBytesWritten);
592 ok(uBytesWritten == 0xdeadbeef,
"Expected uBytesWritten to be unchanged, got %u\n", uBytesWritten);
596 hr = IWICStream_Write(pSubStream, CmpMem, 30, &uBytesWritten);
598 ok(uBytesWritten == 20,
"Wrote %u bytes, expected %u\n", uBytesWritten, 0);
601 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
605 uNewPos.
u.HighPart = 0;
606 uNewPos.
u.LowPart =
sizeof(
Memory) + 10;
607 hr = IWICStream_SetSize(pSubStream, uNewPos);
610 uNewPos.
u.HighPart = 0;
611 uNewPos.
u.LowPart =
sizeof(
Memory);
612 hr = IWICStream_SetSize(pSubStream, uNewPos);
615 uNewPos.
u.HighPart = 0;
616 uNewPos.
u.LowPart =
sizeof(
Memory) - 10;
617 hr = IWICStream_SetSize(pSubStream, uNewPos);
620 uNewPos.
u.HighPart = 0;
621 uNewPos.
u.LowPart = 0;
622 hr = IWICStream_SetSize(pSubStream, uNewPos);
626 hr = IWICStream_SetSize(pSubStream, uNewPos);
631 uNewPos.
u.HighPart = 0;
632 uNewPos.
u.LowPart = 30;
637 ok(
hr ==
S_OK,
"CreateStream failed with %#x\n",
hr);
639 hr = IWICStream_CopyTo(pSubStream, CopyStream, uNewPos,
NULL,
NULL);
641 IStream_Release(CopyStream);
645 hr = IWICStream_Commit(pSubStream, STGC_DEFAULT);
648 hr = IWICStream_Commit(pSubStream, STGC_OVERWRITE);
651 hr = IWICStream_Commit(pSubStream, STGC_ONLYIFCURRENT);
654 hr = IWICStream_Commit(pSubStream, STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE);
657 hr = IWICStream_Commit(pSubStream, STGC_CONSOLIDATE);
662 IWICStream_Write(pSubStream, &MemBuf[5], 6,
NULL);
663 hr = IWICStream_Revert(pSubStream);
669 hr = IWICStream_LockRegion(pSubStream, uLargeNull, uLargeNull, 0);
672 hr = IWICStream_UnlockRegion(pSubStream, uLargeNull, uLargeNull, 0);
677 hr = IWICStream_Stat(pSubStream,
NULL, 0);
680 hr = IWICStream_Stat(pSubStream, &Stats, 0);
682 ok(Stats.pwcsName ==
NULL,
"Stat returned name %p, expected %p\n", Stats.pwcsName,
NULL);
683 ok(Stats.type == STGTY_STREAM,
"Stat returned type %d, expected %d\n", Stats.type, STGTY_STREAM);
684 ok(Stats.cbSize.u.HighPart == 0 && Stats.cbSize.u.LowPart == 20,
"Stat returned size (%u;%u)\n", Stats.cbSize.u.HighPart, Stats.cbSize.u.LowPart);
685 ok(Stats.mtime.dwHighDateTime == 0 && Stats.mtime.dwLowDateTime == 0,
"Stat returned mtime (%u;%u), expected (%u;%u)\n", Stats.mtime.dwHighDateTime, Stats.mtime.dwLowDateTime, 0, 0);
686 ok(Stats.ctime.dwHighDateTime == 0 && Stats.ctime.dwLowDateTime == 0,
"Stat returned ctime (%u;%u), expected (%u;%u)\n", Stats.ctime.dwHighDateTime, Stats.ctime.dwLowDateTime, 0, 0);
687 ok(Stats.atime.dwHighDateTime == 0 && Stats.atime.dwLowDateTime == 0,
"Stat returned atime (%u;%u), expected (%u;%u)\n", Stats.atime.dwHighDateTime, Stats.atime.dwLowDateTime, 0, 0);
688 ok(Stats.grfMode == 0,
"Stat returned access mode %d, expected %d\n", Stats.grfMode, 0);
689 ok(Stats.grfLocksSupported == 0,
"Stat returned supported locks %#x, expected %#x\n", Stats.grfLocksSupported, 0);
690 ok(Stats.grfStateBits == 0,
"Stat returned state bits %#x, expected %#x\n", Stats.grfStateBits, 0);
694 hr = IWICStream_Clone(pSubStream, &CopyStream);
698 IWICStream_Release(pSubStream);
702 hr = IWICImagingFactory_CreateStream(pFactory, &pSubStream);
703 ok(
hr ==
S_OK,
"CreateStream returned with %#x, expected %#x\n",
hr,
S_OK);
707 hr = IWICStream_InitializeFromIStreamRegion(pSubStream, (
IStream*)pStream, uNewPos, uSize);
708 ok(
hr ==
S_OK,
"InitializeFromMemory returned with %#x, expected %#x\n",
hr,
S_OK);
710 hr = IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_END, &uNewPos);
711 ok(
hr ==
S_OK,
"Seek returned with %#x, expected %#x\n",
hr,
S_OK);
712 ok(uNewPos.
u.HighPart == 0 && uNewPos.
u.LowPart == 16,
"Seek cursor moved to position (%u;%u), expected (%u;%u)\n", uNewPos.
u.HighPart, uNewPos.
u.LowPart, 0, 16);
714 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
715 hr = IWICStream_Read(pSubStream,
Memory, 48, &uBytesRead);
716 ok(
hr ==
S_OK,
"Read returned with %#x, expected %#x\n",
hr,
S_OK);
718 ok(uBytesRead == 16,
"Read %u bytes\n", uBytesRead);
719 ok(
memcmp(
Memory, CmpMem+48, uBytesRead) == 0,
"Read returned invalid data!\n");
722 IWICStream_Seek(pSubStream, LargeNull, STREAM_SEEK_SET,
NULL);
723 uBytesWritten = 0xdeadbeef;
724 hr = IWICStream_Write(pSubStream, CmpMem, 32, &uBytesWritten);
726 ok(uBytesWritten == 0xdeadbeef,
"Expected uBytesWritten to be unchanged, got %u\n", uBytesWritten);
730 IWICStream_Release(pSubStream);
731 IWICStream_Release(pStream);
732 IWICImagingFactory_Release(pFactory);
740 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
741 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
742 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
743 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
750 ULONG read_len, written;
761 &IID_IWICImagingFactory, (
void **)&
factory);
762 ok(
hr ==
S_OK,
"Failed to create a factory, hr %#x.\n",
hr);
765 ok(
hr ==
S_OK,
"Failed to create a stream, hr %#x.\n",
hr);
768 ok(
hr ==
S_OK,
"Failed to initialize stream, hr %#x.\n",
hr);
770 hr = IWICImagingFactory_CreateStream(
factory, &substream);
771 ok(
hr ==
S_OK,
"Failed to create a stream, hr %#x.\n",
hr);
774 hr = IWICStream_Seek(
stream,
pos, STREAM_SEEK_SET, &newpos);
775 ok(
hr ==
S_OK,
"Failed to set position, hr %#x.\n",
hr);
779 ok(
hr ==
S_OK,
"Failed to initialize stream, hr %#x.\n",
hr);
784 hr = IWICStream_Seek(substream, zero_pos, STREAM_SEEK_END, &newpos);
785 ok(
hr ==
S_OK,
"Failed to seek a stream, hr %#x.\n",
hr);
790 hr = IWICStream_Seek(substream, zero_pos, STREAM_SEEK_SET, &newpos);
791 ok(
hr ==
S_OK,
"Failed to seek a stream, hr %#x.\n",
hr);
796 hr = IWICStream_Seek(substream, zero_pos, STREAM_SEEK_SET,
NULL);
797 ok(
hr ==
S_OK,
"Failed to seek a stream, hr %#x.\n",
hr);
801 newpos.
u.HighPart = 0xdeadbeef;
802 newpos.
u.LowPart = 0xdeadbeef;
803 hr = IWICStream_Seek(substream,
pos, STREAM_SEEK_SET, &newpos);
805 ok(newpos.
u.HighPart == 0xdeadbeef && newpos.
u.LowPart == 0xdeadbeef,
"Unexpected position %s.\n",
811 newpos.
u.HighPart = 0xdeadbeef;
812 newpos.
u.LowPart = 0xdeadbeef;
813 hr = IWICStream_Seek(substream,
pos, STREAM_SEEK_SET, &newpos);
815 ok(newpos.
u.HighPart == 0xdeadbeef && newpos.
u.LowPart == 0xdeadbeef,
"Unexpected position %s.\n",
821 newpos.
u.HighPart = 0xdeadbeef;
822 newpos.
u.LowPart = 0xdeadbeef;
823 hr = IWICStream_Seek(substream,
pos, STREAM_SEEK_END, &newpos);
825 ok(newpos.
u.HighPart == 0xdeadbeef && newpos.
u.LowPart == 0xdeadbeef,
"Unexpected position %s.\n",
831 hr = IWICStream_Seek(substream,
pos, STREAM_SEEK_END, &newpos);
832 ok(
hr ==
S_OK,
"Failed to seek a stream, hr %#x.\n",
hr);
837 IWICStream_Seek(substream, zero_pos, STREAM_SEEK_SET,
NULL);
840 hr = IWICStream_Read(substream,
buff, 12, &read_len);
841 ok(
hr ==
S_OK,
"Failed to read from stream, hr %#x.\n",
hr);
842 ok(read_len == 12,
"Unexpected read length %u.\n", read_len);
847 IWICStream_Seek(substream, zero_pos, STREAM_SEEK_SET,
NULL);
850 hr = IWICStream_Read(substream,
memory, 10, &read_len);
851 ok(
hr ==
S_OK,
"Failed to read from stream, hr %#x.\n",
hr);
852 ok(read_len == 10,
"Unexpected read length %u.\n", read_len);
856 IWICStream_Seek(substream, zero_pos, STREAM_SEEK_SET,
NULL);
857 hr = IWICStream_Read(substream,
memory, 2 *
sizeof(
data), &read_len);
858 ok(
hr ==
S_OK,
"Failed to read from stream, hr %#x.\n",
hr);
859 ok(read_len == 64,
"Unexpected read length %u.\n", read_len);
863 IWICStream_Seek(substream, zero_pos, STREAM_SEEK_SET,
NULL);
864 read_len = 0xdeadbeef;
865 hr = IWICStream_Read(substream,
NULL, 1, &read_len);
867 ok(read_len == 0xdeadbeef,
"Unexpected read length %u.\n", read_len);
870 hr = IWICStream_Read(substream,
buff, 0, &read_len);
871 ok(
hr ==
S_OK,
"Failed to read from stream, hr %#x.\n",
hr);
872 ok(read_len == 0,
"Unexpected read length %u.\n", read_len);
874 read_len = 0xdeadbeef;
875 hr = IWICStream_Read(substream,
NULL, 0, &read_len);
877 ok(read_len == 0xdeadbeef,
"Unexpected read length %u.\n", read_len);
879 hr = IWICStream_Read(substream,
NULL, 0,
NULL);
882 hr = IWICStream_Read(substream,
buff, 1,
NULL);
883 ok(
hr ==
S_OK,
"Failed to read from stream, hr %#x.\n",
hr);
886 IWICStream_Seek(substream, zero_pos, STREAM_SEEK_SET,
NULL);
889 for (
i = 0;
i < 3; ++
i)
892 hr = IWICStream_Write(substream,
buff, 3, &written);
893 ok(
hr ==
S_OK,
"Failed to write to stream, hr %#x.\n",
hr);
894 ok(written == 3,
"Unexpected written length %u.\n", written);
898 IWICStream_Seek(substream, zero_pos, STREAM_SEEK_SET,
NULL);
900 hr = IWICStream_Write(substream,
buff, 0, &written);
901 ok(
hr ==
S_OK,
"Failed to write to stream, hr %#x.\n",
hr);
903 written = 0xdeadbeef;
904 hr = IWICStream_Write(substream,
NULL, 3, &written);
906 ok(written == 0xdeadbeef,
"Unexpected written length %u.\n", written);
910 written = 0xdeadbeef;
911 hr = IWICStream_Write(substream,
NULL, 0, &written);
913 ok(written == 0xdeadbeef,
"Unexpected written length %u.\n", written);
918 newpos.
u.HighPart = 0;
919 newpos.
u.LowPart =
sizeof(
memory) + 10;
920 hr = IWICStream_SetSize(substream, newpos);
923 newpos.
u.HighPart = 0;
924 newpos.
u.LowPart =
sizeof(
memory);
925 hr = IWICStream_SetSize(substream, newpos);
928 newpos.
u.HighPart = 0;
929 newpos.
u.LowPart =
sizeof(
memory) - 10;
930 hr = IWICStream_SetSize(substream, newpos);
934 hr = IWICStream_SetSize(substream, newpos);
938 hr = IWICStream_SetSize(substream, newpos);
942 newpos.
u.HighPart = 0;
943 newpos.
u.LowPart = 30;
948 ok(
hr ==
S_OK,
"Failed to create a stream, hr %#x.\n",
hr);
950 hr = IWICStream_CopyTo(substream, copy_stream, newpos,
NULL,
NULL);
952 IStream_Release(copy_stream);
955 hr = IWICStream_Commit(substream, STGC_DEFAULT);
958 hr = IWICStream_Commit(substream, STGC_OVERWRITE);
961 hr = IWICStream_Commit(substream, STGC_ONLYIFCURRENT);
964 hr = IWICStream_Commit(substream, STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE);
967 hr = IWICStream_Commit(substream, STGC_CONSOLIDATE);
971 IWICStream_Write(substream,
buff + 5, 6,
NULL);
972 hr = IWICStream_Revert(substream);
977 hr = IWICStream_LockRegion(substream, uzero, uzero, 0);
980 hr = IWICStream_UnlockRegion(substream, uzero, uzero, 0);
984 hr = IWICStream_Stat(substream,
NULL, 0);
987 hr = IWICStream_Stat(substream, &stats, 0);
988 ok(
hr ==
S_OK,
"Failed to get stream stats, hr %#x.\n",
hr);
989 ok(stats.pwcsName ==
NULL,
"Unexpected name %p.\n", stats.pwcsName);
990 ok(stats.type == STGTY_STREAM,
"Unexpected type %d.\n", stats.type);
992 ok(stats.mtime.dwHighDateTime == 0 && stats.mtime.dwLowDateTime == 0,
"Unexpected mtime (%u;%u).\n",
993 stats.mtime.dwHighDateTime, stats.mtime.dwLowDateTime);
994 ok(stats.ctime.dwHighDateTime == 0 && stats.ctime.dwLowDateTime == 0,
"Unexpected ctime (%u;%u).\n",
995 stats.ctime.dwHighDateTime, stats.ctime.dwLowDateTime);
996 ok(stats.atime.dwHighDateTime == 0 && stats.atime.dwLowDateTime == 0,
"Unexpected atime (%u;%u).\n",
997 stats.atime.dwHighDateTime, stats.atime.dwLowDateTime);
998 ok(stats.grfMode == 0,
"Unexpected mode %d.\n", stats.grfMode);
999 ok(stats.grfLocksSupported == 0,
"Unexpected locks support %#x.\n", stats.grfLocksSupported);
1000 ok(stats.grfStateBits == 0,
"Unexpected state bits %#x.\n", stats.grfStateBits);
1003 hr = IWICStream_Clone(substream, ©_stream);
1006 IWICStream_Release(substream);
1007 IWICStream_Release(
stream);
1008 IWICImagingFactory_Release(
factory);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
static unsigned char buff[32768]
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
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
#define memcpy(s1, s2, n)
static char memory[1024 *256]
#define todo_wine_if(is_todo)
static void test_StreamOnMemory(void)
#define CHECK_CUR_POS(a, b)
static void test_StreamOnIStream(void)
static void _check_cur_pos(IStream *stream, ULONGLONG expected_pos, BOOL todo, unsigned int line)
static void test_StreamOnStreamRange(void)
struct _ULARGE_INTEGER::@4177 u
struct _LARGE_INTEGER::@2306 u
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
#define WINCODEC_ERR_WRONGSTATE
#define HRESULT_FROM_WIN32(x)
#define ERROR_ARITHMETIC_OVERFLOW
#define WINCODEC_ERR_VALUEOUTOFRANGE