2 * Unit tests for dmband functions
4 * Copyright (C) 2012 Christian Costa
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #include "wine/test.h"
32 DEFINE_GUID(IID_IDirectMusicBandTrackPrivate
, 0x53466056, 0x6dc4, 0x11d1, 0xbf, 0x7b, 0x00, 0xc0, 0x4f, 0xbf, 0x8f, 0xef);
34 static void test_dmband(void)
36 IDirectMusicBand
*band
;
37 IUnknown
*unknown
= NULL
;
38 IDirectMusicTrack
*track
= NULL
;
39 IPersistStream
*stream
= NULL
;
40 IPersistStream
*private = NULL
;
43 hr
= CoCreateInstance(&CLSID_DirectMusicBand
, NULL
, CLSCTX_INPROC_SERVER
, &IID_IDirectMusicBand
, (LPVOID
*)&band
);
46 skip("Cannot create DirectMusicBand object (%x)\n", hr
);
50 hr
= CoCreateInstance(&CLSID_DirectMusicBandTrack
, NULL
, CLSCTX_INPROC_SERVER
, &IID_IUnknown
, (LPVOID
*)&unknown
);
51 ok(hr
== S_OK
, "CoCreateInstance returned: %x\n", hr
);
52 hr
= IUnknown_QueryInterface(unknown
, &IID_IDirectMusicTrack
, (LPVOID
*)&track
);
53 ok(hr
== S_OK
, "QueryInterface returned: %x\n", hr
);
54 todo_wine
ok((LPVOID
)track
== (LPVOID
)unknown
, "Interface are not the same %p != %p\n", stream
, private);
55 hr
= IUnknown_QueryInterface(unknown
, &IID_IPersistStream
, (LPVOID
*)&stream
);
56 ok(hr
== S_OK
, "QueryInterface returned: %x\n", hr
);
57 /* Query private interface */
58 hr
= IUnknown_QueryInterface(unknown
, &IID_IDirectMusicBandTrackPrivate
, (LPVOID
*)&private);
59 todo_wine
ok(hr
== S_OK
, "QueryInterface returned: %x\n", hr
);
61 trace("Interfaces: unknown = %p, track = %p, stream = %p, private = %p\n", unknown
, track
, stream
, private);
64 IPersistStream_Release(private);
66 IPersistStream_Release(stream
);
68 IDirectMusicTrack_Release(track
);
70 IUnknown_Release(unknown
);
71 IDirectMusicBand_Release(band
);
76 CoInitializeEx(NULL
, COINIT_MULTITHREADED
);