ReactOS  0.4.14-dev-552-g2fad488
download.c File Reference
#include "dmusic_private.h"
Include dependency graph for download.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (dmusic)
 
static IDirectMusicDownloadImplimpl_from_IDirectMusicDownload (IDirectMusicDownload *iface)
 
static HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (IDirectMusicDownload *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI IDirectMusicDownloadImpl_AddRef (IDirectMusicDownload *iface)
 
static ULONG WINAPI IDirectMusicDownloadImpl_Release (IDirectMusicDownload *iface)
 
static HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer (IDirectMusicDownload *iface, void **buffer, DWORD *size)
 
HRESULT DMUSIC_CreateDirectMusicDownloadImpl (const GUID *guid, void **ret_iface, IUnknown *unk_outer)
 

Variables

static const IDirectMusicDownloadVtbl DirectMusicDownload_Vtbl
 

Function Documentation

◆ DMUSIC_CreateDirectMusicDownloadImpl()

HRESULT DMUSIC_CreateDirectMusicDownloadImpl ( const GUID guid,
void **  ret_iface,
IUnknown unk_outer 
)

Definition at line 89 of file download.c.

90 {
91  IDirectMusicDownloadImpl *download;
92 
93  download = HeapAlloc(GetProcessHeap(), 0, sizeof(*download));
94  if (!download)
95  {
96  *ret_iface = NULL;
97  return E_OUTOFMEMORY;
98  }
99 
101  download->ref = 1;
102  *ret_iface = download;
103 
105  return S_OK;
106 }
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
static void DMUSIC_LockModule(void)
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IDirectMusicDownloadVtbl DirectMusicDownload_Vtbl
Definition: download.c:81
#define S_OK
Definition: intsafe.h:59
IDirectMusicDownload IDirectMusicDownload_iface

◆ IDirectMusicDownloadImpl_AddRef()

static ULONG WINAPI IDirectMusicDownloadImpl_AddRef ( IDirectMusicDownload *  iface)
static

Definition at line 48 of file download.c.

49 {
52 
53  TRACE("(%p)->(): new ref = %u\n", iface, ref);
54 
55  return ref;
56 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static IDirectMusicDownloadImpl * impl_from_IDirectMusicDownload(IDirectMusicDownload *iface)
Definition: download.c:25
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ IDirectMusicDownloadImpl_GetBuffer()

static HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer ( IDirectMusicDownload *  iface,
void **  buffer,
DWORD size 
)
static

Definition at line 74 of file download.c.

75 {
76  FIXME("(%p, %p, %p): stub\n", iface, buffer, size);
77 
78  return S_OK;
79 }
GLuint buffer
Definition: glext.h:5915
#define FIXME(fmt,...)
Definition: debug.h:110
GLsizeiptr size
Definition: glext.h:5919
#define S_OK
Definition: intsafe.h:59

◆ IDirectMusicDownloadImpl_QueryInterface()

static HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface ( IDirectMusicDownload *  iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 31 of file download.c.

32 {
33  TRACE("(%p, %s, %p)\n", iface, debugstr_dmguid(riid), ret_iface);
34 
35  if (IsEqualIID(riid, &IID_IUnknown) ||
36  IsEqualIID(riid, &IID_IDirectMusicDownload))
37  {
39  *ret_iface = iface;
40  return S_OK;
41  }
42 
43  *ret_iface = NULL;
44  WARN("(%p, %s, %p): not found\n", iface, debugstr_dmguid(riid), ret_iface);
45  return E_NOINTERFACE;
46 }
#define E_NOINTERFACE
Definition: winerror.h:2364
const char * debugstr_dmguid(const GUID *id)
Definition: dmusic_main.c:237
#define IDirectMusicDownload_AddRef(p)
Definition: dmusicc.h:602
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IDirectMusicDownloadImpl_Release()

static ULONG WINAPI IDirectMusicDownloadImpl_Release ( IDirectMusicDownload *  iface)
static

Definition at line 58 of file download.c.

59 {
62 
63  TRACE("(%p)->(): new ref = %u\n", iface, ref);
64 
65  if (!ref) {
68  }
69 
70  return ref;
71 }
Definition: send.c:47
static void DMUSIC_UnlockModule(void)
GLenum GLint ref
Definition: glext.h:6028
static IDirectMusicDownloadImpl * impl_from_IDirectMusicDownload(IDirectMusicDownload *iface)
Definition: download.c:25
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ impl_from_IDirectMusicDownload()

static IDirectMusicDownloadImpl* impl_from_IDirectMusicDownload ( IDirectMusicDownload *  iface)
inlinestatic

Definition at line 25 of file download.c.

26 {
27  return CONTAINING_RECORD(iface, IDirectMusicDownloadImpl, IDirectMusicDownload_iface);
28 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IDirectMusicDownloadImpl_AddRef(), and IDirectMusicDownloadImpl_Release().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( dmusic  )

Variable Documentation

◆ DirectMusicDownload_Vtbl

const IDirectMusicDownloadVtbl DirectMusicDownload_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface(IDirectMusicDownload *iface, REFIID riid, void **ret_iface)
Definition: download.c:31
static ULONG WINAPI IDirectMusicDownloadImpl_AddRef(IDirectMusicDownload *iface)
Definition: download.c:48
static ULONG WINAPI IDirectMusicDownloadImpl_Release(IDirectMusicDownload *iface)
Definition: download.c:58
static HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer(IDirectMusicDownload *iface, void **buffer, DWORD *size)
Definition: download.c:74

Definition at line 81 of file download.c.

Referenced by DMUSIC_CreateDirectMusicDownloadImpl().