dmloader: Win64 printf format warning fixes.

This commit is contained in:
Michael Stefaniuc 2006-10-12 21:33:59 +02:00 committed by Alexandre Julliard
parent 99f4a6a940
commit 187b6ed9b9
6 changed files with 47 additions and 48 deletions

View File

@ -5,7 +5,6 @@ VPATH = @srcdir@
MODULE = dmloader.dll MODULE = dmloader.dll
IMPORTS = ole32 user32 advapi32 kernel32 IMPORTS = ole32 user32 advapi32 kernel32
EXTRALIBS = -ldxguid -luuid EXTRALIBS = -ldxguid -luuid
EXTRADEFS = -DWINE_NO_LONG_AS_INT
C_SRCS = \ C_SRCS = \
classfactory.c \ classfactory.c \

View File

@ -44,7 +44,7 @@ static HRESULT WINAPI IDirectMusicLoaderCF_QueryInterface (LPCLASSFACTORY iface,
static ULONG WINAPI IDirectMusicLoaderCF_AddRef (LPCLASSFACTORY iface) { static ULONG WINAPI IDirectMusicLoaderCF_AddRef (LPCLASSFACTORY iface) {
IDirectMusicLoaderCF *This = (IDirectMusicLoaderCF *)iface; IDirectMusicLoaderCF *This = (IDirectMusicLoaderCF *)iface;
TRACE("(%p): AddRef from %ld\n", This, This->dwRef); TRACE("(%p): AddRef from %d\n", This, This->dwRef);
return InterlockedIncrement (&This->dwRef); return InterlockedIncrement (&This->dwRef);
} }
@ -52,7 +52,7 @@ static ULONG WINAPI IDirectMusicLoaderCF_Release (LPCLASSFACTORY iface) {
IDirectMusicLoaderCF *This = (IDirectMusicLoaderCF *)iface; IDirectMusicLoaderCF *This = (IDirectMusicLoaderCF *)iface;
DWORD dwRef = InterlockedDecrement (&This->dwRef); DWORD dwRef = InterlockedDecrement (&This->dwRef);
TRACE("(%p): ReleaseRef to %ld\n", This, dwRef); TRACE("(%p): ReleaseRef to %d\n", This, dwRef);
if (dwRef == 0) { if (dwRef == 0) {
HeapFree(GetProcessHeap (), 0, This); HeapFree(GetProcessHeap (), 0, This);
/* decrease number of instances */ /* decrease number of instances */
@ -133,7 +133,7 @@ static HRESULT WINAPI IDirectMusicContainerCF_QueryInterface (LPCLASSFACTORY ifa
static ULONG WINAPI IDirectMusicContainerCF_AddRef (LPCLASSFACTORY iface) { static ULONG WINAPI IDirectMusicContainerCF_AddRef (LPCLASSFACTORY iface) {
IDirectMusicContainerCF *This = (IDirectMusicContainerCF *)iface; IDirectMusicContainerCF *This = (IDirectMusicContainerCF *)iface;
TRACE("(%p): AddRef from %ld\n", This, This->dwRef); TRACE("(%p): AddRef from %d\n", This, This->dwRef);
return InterlockedIncrement (&This->dwRef); return InterlockedIncrement (&This->dwRef);
} }
@ -141,7 +141,7 @@ static ULONG WINAPI IDirectMusicContainerCF_Release (LPCLASSFACTORY iface) {
IDirectMusicContainerCF *This = (IDirectMusicContainerCF *)iface; IDirectMusicContainerCF *This = (IDirectMusicContainerCF *)iface;
DWORD dwRef = InterlockedDecrement (&This->dwRef); DWORD dwRef = InterlockedDecrement (&This->dwRef);
TRACE("(%p): ReleaseRef to %ld\n", This, dwRef); TRACE("(%p): ReleaseRef to %d\n", This, dwRef);
if (dwRef == 0) { if (dwRef == 0) {
HeapFree(GetProcessHeap (), 0, This); HeapFree(GetProcessHeap (), 0, This);
/* decrease number of instances */ /* decrease number of instances */

View File

@ -60,7 +60,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_QueryInter
static ULONG WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_AddRef (LPDIRECTMUSICCONTAINER iface) { static ULONG WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_AddRef (LPDIRECTMUSICCONTAINER iface) {
ICOM_THIS_MULTI(IDirectMusicContainerImpl, ContainerVtbl, iface); ICOM_THIS_MULTI(IDirectMusicContainerImpl, ContainerVtbl, iface);
TRACE("(%p): AddRef from %ld\n", This, This->dwRef); TRACE("(%p): AddRef from %d\n", This, This->dwRef);
return InterlockedIncrement (&This->dwRef); return InterlockedIncrement (&This->dwRef);
} }
@ -68,7 +68,7 @@ static ULONG WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_Release (LPD
ICOM_THIS_MULTI(IDirectMusicContainerImpl, ContainerVtbl, iface); ICOM_THIS_MULTI(IDirectMusicContainerImpl, ContainerVtbl, iface);
DWORD dwRef = InterlockedDecrement (&This->dwRef); DWORD dwRef = InterlockedDecrement (&This->dwRef);
TRACE("(%p): ReleaseRef to %ld\n", This, dwRef); TRACE("(%p): ReleaseRef to %d\n", This, dwRef);
if (dwRef == 0) { if (dwRef == 0) {
DMUSIC_DestroyDirectMusicContainerImpl (iface); DMUSIC_DestroyDirectMusicContainerImpl (iface);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -83,7 +83,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_EnumObject
LPWINE_CONTAINER_ENTRY pContainedObject; LPWINE_CONTAINER_ENTRY pContainedObject;
DWORD dwCount = 0; DWORD dwCount = 0;
TRACE("(%p, %s, %ld, %p, %p)\n", This, debugstr_dmguid(rguidClass), dwIndex, pDesc, pwszAlias); TRACE("(%p, %s, %d, %p, %p)\n", This, debugstr_dmguid(rguidClass), dwIndex, pDesc, pwszAlias);
/* check if we can write to whole pDesc */ /* check if we can write to whole pDesc */
if (pDesc) { if (pDesc) {
@ -265,7 +265,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicObject_ParseDescript
/* here we go... */ /* here we go... */
IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
TRACE_(dmfile)(": %s chunk (size = 0x%08lX)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = 0x%08X)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case FOURCC_RIFF: { case FOURCC_RIFF: {
IStream_Read (pStream, &Chunk.fccID, sizeof(FOURCC), NULL); IStream_Read (pStream, &Chunk.fccID, sizeof(FOURCC), NULL);
@ -280,7 +280,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicObject_ParseDescript
do { do {
IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%08lX)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = 0x%08X)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_GUID_CHUNK: { case DMUS_FOURCC_GUID_CHUNK: {
TRACE_(dmfile)(": GUID chunk\n"); TRACE_(dmfile)(": GUID chunk\n");
@ -330,7 +330,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicObject_ParseDescript
do { do {
IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%08lX)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = 0x%08X)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
/* don't ask me why, but M$ puts INFO elements in UNFO list sometimes /* don't ask me why, but M$ puts INFO elements in UNFO list sometimes
(though strings seem to be valid unicode) */ (though strings seem to be valid unicode) */
@ -357,7 +357,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicObject_ParseDescript
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[0] = 0x%08lX < ListSize[0] = 0x%08lX\n", ListCount[0], ListSize[0]); TRACE_(dmfile)(": ListCount[0] = 0x%08X < ListSize[0] = 0x%08X\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
break; break;
} }
@ -377,7 +377,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicObject_ParseDescript
break; break;
} }
} }
TRACE_(dmfile)(": StreamCount[0] = 0x%08lX < StreamSize[0] = 0x%08lX\n", StreamCount, StreamSize); TRACE_(dmfile)(": StreamCount[0] = 0x%08X < StreamSize[0] = 0x%08X\n", StreamCount, StreamSize);
} while (StreamCount < StreamSize); } while (StreamCount < StreamSize);
} else { } else {
TRACE_(dmfile)(": unexpected chunk; loading failed)\n"); TRACE_(dmfile)(": unexpected chunk; loading failed)\n");
@ -480,7 +480,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
/* start with load */ /* start with load */
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
TRACE_(dmfile)(": %s chunk (size = 0x%08lX)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = 0x%08X)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case FOURCC_RIFF: { case FOURCC_RIFF: {
IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
@ -495,7 +495,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%08lX)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = 0x%08X)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_CONTAINER_CHUNK: { case DMUS_FOURCC_CONTAINER_CHUNK: {
TRACE_(dmfile)(": container header chunk\n"); TRACE_(dmfile)(": container header chunk\n");
@ -550,7 +550,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%08lX)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = 0x%08X)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
/* don't ask me why, but M$ puts INFO elements in UNFO list sometimes /* don't ask me why, but M$ puts INFO elements in UNFO list sometimes
(though strings seem to be valid unicode) */ (though strings seem to be valid unicode) */
@ -577,7 +577,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[0] = 0x%08lX < ListSize[0] = 0x%08lX\n", ListCount[0], ListSize[0]); TRACE_(dmfile)(": ListCount[0] = 0x%08X < ListSize[0] = 0x%08X\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
break; break;
} }
@ -586,7 +586,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%08lX)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = 0x%08X)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case FOURCC_LIST: { case FOURCC_LIST: {
IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
@ -602,7 +602,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[1] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[1] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%08lX)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = 0x%08X)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_CONTAINED_ALIAS_CHUNK: { case DMUS_FOURCC_CONTAINED_ALIAS_CHUNK: {
TRACE_(dmfile)(": alias chunk\n"); TRACE_(dmfile)(": alias chunk\n");
@ -637,7 +637,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[2] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[2] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%08lX)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = 0x%08X)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_REF_CHUNK: { case DMUS_FOURCC_REF_CHUNK: {
DMUS_IO_REFERENCE tmpReferenceHeader; /* temporary structure */ DMUS_IO_REFERENCE tmpReferenceHeader; /* temporary structure */
@ -695,7 +695,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[2] = 0x%08lX < ListSize[2] = 0x%08lX\n", ListCount[2], ListSize[2]); TRACE_(dmfile)(": ListCount[2] = 0x%08X < ListSize[2] = 0x%08X\n", ListCount[2], ListSize[2]);
} while (ListCount[2] < ListSize[2]); } while (ListCount[2] < ListSize[2]);
break; break;
} }
@ -740,7 +740,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[1] = 0x%08lX < ListSize[1] = 0x%08lX\n", ListCount[1], ListSize[1]); TRACE_(dmfile)(": ListCount[1] = 0x%08X < ListSize[1] = 0x%08X\n", ListCount[1], ListSize[1]);
} while (ListCount[1] < ListSize[1]); } while (ListCount[1] < ListSize[1]);
/* SetObject: this will fill descriptor with additional info and add alias in loader's cache */ /* SetObject: this will fill descriptor with additional info and add alias in loader's cache */
IDirectMusicLoader_SetObject (pLoader, &pNewEntry->Desc); IDirectMusicLoader_SetObject (pLoader, &pNewEntry->Desc);
@ -773,7 +773,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[0] = 0x%08lX < ListSize[0] = 0x%08lX\n", ListCount[0], ListSize[0]); TRACE_(dmfile)(": ListCount[0] = 0x%08X < ListSize[0] = 0x%08X\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
break; break;
} }
@ -793,7 +793,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
break; break;
} }
} }
TRACE_(dmfile)(": StreamCount[0] = 0x%08lX < StreamSize[0] = 0x%08lX\n", StreamCount, StreamSize); TRACE_(dmfile)(": StreamCount[0] = 0x%08X < StreamSize[0] = 0x%08X\n", StreamCount, StreamSize);
} while (StreamCount < StreamSize); } while (StreamCount < StreamSize);
break; break;
} }

