44 TRACE(
"(%p, %X, 0x%lx, 0x%lx);\n", lpmmioinfo, uMessage, lParam1, lParam2);
58 FIXME(
"MMIO_GETTEMP not implemented\n");
127 if (!
MoveFileA((
const char*)lParam1, (
const char*)lParam2))
132 FIXME(
"unexpected message %u\n", uMessage);
145 TRACE(
"(%p,0x%04x,0x%08lx,0x%08lx)\n", lpmmioinfo, uMessage, lParam1, lParam2);
178 FIXME(
"MMIOM_READ on memory files should not occur, buffer may be lost!\n");
192 FIXME(
"MMIOM_WRITE on memory files should not occur, buffer may be lost!\n");
202 FIXME(
"MMIOM_SEEK on memory files should not occur, buffer may be lost!\n");
206 FIXME(
"unexpected message %u\n", uMessage);
232 if (pListNode->
fourCC == fccIOProc) {
252 FIXME(
"Global procedures not implemented\n");
261 pListNode->
fourCC = fccIOProc;
264 pListNode->
count = 0;
285 while ((*ppListNode) &&
287 (*ppListNode)->fourCC != fccIOProc :
288 (*ppListNode)->pIOProc !=
pIOProc))
289 ppListNode = &((*ppListNode)->pNext);
295 if ((*ppListNode)->count) {
296 ERR(
"Cannot remove a mmIOProc while in use\n");
302 WARN(
"Tried to remove built-in mmio proc. Skipping\n");
306 lpProc = (*ppListNode)->
pIOProc;
307 *ppListNode = (*ppListNode)->
pNext;
331 LPARAM lp1 = lParam1, lp2 = lParam2;
334 ERR(
"ioProc NULL\n");
340 FIXME(
"NIY 32 A<=>W mapping\n");
380 extEnd =
strrchr(szFileName,
'+');
387 extStart = extEnd - 1;
388 while (extStart >= szFileName && *extStart !=
'.') {
391 if (extStart < szFileName) {
392 ERR(
"No extension in szFileName: %s\n",
debugstr_a(szFileName));
397 if (extEnd - extStart - 1 > 4)
398 WARN(
"Extension length > 4\n");
434 static WORD MMIO_counter = 0;
462 while (*
m && *
m != wm)
m = &(*m)->
lpNext;
502 TRACE(
"bo=%x do=%x of=%lx\n",
533 WARN(
"Untested handling of huge mmio buffers (%d >= 64k)\n",
cchBuffer);
573 TRACE(
"('%s', %p, %08X, %s);\n", szFileName, refmminfo, dwOpenFlags,
is_unicode ?
"unicode" :
"ansi");
576 refmminfo = &mmioinfo;
680 if (!szFn)
return NULL;
765 if (
size <= 0)
break;
810 FIXME(
"memory file expansion not implemented!\n");
841 TRACE(
"(%p, %08X, %d);\n", hmmio, lOffset, iOrigin);
910 *lpmmioinfo = wm->
info;
949 TRACE(
"(hmmio=%p, pchBuf=%p, cchBuf=%d, uFlags=%#08x)\n",
980 TRACE(
"hmmio=%p, lpmmioinfo=%p, uFlags=%04X\n", hmmio, lpmmioinfo,
uFlags);
999 lpmmioinfo->
dwFlags &= ~MMIO_DIRTY;
1030 for (
i = 0;
i < 4 && sz[
i];
i++) {
1039 while (
i < 4)
cc[
i++] =
' ';
1084 TRACE(
"(%p, %u, %ld, %ld, %s)\n", hmmio, uMessage, lParam1, lParam2,
is_unicode ?
"unicode" :
"ansi");
1114 TRACE(
"(%p, %p, %p, %04X);\n", hmmio, lpck, lpckParent,
uFlags);
1120 TRACE(
"dwOldPos=%d\n", dwOldPos);
1122 if (lpckParent !=
NULL) {
1125 if (dwOldPos < lpckParent->dwDataOffset ||
1127 WARN(
"outside parent chunk\n");
1141 srchCkId = lpck->
ckid;
1156 TRACE(
"searching for %4.4s.%4.4s\n",
1157 (
LPCSTR)&srchCkId, srchType ? (
LPCSTR)&srchType :
"any");
1164 if (ix < 0 || ix < 2*
sizeof(
DWORD))
1167 WARN(
"return ChunkNotFound\n");
1171 lpck->dwDataOffset = dwOldPos + 2 *
sizeof(
DWORD);
1172 TRACE(
"ckid=%4.4s fcc=%4.4s cksize=%08X !\n",
1174 srchType ? (
LPCSTR)&lpck->fccType:
"<na>",
1176 if ( (!srchCkId || (srchCkId == lpck->ckid)) &&
1177 (!srchType || (srchType == lpck->fccType)) )
1180 dwOldPos = lpck->dwDataOffset + ((lpck->cksize + 1) & ~1);
1196 TRACE(
"lpck: ckid=%.4s, cksize=%d, dwDataOffset=%d fccType=%08X (%.4s)!\n",
1210 DWORD dwOldPos, dwNewSize;
1212 TRACE(
"Chunk is dirty, checking if chunk's size is correct\n");
1216 if (dwNewSize != lpck->
cksize) {
1217 TRACE(
"Nope: lpck->cksize=%d dwNewSize=%d\n", lpck->
cksize, dwNewSize);
1218 lpck->
cksize = dwNewSize;
1221 if (dwNewSize & 1) {
1248 TRACE(
"dwOldPos=%d\n", dwOldPos);
1265 TRACE(
"after mmioWrite ix = %d req = %d, errno = %d\n", ix,
size,
errno);
1268 WARN(
"return CannotWrite\n");
1285 TRACE(
"('%s', '%s', %p, %08X);\n",
1332 if (!szFn)
goto done;
1339 if (!sznFn)
goto done;
char * strcpy(char *DstString, const char *SrcString)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
static const WCHAR *const ext[]
HFILE WINAPI OpenFile(LPCSTR lpFileName, LPOFSTRUCT lpReOpenBuff, UINT uStyle)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
BOOL WINAPI MoveFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName)
DWORD WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart)
MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags)
static HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO *refmminfo, DWORD dwOpenFlags, BOOL is_unicode)
static MMRESULT MMIO_Flush(WINE_MMIO *wm, UINT uFlags)
static LPMMIOPROC MMIO_InstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags, BOOL is_unicode)
MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT uFlags)
static LONG MMIO_GrabNextBuffer(LPWINE_MMIO wm, int for_read)
MMRESULT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags)
static LRESULT MMIO_SendMessage(HMMIO hmmio, UINT uMessage, LPARAM lParam1, LPARAM lParam2, BOOL is_unicode)
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)
static FOURCC MMIO_ParseExtA(LPCSTR szFileName)
static LRESULT CALLBACK mmioDosIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage, LPARAM lParam1, LPARAM lParam2)
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)
static struct IOProcList * pIOProcListAnchor
LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
static struct IOProcList defaultProcs[]
FOURCC WINAPI mmioStringToFOURCCW(LPCWSTR sz, UINT uFlags)
MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO *lpck, UINT uFlags)
static BOOL MMIO_Destroy(LPWINE_MMIO wm)
static struct IOProcList * MMIO_FindProcNode(FOURCC fccIOProc)
static MMRESULT MMIO_SetBuffer(WINE_MMIO *wm, void *pchBuffer, LONG cchBuffer, UINT uFlags)
LPMMIOPROC WINAPI mmioInstallIOProcA(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
static WINE_MMIO * MMIOList
FOURCC WINAPI mmioStringToFOURCCA(LPCSTR sz, UINT uFlags)
MMRESULT WINAPI mmioRenameA(LPCSTR szFileName, LPCSTR szNewFileName, const MMIOINFO *lpmmioinfo, DWORD dwFlags)
static LRESULT CALLBACK mmioMemIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage, LPARAM lParam1, LPARAM lParam2)
LPMMIOPROC WINAPI mmioInstallIOProcW(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
static LPWINE_MMIO MMIO_Create(void)
LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMessage, LPARAM lParam1, LPARAM lParam2)
HMMIO WINAPI mmioOpenW(LPWSTR szFileName, MMIOINFO *lpmmioinfo, DWORD dwOpenFlags)
static LRESULT send_message(struct IOProcList *ioProc, LPMMIOINFO mmioinfo, DWORD wMsg, LPARAM lParam1, LPARAM lParam2, BOOL is_unicode)
MMRESULT WINAPI mmioRenameW(LPCWSTR szFileName, LPCWSTR szNewFileName, const MMIOINFO *lpmmioinfo, DWORD dwFlags)
MMRESULT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO *lpmmioinfo, UINT uFlags)
MMRESULT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO *lpmmioinfo, UINT uFlags)
static LPWINE_MMIO MMIO_Get(HMMIO h)
GLuint GLuint GLsizei count
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
int WINAPI _lclose(HFILE hFile)
LONG WINAPI _llseek(HFILE hFile, LONG lOffset, int iOrigin)
long WINAPI _hwrite(HFILE hFile, LPCSTR lpBuffer, long lBytes)
#define memcpy(s1, s2, n)
#define MMIOERR_CHUNKNOTFOUND
#define MMIO_DEFAULTBUFFER
#define MMIOERR_FILENOTFOUND
#define MMIOERR_OUTOFMEMORY
#define MMSYSERR_INVALHANDLE
#define MMSYSERR_INVALPARAM
#define MMIOERR_CANNOTOPEN
#define mmioFOURCC(c0, c1, c2, c3)
#define MMIOERR_UNBUFFERED
#define MMIOERR_CANNOTWRITE
static DWORD DWORD void LPSTR DWORD cch
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
struct IOProcList * pNext
struct IOProcList * ioProc
struct tagWINE_MMIO * lpNext
#define INVALID_FILE_ATTRIBUTES
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
CRITICAL_SECTION WINMM_cs