82 IStream_AddRef(iface);
110 if (
This->failreadcall)
114 else if (
This->failreadsize)
116 *lpRead = ulSize + 8;
119 else if (
This->readreturnlarge)
121 *((
ULONG*)lpMem) = 0xffff01;
126 if (ulSize ==
sizeof(
ULONG))
138 if (!
This->item->ulSize)
147 for (
i = 0;
i <
This->item->ulSize;
i++)
161 if (
This->failwritecall)
165 else if (
This->failwritesize)
191 if (
This->failstatcall)
194 pstatstg->cbSize.QuadPart =
This->pos.QuadPart;
240 win_skip(
"Too old shlwapi version\n");
245 ok(pSHLWAPI_17 != 0,
"No Ordinal 17\n");
247 ok(pSHLWAPI_18 != 0,
"No Ordinal 18\n");
249 ok(pSHLWAPI_19 != 0,
"No Ordinal 19\n");
251 ok(pSHLWAPI_20 != 0,
"No Ordinal 20\n");
253 ok(pSHLWAPI_21 != 0,
"No Ordinal 21\n");
255 ok(pSHLWAPI_22 != 0,
"No Ordinal 22\n");
257 ok(pSHLWAPI_166 != 0,
"No Ordinal 166\n");
259 ok(pSHLWAPI_184 != 0,
"No Ordinal 184\n");
261 ok(pSHLWAPI_212 != 0,
"No Ordinal 212\n");
263 ok(pSHLWAPI_213 != 0,
"No Ordinal 213\n");
265 ok(pSHLWAPI_214 != 0,
"No Ordinal 214\n");
286 obj->pos.QuadPart = 0;
301 if (!pSHLWAPI_17 || !pSHLWAPI_18 || !pSHLWAPI_19 || !pSHLWAPI_20 ||
302 !pSHLWAPI_21 || !pSHLWAPI_22)
312 for (
i = 0;
i <
item->ulSize;
i++)
316 bRet = pSHLWAPI_20(&
list, inserted);
317 ok(bRet ==
TRUE,
"failed list add\n");
324 inserted = pSHLWAPI_22(
list,
item->ulId);
325 ok(inserted !=
NULL,
"lost after adding\n");
327 ok(!inserted || inserted->
ulId != ~0
U,
"find returned a container\n");
330 if (inserted && inserted->
ulSize & 0x3)
333 ok(inserted[-1].ulId == ~0
U,
"invalid size is not countained\n");
335 "container too small\n");
340 "id %d wrong size %d\n", inserted->
ulId, inserted->
ulSize);
351 ok(bDataOK ==
TRUE,
"data corrupted on insert\n");
353 ok(!inserted || inserted->
ulId==
item->ulId,
"find got wrong item\n");
362 ok(hRet ==
S_OK,
"write failed\n");
367 ok(streamobj.
readcalls == 0,
"called Read() in write\n");
368 ok(streamobj.
seekcalls == 0,
"called Seek() in write\n");
376 ok(streamobj.
writecalls == 1,
"called object after failure\n");
377 ok(streamobj.
readcalls == 0,
"called Read() after failure\n");
378 ok(streamobj.
seekcalls == 0,
"called Seek() after failure\n");
384 "changed size failure return\n");
385 ok(streamobj.
writecalls == 1,
"called object after size failure\n");
386 ok(streamobj.
readcalls == 0,
"called Read() after failure\n");
387 ok(streamobj.
seekcalls == 0,
"called Seek() after failure\n");
393 bRet = pSHLWAPI_20(&
list, inserted);
394 ok(bRet ==
FALSE,
"Expected failure\n");
396 inserted = pSHLWAPI_22(
list, 33);
397 ok(inserted ==
NULL,
"inserted bad element size\n");
401 inserted->
ulId = ~0
U;
402 bRet = pSHLWAPI_20(&
list, inserted);
403 ok(bRet ==
FALSE,
"Expected failure\n");
408 inserted = pSHLWAPI_22(
list, 99999999);
409 ok(inserted ==
NULL,
"found a nonexistent item\n");
415 ok(bRet ==
TRUE,
"couldn't find item to delete\n");
420 inserted = pSHLWAPI_22(
list, 99999999);
421 ok(inserted ==
NULL,
"found an item in empty list\n");
427 ok(hRet ==
S_OK,
"failed create from Read()\n");
433 ok(streamobj.
writecalls == 0,
"called Write() from create\n");
434 ok(streamobj.
seekcalls == 0,
"called Seek() from create\n");
441 inserted = pSHLWAPI_22(
list,
item->ulId);
442 ok(inserted !=
NULL,
"lost after adding\n");
444 ok(!inserted || inserted->
ulId != ~0
U,
"find returned a container\n");
447 if (inserted && inserted->
ulSize & 0x3)
450 ok(inserted[-1].ulId == ~0
U,
"invalid size is not countained\n");
452 "container too small\n");
457 "id %d wrong size %d\n", inserted->
ulId, inserted->
ulSize);
459 ok(!inserted || inserted->
ulId==
item->ulId,
"find got wrong item\n");
469 ok(bDataOK ==
TRUE,
"data corrupted on insert\n");
481 ok(streamobj.
readcalls == 1,
"called object after read failure\n");
482 ok(streamobj.
writecalls == 0,
"called Write() after read failure\n");
483 ok(streamobj.
seekcalls == 0,
"called Seek() after read failure\n");
489 ok(hRet ==
S_OK,
"failed create from Read() with large item\n");
492 ok(streamobj.
writecalls == 0,
"called Write() after read failure\n");
515 ok(streamobj.
statcalls == 1,
"wrong call count\n");
522 ok(bRet ==
FALSE,
"failed after seek adjusted\n");
526 ok(streamobj.
statcalls == 1,
"wrong call count\n");
533 ok(bRet ==
FALSE,
"should be FALSE after read is OK\n");
534 ok(streamobj.
readcalls == 1,
"wrong call count\n");
536 ok(streamobj.
seekcalls == 1,
"wrong call count\n");
537 ok(streamobj.
statcalls == 1,
"wrong call count\n");
545 ok(bRet ==
TRUE,
"Should be true after read fails\n");
546 ok(streamobj.
readcalls == 1,
"wrong call count\n");
549 ok(streamobj.
statcalls == 1,
"wrong call count\n");
550 ok(streamobj.
pos.
QuadPart == 50001,
"called Seek() after read failed\n");
566 ok(hRet ==
S_OK,
"failed Read()\n");
567 ok(streamobj.
readcalls == 1,
"wrong call count\n");
584 ok(hRet ==
S_OK,
"failed Write()\n");
597 if (!pSHLWAPI_213 || !pSHLWAPI_214)
609 ok(streamobj.
seekcalls == 1,
"wrong call count\n");
613 ok(hRet ==
S_OK,
"failed Stat()\n");
614 ok(ul.QuadPart == 0,
"213 didn't rewind stream\n");
634 ok(hRet ==
S_OK,
"failed Stat()\n");
635 ok(streamobj.
statcalls == 1,
"wrong call count\n");
639 ok(ul.QuadPart == 5000l,
"Stat gave wrong size\n");
#define InterlockedIncrement
#define InterlockedDecrement
#define GetProcAddress(x, y)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
static unsigned char buff[32768]
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
static ULARGE_INTEGER *static BOOL InitFunctionPtrs(void)
const SHLWAPI_CLIST * LPCSHLWAPI_CLIST
static HRESULT WINAPI QueryInterface(IStream *iface, REFIID riid, void **ret_iface)
static void test_SHLWAPI_184(void)
static HRESULT WINAPI Write(IStream *iface, const void *lpMem, ULONG ulSize, ULONG *lpWritten)
static HRESULT WINAPI Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static void test_SHLWAPI_214(void)
struct tagSHLWAPI_CLIST SHLWAPI_CLIST
static void test_CList(void)
static ULONG WINAPI AddRef(IStream *iface)
static void test_SHLWAPI_212(void)
static void InitDummyStream(struct dummystream *obj)
static struct dummystream * impl_from_IStream(IStream *iface)
struct tagSHLWAPI_CLIST * LPSHLWAPI_CLIST
static BOOL test_SHLWAPI_166(void)
static const SHLWAPI_CLIST SHLWAPI_CLIST_items[]
static void test_SHLWAPI_213(void)
static HMODULE SHLWAPI_hshlwapi
#define IsEqualGUID(rguid1, rguid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
#define CONTAINING_RECORD(address, type, field)
#define STG_E_ACCESSDENIED