#include <stdarg.h>
#include <stdio.h>
#include "wine/test.h"
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "shlwapi.h"
Go to the source code of this file.
◆ COBJMACROS
◆ START_TEST()
Definition at line 833 of file istream.c.
834{
835 static const DWORD stgm_access[] = {
839 };
840
841 static const DWORD stgm_sharing[] = {
842 0,
847 };
848
849 static const DWORD stgm_flags[] = {
850 0,
857 };
858
860
865
868 }
869 }
870
873}
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
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 GLint GLint j
static void test_SHCreateStreamOnFileEx_CopyTo(void)
static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm)
static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm)
static void test_SHCreateMemStream(void)
static void test_SHCreateStreamOnFileA(DWORD mode, DWORD stgm)
#define STGM_SHARE_DENY_NONE
#define STGM_SHARE_EXCLUSIVE
#define STGM_DELETEONRELEASE
#define STGM_SHARE_DENY_WRITE
#define STGM_SHARE_DENY_READ
◆ test_IStream_invalid_operations()
Definition at line 31 of file istream.c.
32{
41
48
49
50
51
52
55
58
61
64
65
66
67
68
71 {
73 "expected STG_E_ACCESSDENIED, got 0x%08lx\n",
ret);
74 }
75 else
77
82 "expected STG_E_ACCESSDENIED, got 0x%08lx\n",
ret);
83 else
85
90 "expected STG_E_ACCESSDENIED, got 0x%08lx\n",
ret);
91 else
93
98 "expected STG_E_ACCESSDENIED, got 0x%08lx\n",
ret);
99 else
101
106 "expected STG_E_ACCESSDENIED, got 0x%08lx\n",
ret);
107 else
109
110
111
114
117 "expected E_INVALIDARG, got 0x%08lx\n",
ret);
118
119
120
123
125 ret = IStream_CopyTo(
stream, clone, uzero, &uret, &uret);
127
130
133
136
137
138
139 ret = IStream_Commit(
stream, STGC_DEFAULT);
141
142
143
146
147
148
149 ret = IStream_LockRegion(
stream, uzero, uzero, 0);
151 "expected E_NOTIMPL or S_OK, got 0x%08lx\n",
ret);
152
153
154
156 ret = IStream_UnlockRegion(
stream, uzero, uzero, 0);
158 } else {
159 ret = IStream_UnlockRegion(
stream, uzero, uzero, 0);
161
162 ret = IStream_UnlockRegion(
stream, uzero, uzero, 0);
164 }
165
166
167
170 "expected STG_E_INVALIDPOINTER or E_NOTIMPL, got 0x%08lx\n",
ret);
171
172
173
174
175
179 ok(clone ==
NULL,
"expected a NULL IStream object, got %p\n",
stream);
180
181 if (clone) {
182 refcount = IStream_Release(clone);
183 ok(refcount == 0,
"expected 0, got %ld\n", refcount);
184 }
185}
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define STG_E_INVALIDPOINTER
#define STG_E_LOCKVIOLATION
#define STG_E_ACCESSDENIED
Referenced by test_SHCreateStreamOnFileA(), test_SHCreateStreamOnFileEx(), and test_SHCreateStreamOnFileW().
◆ test_SHCreateMemStream()
| static void test_SHCreateMemStream |
( |
void |
| ) |
|
|
static |
Definition at line 735 of file istream.c.
736{
737 static const BYTE initial[10];
744
748
752
755
756 hr = IStream_QueryInterface(
stream, &IID_ISequentialStream, (
void **)&unk);
758 if (unk)
759 IUnknown_Release(unk);
760
763#ifdef __REACTOS__
765#else
767#endif
768 ok(
num == 0,
"expected 0, got 0x%08lx\n",
num);
769
773 ok(
hr ==
S_OK,
"Failed to write, hr %#lx.\n",
hr);
775
778 ok(
hr ==
S_OK,
"Failed to seek, hr %#lx.\n",
hr);
779
783 ok(
hr ==
S_OK,
"Failed to read, hr %#lx.\n",
hr);
786 ok(
buff[
i] == 0x55,
"expected 0x55, got 0x%02x at %lu\n",
buff[
i],
i);
787
790#ifdef __REACTOS__
792#else
794#endif
795 ok(
num == 0,
"expected 0, got 0x%08lx\n",
num);
796
800 ok(
hr ==
S_OK,
"Failed to write, hr %#lx.\n",
hr);
802
805 ok(
hr ==
S_OK,
"Failed to seek, hr %#lx.\n",
hr);
806
810 ok(
hr ==
S_OK,
"Failed to read, hr %#lx.\n",
hr);
813 ok(
buff[
i] == 0x11,
"expected 0x11, got 0x%02x at %lu\n",
buff[
i],
i);
814
817#ifdef __REACTOS__
819#else
821#endif
822 ok(
num == 0,
"expected 0, got 0x%08lx\n",
num);
823
824 hr = IStream_Clone(
stream, &stream2);
828 IStream_Release(stream2);
829
831}
static unsigned char buff[32768]
IStream *WINAPI SHCreateMemStream(const BYTE *lpbData, UINT dwDataLen)
Referenced by START_TEST().
◆ test_SHCreateStreamOnFileA()
Definition at line 282 of file istream.c.
283{
288 static const CHAR testA_txt[] =
"\\testA.txt";
289
290 trace(
"SHCreateStreamOnFileA: testing mode %ld, STGM flags %08lx\n",
mode, stgm);
291
292
295
296
297
302 return;
303 }
304
307 "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) "
308 "or HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME), got 0x%08lx\n",
ret);
309 ok(
stream ==
NULL,
"SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n",
stream);
310
311if (0)
312{
315}
316
320 ok(
stream ==
NULL,
"SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n",
stream);
321
325 ok(
stream ==
NULL,
"SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n",
stream);
326
330 ok(
stream ==
NULL,
"SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n",
stream);
331
332
333
337 ok(
stream ==
NULL,
"SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n",
stream);
338
341 ok(
ret ==
S_OK,
"SHCreateStreamOnFileA: expected S_OK, got 0x%08lx\n",
ret);
342 ok(
stream !=
NULL,
"SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n");
343
347
348 refcount = IStream_Release(
stream);
349 ok(refcount == 0,
"SHCreateStreamOnFileA: expected 0, got %ld\n", refcount);
350 }
351
352
353
354
355
358 ok(
ret ==
S_OK,
"SHCreateStreamOnFileA: expected S_OK, got 0x%08lx\n",
ret);
359 ok(
stream !=
NULL,
"SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n");
360
363
364 refcount = IStream_Release(
stream);
365 ok(refcount == 0,
"SHCreateStreamOnFileA: expected 0, got %ld\n", refcount);
366 }
367
370 ok(
ret ==
S_OK,
"SHCreateStreamOnFileA: expected S_OK, got 0x%08lx\n",
ret);
371 ok(
stream !=
NULL,
"SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n");
372
375
378
379 refcount = IStream_Release(
stream);
380 ok(refcount == 0,
"SHCreateStreamOnFileA: expected 0, got %ld\n", refcount);
381
383 ok(delret,
"SHCreateStreamOnFileA: could not delete file '%s', got error %ld\n",
385 }
386}
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
HRESULT WINAPI SHCreateStreamOnFileA(LPCSTR lpszPath, DWORD dwMode, IStream **lppStream)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
#define ERROR_FILE_NOT_FOUND
static IBackgroundCopyFile * test_file
static void test_stream_qi(IStream *stream)
static void test_stream_read_write(IStream *stream, DWORD mode)
static void test_IStream_invalid_operations(IStream *stream, DWORD mode)
DWORD WINAPI GetLastError(void)
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define ERROR_PATH_NOT_FOUND
#define ERROR_BAD_PATHNAME
Referenced by START_TEST().
◆ test_SHCreateStreamOnFileEx()
Definition at line 502 of file istream.c.
503{
510 static const CHAR testEx_txt[] =
"\\testEx.txt";
512
514 trace(
"SHCreateStreamOnFileEx: testing mode %ld, STGM flags %08lx\n",
mode, stgm);
515
516
520
521
522
523 if (0)
524 {
525
530 "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08lx\n",
ret);
531 ok(
stream ==
NULL,
"SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n",
stream);
532 }
533
537 win_skip(
"File probably locked by Anti-Virus/Spam software, trying again\n");
540 }
543 "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or "
544 "HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got 0x%08lx\n",
ret);
545
546 ok(
stream ==
NULL,
"SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n",
stream);
547
548 if (0)
549 {
550
553 }
554
555
556
561 "SHCreateStreamOnFileEx: expected E_INVALIDARG or HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08lx\n",
ret);
562
564 skip(
"SHCreateStreamOnFileEx: STGM_TRANSACTED not supported in this configuration.\n");
565 return;
566 }
567 } else {
570 "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or "
571 "HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got 0x%08lx\n",
ret);
572 }
573 ok(
stream ==
NULL,
"SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n",
stream);
574
577
579 skip(
"Not supported\n");
581 return;
582 }
583
584 ok(
ret ==
S_OK,
"SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n",
ret);
585 ok(
stream !=
NULL,
"SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
586
590
591 refcount = IStream_Release(
stream);
592 ok(refcount == 0,
"SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount);
593
595 ok(delret,
"SHCreateStreamOnFileEx: could not delete the test file, got error %ld\n",
597 }
598
602 win_skip(
"File probably locked by Anti-Virus/Spam software, trying again\n");
605 }
606 ok(
ret ==
S_OK,
"SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n",
ret);
607 ok(
stream !=
NULL,
"SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
608
611
612 refcount = IStream_Release(
stream);
613 ok(refcount == 0,
"SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount);
614
616 ok(delret,
"SHCreateStreamOnFileEx: could not delete the test file, got error %ld\n",
618 }
619
623 win_skip(
"File probably locked by Anti-Virus/Spam software, trying again\n");
626 }
627 ok(
ret ==
S_OK,
"SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n",
ret);
628 ok(
stream !=
NULL,
"SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
629
632
633 refcount = IStream_Release(
stream);
634 ok(refcount == 0,
"SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount);
635 }
636
637
638
639
640
643 ok(
ret ==
S_OK,
"SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n",
ret);
644 ok(
stream !=
NULL,
"SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
645
648
649 refcount = IStream_Release(
stream);
650 ok(refcount == 0,
"SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount);
651 }
652
656 ok(
stream ==
NULL,
"SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n",
stream);
657
660 ok(
ret ==
S_OK,
"SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n",
ret);
661 ok(
stream !=
NULL,
"SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
662
665
666 refcount = IStream_Release(
stream);
667 ok(refcount == 0,
"SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount);
668 }
669
672 ok(
ret ==
S_OK,
"SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n",
ret);
673 ok(
stream !=
NULL,
"SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
674
677
678 refcount = IStream_Release(
stream);
679 ok(refcount == 0,
"SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount);
680 }
681
683 ok(delret,
"SHCreateStreamOnFileEx: could not delete the test file, got error %ld\n",
685}
#define ERROR_INVALID_PARAMETER
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode, DWORD dwAttributes, BOOL bCreate, IStream *lpTemplate, IStream **lppStream)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
#define ERROR_FILE_EXISTS
Referenced by START_TEST().
◆ test_SHCreateStreamOnFileEx_CopyTo()
| static void test_SHCreateStreamOnFileEx_CopyTo |
( |
void |
| ) |
|
|
static |
Definition at line 688 of file istream.c.
689{
697 static const char srcContents[1];
698 static const WCHAR prefix[] = {
'T',
'S',
'T', 0 };
699
705
708
710 ret = IStream_Write(
src, srcContents,
sizeof(srcContents), &written.
LowPart);
712
716
719
720
722
725
726 ok(
read.QuadPart == 1,
"read does not match size: %ld != 1\n",
read.LowPart);
727 ok(written.
QuadPart == 1,
"written does not match size: %ld != 1\n", written.
LowPart);
728
729 IStream_Release(
dst);
730 IStream_Release(
src);
733}
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
GLsizei GLsizei GLfloat distance
#define FILE_ATTRIBUTE_TEMPORARY
Character const *const prefix
Referenced by START_TEST().
◆ test_SHCreateStreamOnFileW()
Definition at line 389 of file istream.c.
390{
396 static const CHAR testW_txt[] =
"\\testW.txt";
397
398 trace(
"SHCreateStreamOnFileW: testing mode %ld, STGM flags %08lx\n",
mode, stgm);
399
400
404
405
406
407 if (0)
408 {
409
414 "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08lx\n",
ret);
415 ok(
stream ==
NULL,
"SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n",
stream);
416 }
417
418 if (0)
419 {
420
423 }
424
428 ok(
stream ==
NULL,
"SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n",
stream);
429
433 ok(
stream ==
NULL,
"SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n",
stream);
434
438 ok(
stream ==
NULL,
"SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n",
stream);
439
440
441
446 return;
447 }
448
450 ok(
stream ==
NULL,
"SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n",
stream);
451
454 ok(
ret ==
S_OK,
"SHCreateStreamOnFileW: expected S_OK, got 0x%08lx\n",
ret);
455 ok(
stream !=
NULL,
"SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n");
456
460
461 refcount = IStream_Release(
stream);
462 ok(refcount == 0,
"SHCreateStreamOnFileW: expected 0, got %ld\n", refcount);
463 }
464
465
466
467
468
471 ok(
ret ==
S_OK,
"SHCreateStreamOnFileW: expected S_OK, got 0x%08lx\n",
ret);
472 ok(
stream !=
NULL,
"SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n");
473
476
477 refcount = IStream_Release(
stream);
478 ok(refcount == 0,
"SHCreateStreamOnFileW: expected 0, got %ld\n", refcount);
479 }
480
483 ok(
ret ==
S_OK,
"SHCreateStreamOnFileW: expected S_OK, got 0x%08lx\n",
ret);
484 ok(
stream !=
NULL,
"SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n");
485
488
491
492 refcount = IStream_Release(
stream);
493 ok(refcount == 0,
"SHCreateStreamOnFileW: expected 0, got %ld\n", refcount);
494
496 ok(delret,
"SHCreateStreamOnFileW: could not delete the test file, got error %ld\n",
498 }
499}
HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode, IStream **lppStream)
Referenced by START_TEST().
◆ test_stream_qi()
◆ test_stream_read_write()
Definition at line 188 of file istream.c.
189{
192 unsigned char buf[16];
194 STATSTG statstg;
195
196
197
198 written = 0xdeadbeaf;
201 {
203 ok(written == 2,
"expected 2, got %lu\n", written);
204 }
205 else
206 {
208 ok(written == 0xdeadbeaf ||
broken(written == 2) ,
"expected 0xdeadbeaf, got %#lx\n", written);
209 written = 0;
211 }
212
215
218 if (written != 0)
219 {
222 {
224 ok(
buf[0] == 0x5e &&
buf[1] == 0xa7,
"expected 5ea7, got %02x%02x\n",
buf[0],
buf[1]);
225 }
226 else
228 }
229 else
230 {
231 ok(
ret ==
S_FALSE,
"expected S_FALSE, got %#lx (access %#lx, written %lu)\n",
ret,
mode, written);
233 }
234
237
240 ok(
ret ==
S_OK,
"IStream_Read error %#lx (access %#lx, written %lu)\n",
ret,
mode, written);
242
245 ok(
ret ==
S_FALSE,
"expected S_FALSE, got %#lx (access %#lx, written %lu)\n",
ret,
mode, written);
246 ok(
count == written,
"expected %lu, got %lu\n", written,
count);
248 ok(
buf[0] == 0x5e &&
buf[1] == 0xa7,
"expected 5ea7, got %02x%02x\n",
buf[0],
buf[1]);
249
250 memset(&statstg, 0xff,
sizeof(statstg));
255
256 memset(&statstg, 0xff,
sizeof(statstg));
257 ret = IStream_Stat(
stream, &statstg, STATFLAG_NONAME);
260}
GLenum GLuint GLenum GLsizei const GLchar * buf
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Referenced by test_SHCreateStreamOnFileA(), and test_SHCreateStreamOnFileW().