Lines Matching refs:mmio

49     MMIOINFO mmio;  in expect_buf_offset_dbg()  local
52 memset(&mmio, 0, sizeof(mmio)); in expect_buf_offset_dbg()
53 ret = mmioGetInfo(hmmio, &mmio, 0); in expect_buf_offset_dbg()
55 ok_(__FILE__, line)(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in expect_buf_offset_dbg()
66 MMIOINFO mmio; in test_mmioDescend() local
69 memset(&mmio, 0, sizeof(mmio)); in test_mmioDescend()
70 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioDescend()
71 mmio.cchBuffer = sizeof(RIFF_buf); in test_mmioDescend()
72 mmio.pchBuffer = (char *)RIFF_buf; in test_mmioDescend()
73 hmmio = mmioOpenA(fname, &mmio, MMIO_READ); in test_mmioDescend()
79 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioDescend()
234 MMIOINFO mmio; in test_mmioOpen() local
236 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
237 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioOpen()
238 mmio.cchBuffer = sizeof(buf); in test_mmioOpen()
239 mmio.pchBuffer = buf; in test_mmioOpen()
240 hmmio = mmioOpenA(fname, &mmio, MMIO_READ); in test_mmioOpen()
246 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioOpen()
248 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
249 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen()
251 ok(mmio.dwFlags == MMIO_READ, "expected MMIO_READ, got %x\n", mmio.dwFlags); in test_mmioOpen()
252 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioOpen()
253 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioOpen()
254 ok(mmio.cchBuffer == sizeof(buf), "got %u\n", mmio.cchBuffer); in test_mmioOpen()
255 ok(mmio.pchBuffer == buf, "expected %p, got %p\n", buf, mmio.pchBuffer); in test_mmioOpen()
256 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioOpen()
257 if (mmio.fccIOProc == FOURCC_DOS) in test_mmioOpen()
258 … ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioOpen()
260 …ok(mmio.pchEndRead == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffe… in test_mmioOpen()
261 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioOpen()
262 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioOpen()
263 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioOpen()
270 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
271 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioOpen()
272 mmio.cchBuffer = 0; in test_mmioOpen()
273 mmio.pchBuffer = buf; in test_mmioOpen()
274 hmmio = mmioOpenA(fname, &mmio, MMIO_READ); in test_mmioOpen()
275 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioOpen()
277 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
278 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen()
280 ok(mmio.dwFlags == MMIO_READ, "expected MMIO_READ, got %x\n", mmio.dwFlags); in test_mmioOpen()
281 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioOpen()
282 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioOpen()
283 ok(mmio.cchBuffer == 0, "expected 0, got %u\n", mmio.cchBuffer); in test_mmioOpen()
284 ok(mmio.pchBuffer == buf, "expected %p, got %p\n", buf, mmio.pchBuffer); in test_mmioOpen()
285 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioOpen()
286 ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioOpen()
287 … ok(mmio.pchEndWrite == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndWrite); in test_mmioOpen()
288 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioOpen()
289 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioOpen()
296 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
297 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioOpen()
298 mmio.cchBuffer = 0; in test_mmioOpen()
299 mmio.pchBuffer = NULL; in test_mmioOpen()
300 hmmio = mmioOpenA(fname, &mmio, MMIO_READ); in test_mmioOpen()
301 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioOpen()
303 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
304 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen()
306 ok(mmio.dwFlags == MMIO_READ, "expected MMIO_READ, got %x\n", mmio.dwFlags); in test_mmioOpen()
307 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioOpen()
308 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioOpen()
309 ok(mmio.cchBuffer == 0, "expected 0, got %u\n", mmio.cchBuffer); in test_mmioOpen()
310 ok(mmio.pchBuffer == NULL, "expected NULL\n"); in test_mmioOpen()
311 ok(mmio.pchNext == NULL, "expected NULL\n"); in test_mmioOpen()
312 ok(mmio.pchEndRead == NULL, "expected NULL\n"); in test_mmioOpen()
313 ok(mmio.pchEndWrite == NULL, "expected NULL\n"); in test_mmioOpen()
314 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioOpen()
315 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioOpen()
322 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
323 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioOpen()
324 mmio.cchBuffer = 256; in test_mmioOpen()
325 mmio.pchBuffer = NULL; in test_mmioOpen()
326 hmmio = mmioOpenA(fname, &mmio, MMIO_READ); in test_mmioOpen()
327 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioOpen()
329 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
330 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen()
332 …ok(mmio.dwFlags == (MMIO_READ|MMIO_ALLOCBUF), "expected MMIO_READ|MMIO_ALLOCBUF, got %x\n", mmio.d… in test_mmioOpen()
333 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioOpen()
334 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioOpen()
335 ok(mmio.cchBuffer == 256, "expected 256, got %u\n", mmio.cchBuffer); in test_mmioOpen()
336 ok(mmio.pchBuffer != NULL, "expected not NULL\n"); in test_mmioOpen()
337 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioOpen()
338 if (mmio.fccIOProc == FOURCC_DOS) in test_mmioOpen()
339 … ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioOpen()
341 …ok(mmio.pchEndRead == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffe… in test_mmioOpen()
342 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioOpen()
343 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioOpen()
344 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioOpen()
351 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
352 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioOpen()
353 mmio.cchBuffer = sizeof(buf); in test_mmioOpen()
354 mmio.pchBuffer = buf; in test_mmioOpen()
355 hmmio = mmioOpenA(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF); in test_mmioOpen()
356 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioOpen()
358 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
359 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen()
361 ok(mmio.dwFlags == MMIO_READ, "expected MMIO_READ, got %x\n", mmio.dwFlags); in test_mmioOpen()
362 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioOpen()
363 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioOpen()
364 ok(mmio.cchBuffer == sizeof(buf), "got %u\n", mmio.cchBuffer); in test_mmioOpen()
365 ok(mmio.pchBuffer == buf, "expected %p, got %p\n", buf, mmio.pchBuffer); in test_mmioOpen()
366 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioOpen()
367 if (mmio.fccIOProc == FOURCC_DOS) in test_mmioOpen()
368 … ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioOpen()
370 …ok(mmio.pchEndRead == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffe… in test_mmioOpen()
371 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioOpen()
372 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioOpen()
373 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioOpen()
380 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
381 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioOpen()
382 mmio.cchBuffer = 0; in test_mmioOpen()
383 mmio.pchBuffer = NULL; in test_mmioOpen()
384 hmmio = mmioOpenA(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF); in test_mmioOpen()
385 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioOpen()
387 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
388 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen()
390 …ok(mmio.dwFlags == (MMIO_READ|MMIO_ALLOCBUF), "expected MMIO_READ|MMIO_ALLOCBUF, got %x\n", mmio.d… in test_mmioOpen()
391 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioOpen()
392 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioOpen()
393 … ok(mmio.cchBuffer == MMIO_DEFAULTBUFFER, "expected MMIO_DEFAULTBUFFER, got %u\n", mmio.cchBuffer); in test_mmioOpen()
394 ok(mmio.pchBuffer != NULL, "expected not NULL\n"); in test_mmioOpen()
395 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioOpen()
396 if (mmio.fccIOProc == FOURCC_DOS) in test_mmioOpen()
397 … ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioOpen()
399 …ok(mmio.pchEndRead == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffe… in test_mmioOpen()
400 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioOpen()
401 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioOpen()
402 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioOpen()
409 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
410 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioOpen()
411 mmio.cchBuffer = 256; in test_mmioOpen()
412 mmio.pchBuffer = NULL; in test_mmioOpen()
413 hmmio = mmioOpenA(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF); in test_mmioOpen()
414 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioOpen()
416 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
417 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen()
419 …ok(mmio.dwFlags == (MMIO_READ|MMIO_ALLOCBUF), "expected MMIO_READ|MMIO_ALLOCBUF, got %x\n", mmio.d… in test_mmioOpen()
420 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioOpen()
421 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioOpen()
422 ok(mmio.cchBuffer == 256, "expected 256, got %u\n", mmio.cchBuffer); in test_mmioOpen()
423 ok(mmio.pchBuffer != NULL, "expected not NULL\n"); in test_mmioOpen()
424 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioOpen()
425 if (mmio.fccIOProc == FOURCC_DOS) in test_mmioOpen()
426 … ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioOpen()
428 …ok(mmio.pchEndRead == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffe… in test_mmioOpen()
429 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioOpen()
430 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioOpen()
431 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioOpen()
438 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
439 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioOpen()
440 mmio.cchBuffer = 0; in test_mmioOpen()
441 mmio.pchBuffer = buf; in test_mmioOpen()
442 hmmio = mmioOpenA(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF); in test_mmioOpen()
443 if (!hmmio && mmio.wErrorRet == ERROR_BAD_FORMAT) in test_mmioOpen()
449 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioOpen()
451 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen()
452 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen()
454 ok(mmio.dwFlags == MMIO_READ, "expected MMIO_READ, got %x\n", mmio.dwFlags); in test_mmioOpen()
455 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioOpen()
456 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioOpen()
457 … ok(mmio.cchBuffer == MMIO_DEFAULTBUFFER, "expected MMIO_DEFAULTBUFFER, got %u\n", mmio.cchBuffer); in test_mmioOpen()
458 ok(mmio.pchBuffer == buf, "expected %p, got %p\n", buf, mmio.pchBuffer); in test_mmioOpen()
459 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioOpen()
460 if (mmio.fccIOProc == FOURCC_DOS) in test_mmioOpen()
461 … ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioOpen()
463 …ok(mmio.pchEndRead == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffe… in test_mmioOpen()
464 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioOpen()
465 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioOpen()
466 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioOpen()
479 MMIOINFO mmio; in test_mmioSetBuffer() local
481 memset(&mmio, 0, sizeof(mmio)); in test_mmioSetBuffer()
482 mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM; in test_mmioSetBuffer()
483 mmio.cchBuffer = sizeof(buf); in test_mmioSetBuffer()
484 mmio.pchBuffer = buf; in test_mmioSetBuffer()
485 hmmio = mmioOpenA(fname, &mmio, MMIO_READ); in test_mmioSetBuffer()
491 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioSetBuffer()
493 memset(&mmio, 0, sizeof(mmio)); in test_mmioSetBuffer()
494 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioSetBuffer()
496 ok(mmio.dwFlags == MMIO_READ, "expected MMIO_READ, got %x\n", mmio.dwFlags); in test_mmioSetBuffer()
497 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioSetBuffer()
498 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioSetBuffer()
499 ok(mmio.cchBuffer == sizeof(buf), "got %u\n", mmio.cchBuffer); in test_mmioSetBuffer()
500 ok(mmio.pchBuffer == buf, "expected %p, got %p\n", buf, mmio.pchBuffer); in test_mmioSetBuffer()
501 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioSetBuffer()
502 if (mmio.fccIOProc == FOURCC_DOS) in test_mmioSetBuffer()
503 … ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioSetBuffer()
505 …ok(mmio.pchEndRead == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffe… in test_mmioSetBuffer()
506 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioSetBuffer()
507 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioSetBuffer()
508 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioSetBuffer()
516 memset(&mmio, 0, sizeof(mmio)); in test_mmioSetBuffer()
517 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioSetBuffer()
519 ok(mmio.dwFlags == MMIO_READ, "expected MMIO_READ, got %x\n", mmio.dwFlags); in test_mmioSetBuffer()
520 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioSetBuffer()
521 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioSetBuffer()
522 ok(mmio.cchBuffer == 0, "got not 0\n"); in test_mmioSetBuffer()
523 ok(mmio.pchBuffer == NULL, "got not NULL buf\n"); in test_mmioSetBuffer()
524 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioSetBuffer()
525 ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioSetBuffer()
526 … ok(mmio.pchEndWrite == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndWrite); in test_mmioSetBuffer()
527 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioSetBuffer()
528 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioSetBuffer()
536 memset(&mmio, 0, sizeof(mmio)); in test_mmioSetBuffer()
537 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioSetBuffer()
539 ok(mmio.dwFlags == MMIO_READ, "expected MMIO_READ, got %x\n", mmio.dwFlags); in test_mmioSetBuffer()
540 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioSetBuffer()
541 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioSetBuffer()
542 ok(mmio.cchBuffer == 0, "got not 0\n"); in test_mmioSetBuffer()
543 ok(mmio.pchBuffer == NULL, "got not NULL buf\n"); in test_mmioSetBuffer()
544 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioSetBuffer()
545 ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioSetBuffer()
546 … ok(mmio.pchEndWrite == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndWrite); in test_mmioSetBuffer()
547 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioSetBuffer()
548 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioSetBuffer()
556 memset(&mmio, 0, sizeof(mmio)); in test_mmioSetBuffer()
557 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioSetBuffer()
559 ok(mmio.dwFlags == MMIO_READ, "expected MMIO_READ, got %x\n", mmio.dwFlags); in test_mmioSetBuffer()
560 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioSetBuffer()
561 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioSetBuffer()
562 ok(mmio.cchBuffer == 0, "got not 0\n"); in test_mmioSetBuffer()
563 ok(mmio.pchBuffer == buf, "expected %p, got %p\n", buf, mmio.pchBuffer); in test_mmioSetBuffer()
564 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioSetBuffer()
565 ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioSetBuffer()
566 … ok(mmio.pchEndWrite == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndWrite); in test_mmioSetBuffer()
567 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioSetBuffer()
568 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioSetBuffer()
576 memset(&mmio, 0, sizeof(mmio)); in test_mmioSetBuffer()
577 ret = mmioGetInfo(hmmio, &mmio, 0); in test_mmioSetBuffer()
579 …ok(mmio.dwFlags == (MMIO_READ|MMIO_ALLOCBUF), "expected MMIO_READ|MMIO_ALLOCBUF, got %x\n", mmio.d… in test_mmioSetBuffer()
580 ok(mmio.wErrorRet == MMSYSERR_NOERROR, "expected MMSYSERR_NOERROR, got %u\n", mmio.wErrorRet); in test_mmioSetBuffer()
581 ok(mmio.fccIOProc == (fname ? FOURCC_DOS : FOURCC_MEM), "got %4.4s\n", (LPCSTR)&mmio.fccIOProc); in test_mmioSetBuffer()
582 ok(mmio.cchBuffer == 256, "got %u\n", mmio.cchBuffer); in test_mmioSetBuffer()
583 ok(mmio.pchBuffer != NULL, "expected not NULL\n"); in test_mmioSetBuffer()
584 ok(mmio.pchBuffer != buf, "expected != buf\n"); in test_mmioSetBuffer()
585 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioSetBuffer()
586 ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", buf, mmio.pchEndRead); in test_mmioSetBuffer()
587 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioSetBuffer()
588 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmioSetBuffer()
589 ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset); in test_mmioSetBuffer()
629 MMIOINFO mmio; in test_mmioOpen_fourcc() local
637 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen_fourcc()
638 hmmio = mmioOpenA(fname, &mmio, MMIO_READ); in test_mmioOpen_fourcc()
639 mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen_fourcc()
640 ok(hmmio && mmio.fccIOProc == FOURCC_XYZ, "mmioOpenA error %u, got %4.4s\n", in test_mmioOpen_fourcc()
641 mmio.wErrorRet, (LPCSTR)&mmio.fccIOProc); in test_mmioOpen_fourcc()
642 ok(mmio.adwInfo[1] == 0, "mmioOpenA sent MMIOM_SEEK, got %d\n", in test_mmioOpen_fourcc()
643 mmio.adwInfo[1]); in test_mmioOpen_fourcc()
644 ok(mmio.lDiskOffset == 0, "mmioOpenA updated lDiskOffset, got %d\n", in test_mmioOpen_fourcc()
645 mmio.lDiskOffset); in test_mmioOpen_fourcc()
649 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen_fourcc()
651 mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen_fourcc()
652 ok(hmmio && mmio.fccIOProc == FOURCC_XYZ, "mmioOpenA error %u, got %4.4s\n", in test_mmioOpen_fourcc()
653 mmio.wErrorRet, (LPCSTR)&mmio.fccIOProc); in test_mmioOpen_fourcc()
654 ok(mmio.adwInfo[1] == 0, "mmioOpenA sent MMIOM_SEEK, got %d\n", in test_mmioOpen_fourcc()
655 mmio.adwInfo[1]); in test_mmioOpen_fourcc()
656 ok(mmio.lDiskOffset == 0, "mmioOpenA updated lDiskOffset, got %d\n", in test_mmioOpen_fourcc()
657 mmio.lDiskOffset); in test_mmioOpen_fourcc()
662 memset(&mmio, 0, sizeof(mmio)); in test_mmioOpen_fourcc()
663 hmmio = mmioOpenA(fname, &mmio, MMIO_READ); in test_mmioOpen_fourcc()
664 mmioGetInfo(hmmio, &mmio, 0); in test_mmioOpen_fourcc()
665 ok(!hmmio && mmio.wErrorRet == MMIOERR_FILENOTFOUND, "mmioOpenA error %u, got %4.4s\n", in test_mmioOpen_fourcc()
666 mmio.wErrorRet, (LPCSTR)&mmio.fccIOProc); in test_mmioOpen_fourcc()
703 MMIOINFO mmio; in test_mmioSeek() local
712 memset(&mmio, 0, sizeof(mmio)); in test_mmioSeek()
713 mmio.fccIOProc = FOURCC_MEM; in test_mmioSeek()
714 mmio.pchBuffer = (char*)&RIFF_buf; in test_mmioSeek()
715 mmio.cchBuffer = sizeof(RIFF_buf); in test_mmioSeek()
716 hmmio = mmioOpenA(NULL, &mmio, MMIO_READ); in test_mmioSeek()
717 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioSeek()
724 res = mmioGetInfo(hmmio, &mmio, 0); in test_mmioSeek()
726 …ok(mmio.pchNext == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffer, in test_mmioSeek()
727 …ok(mmio.pchEndRead == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffe… in test_mmioSeek()
728 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioSeek()
729 ok(mmio.lBufOffset == 0, "expected %d, got %d\n", 0, mmio.lBufOffset); in test_mmioSeek()
730 ok(mmio.lDiskOffset == 0, "expected %d, got %d\n", 0, mmio.lDiskOffset); in test_mmioSeek()
743 memset(&mmio, 0, sizeof(mmio)); in test_mmioSeek()
744 mmio.fccIOProc = FOURCC_DOS; in test_mmioSeek()
745 mmio.pchBuffer = 0; in test_mmioSeek()
746 mmio.cchBuffer = 0; in test_mmioSeek()
747 hmmio = mmioOpenA(test_file, &mmio, MMIO_READ); in test_mmioSeek()
748 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioSeek()
755 res = mmioGetInfo(hmmio, &mmio, 0); in test_mmioSeek()
757 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioSeek()
758 … ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioSeek()
759 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioSeek()
760 ok(mmio.lBufOffset == size, "expected %d, got %d\n", size, mmio.lBufOffset); in test_mmioSeek()
761 ok(mmio.lDiskOffset == size, "expected %d, got %d\n", size, mmio.lDiskOffset); in test_mmioSeek()
772 memset(&mmio, 0, sizeof(mmio)); in test_mmioSeek()
773 mmio.fccIOProc = FOURCC_DOS; in test_mmioSeek()
774 mmio.pchBuffer = 0; in test_mmioSeek()
775 mmio.cchBuffer = 0; in test_mmioSeek()
776 hmmio = mmioOpenA(test_file, &mmio, MMIO_READ | MMIO_ALLOCBUF); in test_mmioSeek()
777 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioSeek()
784 res = mmioGetInfo(hmmio, &mmio, 0); in test_mmioSeek()
786 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmioSeek()
787 … ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmioSeek()
788 …ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuff… in test_mmioSeek()
789 ok(mmio.lBufOffset == end, "expected %d, got %d\n", end, mmio.lBufOffset); in test_mmioSeek()
790 ok(mmio.lDiskOffset == size, "expected %d, got %d\n", size, mmio.lDiskOffset); in test_mmioSeek()
805 memset(&mmio, 0, sizeof(mmio)); in test_mmioSeek()
806 mmio.fccIOProc = FOURCC_DOS; in test_mmioSeek()
807 mmio.adwInfo[0] = (DWORD)hfile; in test_mmioSeek()
808 hmmio = mmioOpenA(NULL, &mmio, MMIO_READ | MMIO_DENYWRITE | MMIO_ALLOCBUF); in test_mmioSeek()
809 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmioSeek()
823 MMIOINFO mmio; in test_mmio_end_of_file() local
830 memset(&mmio, 0, sizeof(mmio)); in test_mmio_end_of_file()
831 mmio.fccIOProc = FOURCC_DOS; in test_mmio_end_of_file()
832 mmio.pchBuffer = buffer; in test_mmio_end_of_file()
833 mmio.cchBuffer = sizeof(buffer); in test_mmio_end_of_file()
834 hmmio = mmioOpenA(test_file, &mmio, MMIO_READ); in test_mmio_end_of_file()
835 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmio_end_of_file()
847 res = mmioGetInfo(hmmio, &mmio, 0); in test_mmio_end_of_file()
850 res = mmioAdvance(hmmio, &mmio, MMIO_READ); in test_mmio_end_of_file()
852 ok(mmio.pchNext == mmio.pchEndRead, "expected %p, got %p\n", mmio.pchEndRead, mmio.pchNext); in test_mmio_end_of_file()
862 MMIOINFO mmio; in test_mmio_buffer_pointer() local
869 memset(&mmio, 0, sizeof(mmio)); in test_mmio_buffer_pointer()
870 mmio.fccIOProc = FOURCC_DOS; in test_mmio_buffer_pointer()
871 mmio.pchBuffer = buffer; in test_mmio_buffer_pointer()
872 mmio.cchBuffer = sizeof(buffer); in test_mmio_buffer_pointer()
873 hmmio = mmioOpenA(test_file, &mmio, MMIO_READ); in test_mmio_buffer_pointer()
874 ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet); in test_mmio_buffer_pointer()
883 res = mmioGetInfo(hmmio, &mmio, 0); in test_mmio_buffer_pointer()
885 ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmio_buffer_pointer()
888 res = mmioAdvance(hmmio, &mmio, MMIO_READ); in test_mmio_buffer_pointer()
890 …ok(mmio.pchEndRead-mmio.pchBuffer == sizeof(buffer), "got %d\n", (int)(mmio.pchEndRead-mmio.pchBuf… in test_mmio_buffer_pointer()
896 res = mmioGetInfo(hmmio, &mmio, 0); in test_mmio_buffer_pointer()
898 ok(mmio.lBufOffset == 0, "expected 0, got %d\n", mmio.lBufOffset); in test_mmio_buffer_pointer()
899 …ok(mmio.pchNext-mmio.pchBuffer == size, "expected %d, got %d\n", size, (int)(mmio.pchNext-mmio.pch… in test_mmio_buffer_pointer()
900 …ok(mmio.pchEndRead-mmio.pchBuffer == sizeof(buffer), "got %d\n", (int)(mmio.pchEndRead-mmio.pchBuf… in test_mmio_buffer_pointer()
906 res = mmioGetInfo(hmmio, &mmio, 0); in test_mmio_buffer_pointer()
908 ok(mmio.lBufOffset == size, "expected %d, got %d\n", size, mmio.lBufOffset); in test_mmio_buffer_pointer()
909 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmio_buffer_pointer()
910 ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmio_buffer_pointer()
915 res = mmioGetInfo(hmmio, &mmio, 0); in test_mmio_buffer_pointer()
917 ok(mmio.lBufOffset == pos+size, "expected %d, got %d\n", pos+size, mmio.lBufOffset); in test_mmio_buffer_pointer()
918 ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext); in test_mmio_buffer_pointer()
919 ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); in test_mmio_buffer_pointer()
938 HMMIO mmio; in test_riff_write() local
946 mmio = mmioOpenA(name, NULL, MMIO_ALLOCBUF|MMIO_CREATE|MMIO_READWRITE); in test_riff_write()
947 ok(mmio != NULL, "mmioOpen failed\n"); in test_riff_write()
950 ret = mmioCreateChunk(mmio, chunk_info, MMIO_CREATERIFF); in test_riff_write()
958 ret = mmioCreateChunk(mmio, chunk_info+1, 0); in test_riff_write()
966 written = mmioWrite(mmio, buf, 8); in test_riff_write()
969 ret = mmioGetInfo(mmio, &info, 0); in test_riff_write()
974 ret = mmioAdvance(mmio, &info, 1); in test_riff_write()
981 ret = mmioAdvance(mmio, &info, 1); in test_riff_write()
988 ret = mmioSetInfo(mmio, &info, 0); in test_riff_write()
991 ret = mmioAscend(mmio, chunk_info+1, 0); in test_riff_write()
993 ret = mmioAscend(mmio, chunk_info, 0); in test_riff_write()
995 ret = mmioClose(mmio, 0); in test_riff_write()
1007 START_TEST(mmio) in START_TEST() argument