View File

@ -423,7 +423,7 @@ const char *debugstr_dmreturn (DWORD code) {
} }
/* if we didn't find it, return value */ /* if we didn't find it, return value */
return wine_dbg_sprintf("0x%08lX", code); return wine_dbg_sprintf("0x%08X", code);
} }
@ -485,8 +485,8 @@ const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) {
char buffer[1024] = "", *ptr = &buffer[0]; char buffer[1024] = "", *ptr = &buffer[0];
ptr += sprintf(ptr, "DMUS_OBJECTDESC (%p):", pDesc); ptr += sprintf(ptr, "DMUS_OBJECTDESC (%p):", pDesc);
ptr += sprintf(ptr, "\n - dwSize = 0x%08lX", pDesc->dwSize); ptr += sprintf(ptr, "\n - dwSize = 0x%08X", pDesc->dwSize);
ptr += sprintf(ptr, "\n - dwValidData = 0x%08lX (%s)", pDesc->dwValidData, debugstr_DMUS_OBJ_FLAGS (pDesc->dwValidData)); ptr += sprintf(ptr, "\n - dwValidData = 0x%08X (%s)", pDesc->dwValidData, debugstr_DMUS_OBJ_FLAGS (pDesc->dwValidData));
if (pDesc->dwValidData & DMUS_OBJ_CLASS) ptr += sprintf(ptr, "\n - guidClass = %s", debugstr_dmguid(&pDesc->guidClass)); if (pDesc->dwValidData & DMUS_OBJ_CLASS) ptr += sprintf(ptr, "\n - guidClass = %s", debugstr_dmguid(&pDesc->guidClass));
if (pDesc->dwValidData & DMUS_OBJ_OBJECT) ptr += sprintf(ptr, "\n - guidObject = %s", debugstr_guid(&pDesc->guidObject)); if (pDesc->dwValidData & DMUS_OBJ_OBJECT) ptr += sprintf(ptr, "\n - guidObject = %s", debugstr_guid(&pDesc->guidObject));
if (pDesc->dwValidData & DMUS_OBJ_DATE) ptr += sprintf(ptr, "\n - ftDate = %s", debugstr_filetime (&pDesc->ftDate)); if (pDesc->dwValidData & DMUS_OBJ_DATE) ptr += sprintf(ptr, "\n - ftDate = %s", debugstr_filetime (&pDesc->ftDate));

View File

@ -47,7 +47,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_QueryInterface (
static ULONG WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_AddRef (LPDIRECTMUSICLOADER8 iface) { static ULONG WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_AddRef (LPDIRECTMUSICLOADER8 iface) {
ICOM_THIS_MULTI(IDirectMusicLoaderImpl, LoaderVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderImpl, LoaderVtbl, iface);
TRACE("(%p): AddRef from %ld\n", This, This->dwRef); TRACE("(%p): AddRef from %d\n", This, This->dwRef);
return InterlockedIncrement (&This->dwRef); return InterlockedIncrement (&This->dwRef);
} }
@ -55,7 +55,7 @@ static ULONG WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_Release (LPDIRECTM
ICOM_THIS_MULTI(IDirectMusicLoaderImpl, LoaderVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderImpl, LoaderVtbl, iface);
DWORD dwRef = InterlockedDecrement (&This->dwRef); DWORD dwRef = InterlockedDecrement (&This->dwRef);
TRACE("(%p): ReleaseRef to %ld\n", This, This->dwRef); TRACE("(%p): ReleaseRef to %d\n", This, This->dwRef);
if (dwRef == 0) { if (dwRef == 0) {
DMUSIC_DestroyDirectMusicLoaderImpl (iface); DMUSIC_DestroyDirectMusicLoaderImpl (iface);
HeapFree (GetProcessHeap(), 0, This); HeapFree (GetProcessHeap(), 0, This);
@ -689,7 +689,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_EnumObject (LPDI
struct list *pEntry; struct list *pEntry;
LPWINE_LOADER_ENTRY pObjectEntry; LPWINE_LOADER_ENTRY pObjectEntry;
ICOM_THIS_MULTI(IDirectMusicLoaderImpl, LoaderVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderImpl, LoaderVtbl, iface);
TRACE("(%p, %s, %ld, %p)\n", This, debugstr_dmguid(rguidClass), dwIndex, pDesc); TRACE("(%p, %s, %d, %p)\n", This, debugstr_dmguid(rguidClass), dwIndex, pDesc);
DM_STRUCT_INIT(pDesc); DM_STRUCT_INIT(pDesc);

View File

@ -112,7 +112,7 @@ static HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_QueryInterface (LPSTR
static ULONG WINAPI IDirectMusicLoaderFileStream_IStream_AddRef (LPSTREAM iface) { static ULONG WINAPI IDirectMusicLoaderFileStream_IStream_AddRef (LPSTREAM iface) {
ICOM_THIS_MULTI(IDirectMusicLoaderFileStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderFileStream, StreamVtbl, iface);
TRACE("(%p): AddRef from %ld\n", This, This->dwRef); TRACE("(%p): AddRef from %d\n", This, This->dwRef);
return InterlockedIncrement (&This->dwRef); return InterlockedIncrement (&This->dwRef);
} }
@ -120,7 +120,7 @@ static ULONG WINAPI IDirectMusicLoaderFileStream_IStream_Release (LPSTREAM iface
ICOM_THIS_MULTI(IDirectMusicLoaderFileStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderFileStream, StreamVtbl, iface);
DWORD dwRef = InterlockedDecrement (&This->dwRef); DWORD dwRef = InterlockedDecrement (&This->dwRef);
TRACE("(%p): ReleaseRef to %ld\n", This, dwRef); TRACE("(%p): ReleaseRef to %d\n", This, dwRef);
if (dwRef == 0) { if (dwRef == 0) {
if (This->hFile) if (This->hFile)
IDirectMusicLoaderFileStream_Detach (iface); IDirectMusicLoaderFileStream_Detach (iface);
@ -134,12 +134,12 @@ static HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_Read (LPSTREAM iface,
ICOM_THIS_MULTI(IDirectMusicLoaderFileStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderFileStream, StreamVtbl, iface);
ULONG cbRead; ULONG cbRead;
TRACE_(dmfileraw)("(%p, %p, 0x%08lX, %p)\n", This, pv, cb, pcbRead); TRACE_(dmfileraw)("(%p, %p, 0x%08X, %p)\n", This, pv, cb, pcbRead);
if (This->hFile == INVALID_HANDLE_VALUE) return E_FAIL; if (This->hFile == INVALID_HANDLE_VALUE) return E_FAIL;
if (pcbRead == NULL) pcbRead = &cbRead; if (pcbRead == NULL) pcbRead = &cbRead;
if (!ReadFile (This->hFile, pv, cb, pcbRead, NULL) || *pcbRead != cb) return E_FAIL; if (!ReadFile (This->hFile, pv, cb, pcbRead, NULL) || *pcbRead != cb) return E_FAIL;
TRACE_(dmfileraw)(": data (size = 0x%08lX): '%s'\n", *pcbRead, debugstr_an(pv, *pcbRead)); TRACE_(dmfileraw)(": data (size = 0x%08X): '%s'\n", *pcbRead, debugstr_an(pv, *pcbRead));
return S_OK; return S_OK;
} }
@ -196,12 +196,12 @@ static HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_Write (LPSTREAM iface
ICOM_THIS_MULTI(IDirectMusicLoaderFileStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderFileStream, StreamVtbl, iface);
ULONG cbWrite; ULONG cbWrite;
TRACE_(dmfileraw)("(%p, %p, 0x%08lX, %p)\n", This, pv, cb, pcbWritten); TRACE_(dmfileraw)("(%p, %p, 0x%08X, %p)\n", This, pv, cb, pcbWritten);
if (This->hFile == INVALID_HANDLE_VALUE) return E_FAIL; if (This->hFile == INVALID_HANDLE_VALUE) return E_FAIL;
if (pcbWritten == NULL) pcbWritten = &cbWrite; if (pcbWritten == NULL) pcbWritten = &cbWrite;
if (!WriteFile (This->hFile, pv, cb, pcbWritten, NULL) || *pcbWritten != cb) return E_FAIL; if (!WriteFile (This->hFile, pv, cb, pcbWritten, NULL) || *pcbWritten != cb) return E_FAIL;
TRACE_(dmfileraw)(": data (size = 0x%08lX): '%s'\n", *pcbWritten, debugstr_an(pv, *pcbWritten)); TRACE_(dmfileraw)(": data (size = 0x%08X): '%s'\n", *pcbWritten, debugstr_an(pv, *pcbWritten));
return S_OK; return S_OK;
} }
@ -359,7 +359,7 @@ static HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_QueryInterface (L
static ULONG WINAPI IDirectMusicLoaderResourceStream_IStream_AddRef (LPSTREAM iface) { static ULONG WINAPI IDirectMusicLoaderResourceStream_IStream_AddRef (LPSTREAM iface) {
ICOM_THIS_MULTI(IDirectMusicLoaderResourceStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderResourceStream, StreamVtbl, iface);
TRACE("(%p): AddRef from %ld\n", This, This->dwRef); TRACE("(%p): AddRef from %d\n", This, This->dwRef);
return InterlockedIncrement (&This->dwRef); return InterlockedIncrement (&This->dwRef);
} }
@ -367,7 +367,7 @@ static ULONG WINAPI IDirectMusicLoaderResourceStream_IStream_Release (LPSTREAM i
ICOM_THIS_MULTI(IDirectMusicLoaderResourceStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderResourceStream, StreamVtbl, iface);
DWORD dwRef = InterlockedDecrement (&This->dwRef); DWORD dwRef = InterlockedDecrement (&This->dwRef);
TRACE("(%p): ReleaseRef to %ld\n", This, dwRef); TRACE("(%p): ReleaseRef to %d\n", This, dwRef);
if (dwRef == 0) { if (dwRef == 0) {
IDirectMusicLoaderResourceStream_Detach (iface); IDirectMusicLoaderResourceStream_Detach (iface);
HeapFree (GetProcessHeap(), 0, This); HeapFree (GetProcessHeap(), 0, This);
@ -380,7 +380,7 @@ static HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_Read (LPSTREAM if
LPBYTE pByte; LPBYTE pByte;
ICOM_THIS_MULTI(IDirectMusicLoaderResourceStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderResourceStream, StreamVtbl, iface);
TRACE_(dmfileraw)("(%p, %p, 0x%08lX, %p)\n", This, pv, cb, pcbRead); TRACE_(dmfileraw)("(%p, %p, 0x%08X, %p)\n", This, pv, cb, pcbRead);
if ((This->llPos + cb) > This->llMemLength) { if ((This->llPos + cb) > This->llMemLength) {
WARN_(dmfileraw)(": requested size out of range\n"); WARN_(dmfileraw)(": requested size out of range\n");
return E_FAIL; return E_FAIL;
@ -392,7 +392,7 @@ static HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_Read (LPSTREAM if
/* FIXME: error checking would be nice */ /* FIXME: error checking would be nice */
if (pcbRead) *pcbRead = cb; if (pcbRead) *pcbRead = cb;
TRACE_(dmfileraw)(": data (size = 0x%08lX): '%s'\n", cb, debugstr_an(pv, cb)); TRACE_(dmfileraw)(": data (size = 0x%08X): '%s'\n", cb, debugstr_an(pv, cb));
return S_OK; return S_OK;
} }
@ -618,7 +618,7 @@ static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_QueryInterface (LP
static ULONG WINAPI IDirectMusicLoaderGenericStream_IStream_AddRef (LPSTREAM iface) { static ULONG WINAPI IDirectMusicLoaderGenericStream_IStream_AddRef (LPSTREAM iface) {
ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface);
TRACE("(%p): AddRef from %ld\n", This, This->dwRef); TRACE("(%p): AddRef from %d\n", This, This->dwRef);
return InterlockedIncrement (&This->dwRef); return InterlockedIncrement (&This->dwRef);
} }
@ -626,7 +626,7 @@ static ULONG WINAPI IDirectMusicLoaderGenericStream_IStream_Release (LPSTREAM if
ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface);
DWORD dwRef = InterlockedDecrement (&This->dwRef); DWORD dwRef = InterlockedDecrement (&This->dwRef);
TRACE("(%p): ReleaseRef to %ld\n", This, dwRef); TRACE("(%p): ReleaseRef to %d\n", This, dwRef);
if (dwRef == 0) { if (dwRef == 0) {
IDirectMusicLoaderGenericStream_Detach (iface); IDirectMusicLoaderGenericStream_Detach (iface);
HeapFree (GetProcessHeap(), 0, This); HeapFree (GetProcessHeap(), 0, This);
@ -638,7 +638,7 @@ static ULONG WINAPI IDirectMusicLoaderGenericStream_IStream_Release (LPSTREAM if
static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Read (LPSTREAM iface, void* pv, ULONG cb, ULONG* pcbRead) { static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Read (LPSTREAM iface, void* pv, ULONG cb, ULONG* pcbRead) {
ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface);
TRACE_(dmfileraw)("(%p, %p, 0x%08lX, %p): redirecting to low-level stream\n", This, pv, cb, pcbRead); TRACE_(dmfileraw)("(%p, %p, 0x%08X, %p): redirecting to low-level stream\n", This, pv, cb, pcbRead);
if (!This->pStream) if (!This->pStream)
return E_FAIL; return E_FAIL;
@ -676,7 +676,7 @@ static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Clone (LPSTREAM if
static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Write (LPSTREAM iface, const void* pv, ULONG cb, ULONG* pcbWritten) { static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Write (LPSTREAM iface, const void* pv, ULONG cb, ULONG* pcbWritten) {
ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface);
TRACE_(dmfileraw)("(%p, %p, 0x%08lX, %p): redirecting to low-level stream\n", This, pv, cb, pcbWritten); TRACE_(dmfileraw)("(%p, %p, 0x%08X, %p): redirecting to low-level stream\n", This, pv, cb, pcbWritten);
if (!This->pStream) if (!This->pStream)
return E_FAIL; return E_FAIL;
@ -703,7 +703,7 @@ static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_CopyTo (LPSTREAM i
static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Commit (LPSTREAM iface, DWORD grfCommitFlags) { static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Commit (LPSTREAM iface, DWORD grfCommitFlags) {
ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface);
TRACE("(%p, 0x%08lX): redirecting to low-level stream\n", This, grfCommitFlags); TRACE("(%p, 0x%08X): redirecting to low-level stream\n", This, grfCommitFlags);
if (!This->pStream) if (!This->pStream)
return E_FAIL; return E_FAIL;
@ -721,7 +721,7 @@ static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Revert (LPSTREAM i
static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_LockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) { static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_LockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) {
ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface);
TRACE("(%p, 0x%08llX, 0x%08llX, 0x%08lX): redirecting to low-level stream\n", This, libOffset.QuadPart, cb.QuadPart, dwLockType); TRACE("(%p, 0x%08llX, 0x%08llX, 0x%08X): redirecting to low-level stream\n", This, libOffset.QuadPart, cb.QuadPart, dwLockType);
if (!This->pStream) if (!This->pStream)
return E_FAIL; return E_FAIL;
@ -730,7 +730,7 @@ static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_LockRegion (LPSTRE
static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_UnlockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) { static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_UnlockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) {
ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface);
TRACE("(%p, 0x%08llX, 0x%08llX, 0x%08lX): redirecting to low-level stream\n", This, libOffset.QuadPart, cb.QuadPart, dwLockType); TRACE("(%p, 0x%08llX, 0x%08llX, 0x%08X): redirecting to low-level stream\n", This, libOffset.QuadPart, cb.QuadPart, dwLockType);
if (!This->pStream) if (!This->pStream)
return E_FAIL; return E_FAIL;
@ -739,7 +739,7 @@ static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_UnlockRegion (LPST
static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Stat (LPSTREAM iface, STATSTG* pstatstg, DWORD grfStatFlag) { static HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Stat (LPSTREAM iface, STATSTG* pstatstg, DWORD grfStatFlag) {
ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface); ICOM_THIS_MULTI(IDirectMusicLoaderGenericStream, StreamVtbl, iface);
TRACE("(%p, %p, 0x%08lX): redirecting to low-level stream\n", This, pstatstg, grfStatFlag); TRACE("(%p, %p, 0x%08X): redirecting to low-level stream\n", This, pstatstg, grfStatFlag);
if (!This->pStream) if (!This->pStream)
return E_FAIL; return E_FAIL;