Michael Stefaniuc : dsound: Avoid casts from COM object to interface.

Alexandre Julliard julliard at winehq.org
Fri Dec 9 13:37:34 CST 2016


Module: wine
Branch: master
Commit: 48b32c78d29950443ee6f279f49b099a3960b979
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=48b32c78d29950443ee6f279f49b099a3960b979

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Fri Dec  9 16:10:05 2016 +0100

dsound: Avoid casts from COM object to interface.

Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dsound/dsound.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 43b252d..e8c10a7 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -452,8 +452,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
 
         if (device->primary) {
             WARN("Primary Buffer already created\n");
-            IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER8)(device->primary));
-            *ppdsb = (LPDIRECTSOUNDBUFFER)(device->primary);
+            IDirectSoundBuffer8_AddRef(&device->primary->IDirectSoundBuffer8_iface);
+            *ppdsb = (IDirectSoundBuffer *)&device->primary->IDirectSoundBuffer8_iface;
         } else {
             hres = primarybuffer_create(device, &device->primary, dsbd);
             if (device->primary) {




More information about the wine-cvs mailing list