35 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,0xdeadbeef,
36 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,0xdeadbeef,
37 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
40 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
41 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
42 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
43 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
44 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
52 memset(&mmio, 0,
sizeof(mmio));
57 ok_(__FILE__,
line)(
ret == off,
"expected %d, got %d\n", off,
ret);
60#define expect_buf_offset(a1, a2) expect_buf_offset_dbg(a1, a2, __LINE__)
67 MMCKINFO ckRiff, ckList, ck, ckList2;
69 memset(&mmio, 0,
sizeof(mmio));
76 trace(
"No optional %s file. Skipping the test\n", fname);
79 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
89 trace(
"ckid %4.4s cksize %04x fccType %4.4s off %04x flags %04x\n",
100 trace(
"ckid %4.4s cksize %04x fccType %4.4s off %04x flags %04x\n",
110 trace(
"ckid %4.4s cksize %04x fccType %4.4s off %04x flags %04x\n",
118 ok(
ret == 0x58,
"expected 0x58, got %#x\n",
ret);
124 trace(
"ckid %4.4s cksize %04x fccType %4.4s off %04x flags %04x\n",
134 trace(
"ckid %4.4s cksize %04x fccType %4.4s off %04x flags %04x\n",
143 memset(&ck, 0x66,
sizeof(ck));
149 memset(&ck, 0x66,
sizeof(ck));
156 memset(&ck, 0x66,
sizeof(ck));
164 memset(&ck, 0x66,
sizeof(ck));
171 memset(&ck, 0x66,
sizeof(ck));
179 memset(&ck, 0x66,
sizeof(ck));
188 memset(&ck, 0x66,
sizeof(ck));
196 memset(&ck, 0x66,
sizeof(ck));
204 memset(&ckList, 0x66,
sizeof(ckList));
212 memset(&ck, 0x66,
sizeof(ck));
216 ok(ck.
ckid != 0x66666666,
"wrong ckid: %04x\n", ck.
ckid);
221 memset(&ck, 0x66,
sizeof(ck));
236 memset(&mmio, 0,
sizeof(mmio));
243 trace(
"No optional %s file. Skipping the test\n", fname);
246 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
248 memset(&mmio, 0,
sizeof(mmio));
266 ok(
ret == 0,
"expected 0, got %d\n",
ret);
270 memset(&mmio, 0,
sizeof(mmio));
275 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
277 memset(&mmio, 0,
sizeof(mmio));
292 ok(
ret == 0,
"expected 0, got %d\n",
ret);
296 memset(&mmio, 0,
sizeof(mmio));
301 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
303 memset(&mmio, 0,
sizeof(mmio));
318 ok(
ret == 0,
"expected 0, got %d\n",
ret);
322 memset(&mmio, 0,
sizeof(mmio));
327 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
329 memset(&mmio, 0,
sizeof(mmio));
347 ok(
ret == 0,
"expected 0, got %d\n",
ret);
351 memset(&mmio, 0,
sizeof(mmio));
356 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
358 memset(&mmio, 0,
sizeof(mmio));
376 ok(
ret == 0,
"expected 0, got %d\n",
ret);
380 memset(&mmio, 0,
sizeof(mmio));
385 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
387 memset(&mmio, 0,
sizeof(mmio));
405 ok(
ret == 0,
"expected 0, got %d\n",
ret);
409 memset(&mmio, 0,
sizeof(mmio));
414 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
416 memset(&mmio, 0,
sizeof(mmio));
434 ok(
ret == 0,
"expected 0, got %d\n",
ret);
438 memset(&mmio, 0,
sizeof(mmio));
446 skip(
"Some Windows versions don't like a 0 size and a given buffer\n");
449 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
451 memset(&mmio, 0,
sizeof(mmio));
469 ok(
ret == 0,
"expected 0, got %d\n",
ret);
481 memset(&mmio, 0,
sizeof(mmio));
488 trace(
"No optional %s file. Skipping the test\n", fname);
491 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
493 memset(&mmio, 0,
sizeof(mmio));
511 ok(
ret == 0,
"expected 0, got %d\n",
ret);
516 memset(&mmio, 0,
sizeof(mmio));
531 ok(
ret == 0,
"expected 0, got %d\n",
ret);
536 memset(&mmio, 0,
sizeof(mmio));
551 ok(
ret == 0,
"expected 0, got %d\n",
ret);
556 memset(&mmio, 0,
sizeof(mmio));
571 ok(
ret == 0,
"expected 0, got %d\n",
ret);
576 memset(&mmio, 0,
sizeof(mmio));
592 ok(
ret == 0,
"expected 0, got %d\n",
ret);
597#define FOURCC_XYZ mmioFOURCC('X', 'Y', 'Z', ' ')
625 char fname[] =
"file+name.xyz+one.two";
637 memset(&mmio, 0,
sizeof(mmio));
642 ok(mmio.
adwInfo[1] == 0,
"mmioOpenA sent MMIOM_SEEK, got %d\n",
644 ok(mmio.
lDiskOffset == 0,
"mmioOpenA updated lDiskOffset, got %d\n",
649 memset(&mmio, 0,
sizeof(mmio));
654 ok(mmio.
adwInfo[1] == 0,
"mmioOpenA sent MMIOM_SEEK, got %d\n",
656 ok(mmio.
lDiskOffset == 0,
"mmioOpenA updated lDiskOffset, got %d\n",
662 memset(&mmio, 0,
sizeof(mmio));
712 memset(&mmio, 0,
sizeof(mmio));
717 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
743 memset(&mmio, 0,
sizeof(mmio));
748 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
772 memset(&mmio, 0,
sizeof(mmio));
777 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
805 memset(&mmio, 0,
sizeof(mmio));
809 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
830 memset(&mmio, 0,
sizeof(mmio));
835 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
845 ok(
ret == 0,
"expected %d, got %d\n", 0,
ret);
869 memset(&mmio, 0,
sizeof(mmio));
874 ok(hmmio != 0,
"mmioOpenA error %u\n", mmio.
wErrorRet);
927 static const DWORD test_write_data[] =
929 FOURCC_RIFF, 0x28,
mmioFOURCC(
'W',
'A',
'V',
'E'),
mmioFOURCC(
'd',
'a',
't',
'a'),
930 0x1b, 0xdededede, 0xdededede, 0xefefefef,
931 0xefefefef, 0xbabababa, 0xbabababa, 0xefefef
934 char name[] =
"test_write.wav";
944 memset(chunk_info, 0,
sizeof(chunk_info));
947 ok(mmio !=
NULL,
"mmioOpen failed\n");
952 ok(chunk_info[0].ckid ==
FOURCC_RIFF,
"chunk_info[0].ckid = %x\n", chunk_info[0].ckid);
953 ok(chunk_info[0].cksize == 0,
"chunk_info[0].cksize = %d\n", chunk_info[0].cksize);
954 ok(chunk_info[0].dwDataOffset == 8,
"chunk_info[0].dwDataOffset = %d\n", chunk_info[0].dwDataOffset);
960 ok(chunk_info[1].ckid ==
mmioFOURCC(
'd',
'a',
't',
'a'),
"chunk_info[1].ckid = %x\n", chunk_info[1].ckid);
961 ok(chunk_info[1].cksize == 0,
"chunk_info[1].cksize = %d\n", chunk_info[1].cksize);
962 ok(chunk_info[1].dwDataOffset == 20,
"chunk_info[1].dwDataOffset = %d\n", chunk_info[1].dwDataOffset);
967 ok(written == 8,
"mmioWrite failed %x\n",
ret);
976 ok(
info.lBufOffset == 36,
"info.lBufOffset = %d\n",
info.lBufOffset);
983 ok(
info.lBufOffset == 44,
"info.lBufOffset = %d\n",
info.lBufOffset);
1002 ok(!
memcmp(
buf, test_write_data,
sizeof(test_write_data)),
"created file is incorrect\n");
1013 char fname[] =
"msrle.avi";
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
HFILE WINAPI OpenFile(LPCSTR lpFileName, LPOFSTRUCT lpReOpenBuff, UINT uStyle)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags)
MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT uFlags)
LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
MMRESULT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO *lpmmioinfo, UINT uFlags)
HMMIO WINAPI mmioOpenA(LPSTR szFileName, MMIOINFO *lpmmioinfo, DWORD dwOpenFlags)
MMRESULT WINAPI mmioClose(HMMIO hmmio, UINT uFlags)
LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch)
MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck, const MMCKINFO *lpckParent, UINT uFlags)
LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO *lpck, UINT uFlags)
LPMMIOPROC WINAPI mmioInstallIOProcA(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
MMRESULT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO *lpmmioinfo, UINT uFlags)
MMRESULT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO *lpmmioinfo, UINT uFlags)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLfloat GLfloat GLfloat GLfloat h
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
LONG WINAPI _llseek(HFILE hFile, LONG lOffset, int iOrigin)
#define MMIOERR_CHUNKNOTFOUND
#define MMIO_DEFAULTBUFFER
#define MMIOERR_FILENOTFOUND
struct _MMIOINFO * LPMMIOINFO
#define MMIOERR_INVALIDFILE
#define mmioFOURCC(c0, c1, c2, c3)
static IBackgroundCopyFile * test_file
static void expect_buf_offset_dbg(HMMIO hmmio, LONG off, int line)
static void test_mmioSeek(void)
static void test_mmioOpen_fourcc(void)
static void test_mmioDescend(char *fname)
static void test_mmioOpen(char *fname)
static LRESULT CALLBACK mmio_test_IOProc(LPSTR lpMMIOInfo, UINT uMessage, LPARAM lParam1, LPARAM lParam2)
#define expect_buf_offset(a1, a2)
static void test_mmioSetBuffer(char *fname)
static BOOL create_test_file(char *temp_file)
static void test_riff_write(void)
static void test_mmio_buffer_pointer(void)
static void test_mmio_end_of_file(void)
#define listtypeSTREAMHEADER
#define listtypeAVIHEADER
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags