3 * Copyright 1998 Marcus Meissner
4 * Copyright 1998 Rob Riggs
5 * Copyright 2000-2002 TransGaming Technologies, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include <mmdeviceapi.h>
31 #include <devpropdef.h>
33 #include "dsound_private.h"
36 DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName
, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 14);
38 static WCHAR
*strdupW(const WCHAR
*str
)
41 int l
= lstrlenW(str
);
42 if(l
< 0) return NULL
;
44 ret
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, (l
+1)*sizeof(WCHAR
));
47 memcpy(ret
, str
, l
*sizeof(WCHAR
));
52 typedef struct IKsPrivatePropertySetImpl
54 IKsPropertySet IKsPropertySet_iface
;
56 } IKsPrivatePropertySetImpl
;
58 static IKsPrivatePropertySetImpl
*impl_from_IKsPropertySet(IKsPropertySet
*iface
)
60 return CONTAINING_RECORD(iface
, IKsPrivatePropertySetImpl
, IKsPropertySet_iface
);
63 /*******************************************************************************
64 * IKsPrivatePropertySet
67 /* IUnknown methods */
68 static HRESULT WINAPI
IKsPrivatePropertySetImpl_QueryInterface(
69 IKsPropertySet
*iface
, REFIID riid
, void **ppobj
)
71 IKsPrivatePropertySetImpl
*This
= impl_from_IKsPropertySet(iface
);
72 TRACE("(%p,%s,%p)\n",This
,debugstr_guid(riid
),ppobj
);
74 if (IsEqualIID(riid
, &IID_IUnknown
) ||
75 IsEqualIID(riid
, &IID_IKsPropertySet
)) {
77 IKsPropertySet_AddRef(iface
);
84 static ULONG WINAPI
IKsPrivatePropertySetImpl_AddRef(LPKSPROPERTYSET iface
)
86 IKsPrivatePropertySetImpl
*This
= impl_from_IKsPropertySet(iface
);
87 ULONG ref
= InterlockedIncrement(&(This
->ref
));
88 TRACE("(%p) ref was %ld\n", This
, ref
- 1);
92 static ULONG WINAPI
IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface
)
94 IKsPrivatePropertySetImpl
*This
= impl_from_IKsPropertySet(iface
);
95 ULONG ref
= InterlockedDecrement(&(This
->ref
));
96 TRACE("(%p) ref was %ld\n", This
, ref
+ 1);
100 HeapFree(GetProcessHeap(), 0, This
);
101 TRACE("(%p) released\n", This
);
107 const WCHAR
*tgt_name
;
111 static BOOL CALLBACK
search_callback(GUID
*guid
, const WCHAR
*desc
,
112 const WCHAR
*module
, void *user
)
114 struct search_data
*search
= user
;
117 if(!lstrcmpW(desc
, search
->tgt_name
)){
118 *search
->found_guid
= *guid
;
125 static HRESULT
DSPROPERTY_WaveDeviceMappingW(
131 PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA ppd
= pPropData
;
132 struct search_data search
;
134 TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
135 pPropData
,cbPropData
,pcbReturned
);
139 WARN("invalid parameter: pPropData\n");
140 return DSERR_INVALIDPARAM
;
143 search
.tgt_name
= ppd
->DeviceName
;
144 search
.found_guid
= &ppd
->DeviceId
;
146 if (ppd
->DataFlow
== DIRECTSOUNDDEVICE_DATAFLOW_RENDER
)
147 hr
= enumerate_mmdevices(eRender
, search_callback
, &search
);
148 else if (ppd
->DataFlow
== DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE
)
149 hr
= enumerate_mmdevices(eCapture
, search_callback
, &search
);
151 return DSERR_INVALIDPARAM
;
154 /* device was not found */
155 return DSERR_INVALIDPARAM
;
158 *pcbReturned
= cbPropData
;
163 static HRESULT
DSPROPERTY_WaveDeviceMappingA(
168 DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA
*ppd
= pPropData
;
169 DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA data
;
173 TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
174 pPropData
,cbPropData
,pcbReturned
);
176 if (!ppd
|| !ppd
->DeviceName
) {
177 WARN("invalid parameter: ppd=%p\n", ppd
);
178 return DSERR_INVALIDPARAM
;
181 data
.DataFlow
= ppd
->DataFlow
;
182 len
= MultiByteToWideChar(CP_ACP
, 0, ppd
->DeviceName
, -1, NULL
, 0);
183 data
.DeviceName
= HeapAlloc(GetProcessHeap(), 0, len
* sizeof(WCHAR
));
184 if (!data
.DeviceName
)
185 return E_OUTOFMEMORY
;
186 MultiByteToWideChar(CP_ACP
, 0, ppd
->DeviceName
, -1, data
.DeviceName
, len
);
188 hr
= DSPROPERTY_WaveDeviceMappingW(&data
, cbPropData
, pcbReturned
);
189 HeapFree(GetProcessHeap(), 0, data
.DeviceName
);
190 ppd
->DeviceId
= data
.DeviceId
;
193 *pcbReturned
= cbPropData
;
198 static HRESULT
DSPROPERTY_DescriptionW(
203 PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA ppd
= pPropData
;
210 TRACE("pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
211 pPropData
,cbPropData
,pcbReturned
);
213 TRACE("DeviceId=%s\n",debugstr_guid(&ppd
->DeviceId
));
214 if ( IsEqualGUID( &ppd
->DeviceId
, &GUID_NULL
) ) {
215 /* default device of type specified by ppd->DataFlow */
216 if (ppd
->DataFlow
== DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE
) {
217 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
218 ppd
->DeviceId
= DSDEVID_DefaultCapture
;
219 } else if (ppd
->DataFlow
== DIRECTSOUNDDEVICE_DATAFLOW_RENDER
) {
220 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
221 ppd
->DeviceId
= DSDEVID_DefaultPlayback
;
223 WARN("DataFlow=Unknown(%d)\n", ppd
->DataFlow
);
224 return E_PROP_ID_UNSUPPORTED
;
228 GetDeviceID(&ppd
->DeviceId
, &dev_guid
);
230 hr
= get_mmdevice(eRender
, &dev_guid
, &mmdevice
);
232 hr
= get_mmdevice(eCapture
, &dev_guid
, &mmdevice
);
237 hr
= IMMDevice_OpenPropertyStore(mmdevice
, STGM_READ
, &ps
);
240 IMMDevice_Release(mmdevice
);
241 WARN("OpenPropertyStore failed: %08lx\n", hr
);
245 hr
= IPropertyStore_GetValue(ps
, (const PROPERTYKEY
*)&DEVPKEY_Device_FriendlyName
, &pv
);
248 IPropertyStore_Release(ps
);
249 IMMDevice_Release(mmdevice
);
250 WARN("GetValue(FriendlyName) failed: %08lx\n", hr
);
254 ppd
->Description
= strdupW(pv
.pwszVal
);
255 ppd
->Module
= strdupW(wine_vxd_drv
);
256 ppd
->Interface
= strdupW(L
"Interface");
257 ppd
->Type
= DIRECTSOUNDDEVICE_TYPE_VXD
;
259 PropVariantClear(&pv
);
260 IPropertyStore_Release(ps
);
261 IMMDevice_Release(mmdevice
);
265 *pcbReturned
= sizeof(*ppd
);
266 TRACE("*pcbReturned=%ld\n", *pcbReturned
);
273 BOOL CALLBACK
enum_callback(GUID
*guid
, const WCHAR
*desc
, const WCHAR
*module
,
276 PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA ppd
= user
;
277 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data
;
281 TRACE("%s %ls %ls %p\n", debugstr_guid(guid
), desc
, module
, user
);
286 data
.DeviceId
= *guid
;
288 len
= lstrlenW(module
) + 1;
289 data
.Module
= HeapAlloc(GetProcessHeap(), 0, len
* sizeof(WCHAR
));
290 memcpy(data
.Module
, module
, len
* sizeof(WCHAR
));
292 len
= lstrlenW(desc
) + 1;
293 data
.Description
= HeapAlloc(GetProcessHeap(), 0, len
* sizeof(WCHAR
));
294 memcpy(data
.Description
, desc
, len
* sizeof(WCHAR
));
296 data
.Interface
= L
"Interface";
298 ret
= ppd
->Callback(&data
, ppd
->Context
);
300 HeapFree(GetProcessHeap(), 0, data
.Module
);
301 HeapFree(GetProcessHeap(), 0, data
.Description
);
306 static HRESULT
DSPROPERTY_EnumerateW(
311 PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA ppd
= pPropData
;
314 TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
315 pPropData
,cbPropData
,pcbReturned
);
320 if (!ppd
|| !ppd
->Callback
)
322 WARN("Invalid ppd %p\n", ppd
);
323 return E_PROP_ID_UNSUPPORTED
;
326 hr
= enumerate_mmdevices(eRender
, enum_callback
, ppd
);
328 hr
= enumerate_mmdevices(eCapture
, enum_callback
, ppd
);
330 return SUCCEEDED(hr
) ? DS_OK
: hr
;
333 static BOOL
DSPROPERTY_descWtoA(const DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
*dataW
,
334 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA
*dataA
)
336 static char Interface
[] = "Interface";
337 DWORD modlen
, desclen
;
339 modlen
= WideCharToMultiByte(CP_ACP
, 0, dataW
->Module
, -1, NULL
, 0, NULL
, NULL
);
340 desclen
= WideCharToMultiByte(CP_ACP
, 0, dataW
->Description
, -1, NULL
, 0, NULL
, NULL
);
341 dataA
->Type
= dataW
->Type
;
342 dataA
->DataFlow
= dataW
->DataFlow
;
343 dataA
->DeviceId
= dataW
->DeviceId
;
344 dataA
->WaveDeviceId
= dataW
->WaveDeviceId
;
345 dataA
->Interface
= Interface
;
346 dataA
->Module
= HeapAlloc(GetProcessHeap(), 0, modlen
);
347 dataA
->Description
= HeapAlloc(GetProcessHeap(), 0, desclen
);
348 if (!dataA
->Module
|| !dataA
->Description
)
350 HeapFree(GetProcessHeap(), 0, dataA
->Module
);
351 HeapFree(GetProcessHeap(), 0, dataA
->Description
);
352 dataA
->Module
= dataA
->Description
= NULL
;
356 WideCharToMultiByte(CP_ACP
, 0, dataW
->Module
, -1, dataA
->Module
, modlen
, NULL
, NULL
);
357 WideCharToMultiByte(CP_ACP
, 0, dataW
->Description
, -1, dataA
->Description
, desclen
, NULL
, NULL
);
361 static void DSPROPERTY_descWto1(const DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
*dataW
,
362 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA
*data1
)
364 data1
->DeviceId
= dataW
->DeviceId
;
365 lstrcpynW(data1
->ModuleW
, dataW
->Module
, sizeof(data1
->ModuleW
)/sizeof(*data1
->ModuleW
));
366 lstrcpynW(data1
->DescriptionW
, dataW
->Description
, sizeof(data1
->DescriptionW
)/sizeof(*data1
->DescriptionW
));
367 WideCharToMultiByte(CP_ACP
, 0, data1
->DescriptionW
, -1, data1
->DescriptionA
, sizeof(data1
->DescriptionA
)-1, NULL
, NULL
);
368 WideCharToMultiByte(CP_ACP
, 0, data1
->ModuleW
, -1, data1
->ModuleA
, sizeof(data1
->ModuleA
)-1, NULL
, NULL
);
369 data1
->DescriptionA
[sizeof(data1
->DescriptionA
)-1] = 0;
370 data1
->ModuleA
[sizeof(data1
->ModuleA
)-1] = 0;
371 data1
->Type
= dataW
->Type
;
372 data1
->DataFlow
= dataW
->DataFlow
;
373 data1
->WaveDeviceId
= data1
->Devnode
= dataW
->WaveDeviceId
;
376 static BOOL CALLBACK
DSPROPERTY_enumWtoA(DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
*descW
, void *data
)
378 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA descA
;
379 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA
*ppd
= data
;
382 ret
= DSPROPERTY_descWtoA(descW
, &descA
);
385 ret
= ppd
->Callback(&descA
, ppd
->Context
);
386 HeapFree(GetProcessHeap(), 0, descA
.Module
);
387 HeapFree(GetProcessHeap(), 0, descA
.Description
);
391 static HRESULT
DSPROPERTY_EnumerateA(
396 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA
*ppd
= pPropData
;
397 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA data
;
399 if (!ppd
|| !ppd
->Callback
)
401 WARN("Invalid ppd %p\n", ppd
);
402 return E_PROP_ID_UNSUPPORTED
;
405 data
.Callback
= DSPROPERTY_enumWtoA
;
408 return DSPROPERTY_EnumerateW(&data
, cbPropData
, pcbReturned
);
411 static BOOL CALLBACK
DSPROPERTY_enumWto1(DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
*descW
, void *data
)
413 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA desc1
;
414 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA
*ppd
= data
;
417 DSPROPERTY_descWto1(descW
, &desc1
);
418 ret
= ppd
->Callback(&desc1
, ppd
->Context
);
422 static HRESULT
DSPROPERTY_Enumerate1(
427 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA
*ppd
= pPropData
;
428 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA data
;
430 if (!ppd
|| !ppd
->Callback
)
432 WARN("Invalid ppd %p\n", ppd
);
433 return E_PROP_ID_UNSUPPORTED
;
436 data
.Callback
= DSPROPERTY_enumWto1
;
439 return DSPROPERTY_EnumerateW(&data
, cbPropData
, pcbReturned
);
442 static HRESULT
DSPROPERTY_DescriptionA(
447 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data
;
448 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA
*ppd
= pPropData
;
451 if(cbPropData
< sizeof(DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA
))
454 *pcbReturned
= sizeof(*ppd
);
458 data
.DeviceId
= ppd
->DeviceId
;
459 data
.DataFlow
= ppd
->DataFlow
;
460 hr
= DSPROPERTY_DescriptionW(&data
, sizeof(data
), NULL
);
463 if (!DSPROPERTY_descWtoA(&data
, ppd
))
465 HeapFree(GetProcessHeap(), 0, data
.Description
);
466 HeapFree(GetProcessHeap(), 0, data
.Module
);
467 HeapFree(GetProcessHeap(), 0, data
.Interface
);
471 static HRESULT
DSPROPERTY_Description1(
476 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data
;
477 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA
*ppd
= pPropData
;
480 if(cbPropData
< sizeof(DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA
))
483 *pcbReturned
= sizeof(*ppd
);
487 data
.DeviceId
= ppd
->DeviceId
;
488 data
.DataFlow
= ppd
->DataFlow
;
489 hr
= DSPROPERTY_DescriptionW(&data
, sizeof(data
), NULL
);
492 DSPROPERTY_descWto1(&data
, ppd
);
493 HeapFree(GetProcessHeap(), 0, data
.Description
);
494 HeapFree(GetProcessHeap(), 0, data
.Module
);
495 HeapFree(GetProcessHeap(), 0, data
.Interface
);
499 static HRESULT WINAPI
IKsPrivatePropertySetImpl_Get(
500 LPKSPROPERTYSET iface
,
503 LPVOID pInstanceData
,
504 ULONG cbInstanceData
,
509 IKsPrivatePropertySetImpl
*This
= impl_from_IKsPropertySet(iface
);
510 TRACE("(iface=%p,guidPropSet=%s,dwPropID=%ld,pInstanceData=%p,cbInstanceData=%ld,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
511 This
,debugstr_guid(guidPropSet
),dwPropID
,pInstanceData
,cbInstanceData
,pPropData
,cbPropData
,pcbReturned
);
513 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice
, guidPropSet
) ) {
515 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A
:
516 return DSPROPERTY_WaveDeviceMappingA(pPropData
,cbPropData
,pcbReturned
);
517 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1
:
518 return DSPROPERTY_Description1(pPropData
,cbPropData
,pcbReturned
);
519 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1
:
520 return DSPROPERTY_Enumerate1(pPropData
,cbPropData
,pcbReturned
);
521 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W
:
522 return DSPROPERTY_WaveDeviceMappingW(pPropData
,cbPropData
,pcbReturned
);
523 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A
:
524 return DSPROPERTY_DescriptionA(pPropData
,cbPropData
,pcbReturned
);
525 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W
:
526 return DSPROPERTY_DescriptionW(pPropData
,cbPropData
,pcbReturned
);
527 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A
:
528 return DSPROPERTY_EnumerateA(pPropData
,cbPropData
,pcbReturned
);
529 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W
:
530 return DSPROPERTY_EnumerateW(pPropData
,cbPropData
,pcbReturned
);
532 FIXME("unsupported ID: %ld\n",dwPropID
);
536 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet
));
541 FIXME("*pcbReturned=%ld\n", *pcbReturned
);
544 return E_PROP_ID_UNSUPPORTED
;
547 static HRESULT WINAPI
IKsPrivatePropertySetImpl_Set(
548 LPKSPROPERTYSET iface
,
551 LPVOID pInstanceData
,
552 ULONG cbInstanceData
,
556 IKsPrivatePropertySetImpl
*This
= impl_from_IKsPropertySet(iface
);
558 FIXME("(%p,%s,%ld,%p,%ld,%p,%ld), stub!\n",This
,debugstr_guid(guidPropSet
),dwPropID
,pInstanceData
,cbInstanceData
,pPropData
,cbPropData
);
559 return E_PROP_ID_UNSUPPORTED
;
562 static HRESULT WINAPI
IKsPrivatePropertySetImpl_QuerySupport(
563 LPKSPROPERTYSET iface
,
566 PULONG pTypeSupport
)
568 IKsPrivatePropertySetImpl
*This
= impl_from_IKsPropertySet(iface
);
569 TRACE("(%p,%s,%ld,%p)\n",This
,debugstr_guid(guidPropSet
),dwPropID
,pTypeSupport
);
571 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice
, guidPropSet
) ) {
573 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A
:
574 *pTypeSupport
= KSPROPERTY_SUPPORT_GET
;
576 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1
:
577 *pTypeSupport
= KSPROPERTY_SUPPORT_GET
;
579 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1
:
580 *pTypeSupport
= KSPROPERTY_SUPPORT_GET
;
582 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W
:
583 *pTypeSupport
= KSPROPERTY_SUPPORT_GET
;
585 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A
:
586 *pTypeSupport
= KSPROPERTY_SUPPORT_GET
;
588 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W
:
589 *pTypeSupport
= KSPROPERTY_SUPPORT_GET
;
591 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A
:
592 *pTypeSupport
= KSPROPERTY_SUPPORT_GET
;
594 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W
:
595 *pTypeSupport
= KSPROPERTY_SUPPORT_GET
;
598 FIXME("unsupported ID: %ld\n",dwPropID
);
602 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet
));
605 return E_PROP_ID_UNSUPPORTED
;
608 static const IKsPropertySetVtbl ikspvt
= {
609 IKsPrivatePropertySetImpl_QueryInterface
,
610 IKsPrivatePropertySetImpl_AddRef
,
611 IKsPrivatePropertySetImpl_Release
,
612 IKsPrivatePropertySetImpl_Get
,
613 IKsPrivatePropertySetImpl_Set
,
614 IKsPrivatePropertySetImpl_QuerySupport
617 HRESULT
IKsPrivatePropertySetImpl_Create(REFIID riid
, void **ppv
)
619 IKsPrivatePropertySetImpl
*iks
;
622 TRACE("(%s, %p)\n", debugstr_guid(riid
), ppv
);
624 iks
= HeapAlloc(GetProcessHeap(), 0, sizeof(*iks
));
626 WARN("out of memory\n");
627 return DSERR_OUTOFMEMORY
;
631 iks
->IKsPropertySet_iface
.lpVtbl
= &ikspvt
;
633 hr
= IKsPropertySet_QueryInterface(&iks
->IKsPropertySet_iface
, riid
, ppv
);
634 IKsPropertySet_Release(&iks
->IKsPropertySet_iface
);