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
33 #include "wine/debug.h"
35 #include "dsound_private.h"
38 #ifdef NONAMELESSSTRUCT
44 WINE_DEFAULT_DEBUG_CHANNEL(dsound);
46 typedef struct IKsPrivatePropertySetImpl
48 IKsPropertySet IKsPropertySet_iface;
50 } IKsPrivatePropertySetImpl;
52 static IKsPrivatePropertySetImpl *impl_from_IKsPropertySet(IKsPropertySet *iface)
54 return CONTAINING_RECORD(iface, IKsPrivatePropertySetImpl, IKsPropertySet_iface);
57 /*******************************************************************************
58 * IKsPrivatePropertySet
61 /* IUnknown methods */
62 static HRESULT WINAPI IKsPrivatePropertySetImpl_QueryInterface(
63 LPKSPROPERTYSET iface,
67 IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
68 TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
70 if (IsEqualIID(riid, &IID_IUnknown) ||
71 IsEqualIID(riid, &IID_IKsPropertySet)) {
73 IUnknown_AddRef(iface);
80 static ULONG WINAPI IKsPrivatePropertySetImpl_AddRef(LPKSPROPERTYSET iface)
82 IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
83 ULONG ref = InterlockedIncrement(&(This->ref));
84 TRACE("(%p) ref was %d\n", This, ref - 1);
88 static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface)
90 IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
91 ULONG ref = InterlockedDecrement(&(This->ref));
92 TRACE("(%p) ref was %d\n", This, ref + 1);
95 HeapFree(GetProcessHeap(), 0, This);
96 TRACE("(%p) released\n", This);
101 static HRESULT DSPROPERTY_WaveDeviceMappingW(
106 HRESULT hr = DSERR_INVALIDPARAM;
107 PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA ppd;
108 TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
109 pPropData,cbPropData,pcbReturned);
114 WARN("invalid parameter: pPropData\n");
115 return DSERR_INVALIDPARAM;
118 if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER) {
121 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
122 wodn = waveOutGetNumDevs();
123 for (wod = 0; wod < wodn; wod++) {
126 res = waveOutGetDevCapsW(wod, &capsW, sizeof(capsW));
127 if (res == MMSYSERR_NOERROR) {
128 if (lstrcmpW(capsW.szPname, ppd->DeviceName) == 0) {
129 ppd->DeviceId = DSOUND_renderer_guids[wod];
131 TRACE("found %s for %s\n", debugstr_guid(&ppd->DeviceId),
132 debugstr_w(ppd->DeviceName));
137 } else if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE) {
140 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
141 widn = waveInGetNumDevs();
142 for (wid = 0; wid < widn; wid++) {
145 res = waveInGetDevCapsW(wid, &capsW, sizeof(capsW));
146 if (res == MMSYSERR_NOERROR) {
147 if (lstrcmpW(capsW.szPname, ppd->DeviceName) == 0) {
148 ppd->DeviceId = DSOUND_capture_guids[wid];
150 TRACE("found %s for %s\n", debugstr_guid(&ppd->DeviceId),
151 debugstr_w(ppd->DeviceName));
159 *pcbReturned = cbPropData;
164 static HRESULT DSPROPERTY_WaveDeviceMappingA(
169 DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA *ppd = pPropData;
170 DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA data;
174 TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
175 pPropData,cbPropData,pcbReturned);
177 if (!ppd || !ppd->DeviceName) {
178 WARN("invalid parameter: ppd=%p\n", ppd);
179 return DSERR_INVALIDPARAM;
182 data.DataFlow = ppd->DataFlow;
183 len = MultiByteToWideChar(CP_ACP, 0, ppd->DeviceName, -1, NULL, 0);
184 data.DeviceName = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
185 if (!data.DeviceName)
186 return E_OUTOFMEMORY;
187 MultiByteToWideChar(CP_ACP, 0, ppd->DeviceName, -1, data.DeviceName, len);
189 hr = DSPROPERTY_WaveDeviceMappingW(&data, cbPropData, pcbReturned);
190 HeapFree(GetProcessHeap(), 0, data.DeviceName);
191 ppd->DeviceId = data.DeviceId;
194 *pcbReturned = cbPropData;
199 static HRESULT DSPROPERTY_DescriptionW(
204 PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA ppd = pPropData;
207 ULONG wod, wid, wodn, widn;
210 TRACE("pPropData=%p,cbPropData=%d,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 setup_dsound_options();
230 GetDeviceID(&ppd->DeviceId, &dev_guid);
232 wodn = waveOutGetNumDevs();
233 widn = waveInGetNumDevs();
234 wid = wod = dev_guid.Data4[7];
235 if (!memcmp(&dev_guid, &DSOUND_renderer_guids[0], sizeof(GUID)-1)
238 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
239 ppd->WaveDeviceId = wod;
241 else if (!memcmp(&dev_guid, &DSOUND_capture_guids[0], sizeof(GUID)-1)
244 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
245 ppd->WaveDeviceId = wid;
249 WARN("Device not found\n");
250 return E_PROP_ID_UNSUPPORTED;
253 if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER)
254 err = waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0);
256 err = waveInMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0);
258 if (err != MMSYSERR_NOERROR)
260 WARN("waveMessage(DRV_QUERYDSOUNDDESC) failed!\n");
261 return E_PROP_ID_UNSUPPORTED;
265 /* FIXME: Still a memory leak.. */
267 static WCHAR wInterface[] = { 'I','n','t','e','r','f','a','c','e',0 };
269 modlen = MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, NULL, 0 );
270 desclen = MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, NULL, 0 );
271 ppd->Module = HeapAlloc(GetProcessHeap(),0,modlen*sizeof(WCHAR));
272 ppd->Description = HeapAlloc(GetProcessHeap(),0,desclen*sizeof(WCHAR));
273 ppd->Interface = wInterface;
274 if (!ppd->Description || !ppd->Module)
276 WARN("Out of memory\n");
277 HeapFree(GetProcessHeap(), 0, ppd->Description);
278 HeapFree(GetProcessHeap(), 0, ppd->Module);
279 ppd->Description = ppd->Module = NULL;
280 return E_OUTOFMEMORY;
283 MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->Module, modlen );
284 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->Description, desclen );
287 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
290 *pcbReturned = sizeof(*ppd);
291 TRACE("*pcbReturned=%d\n", *pcbReturned);
297 static HRESULT DSPROPERTY_EnumerateW(
302 PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA ppd = pPropData;
303 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data;
306 TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
307 pPropData,cbPropData,pcbReturned);
312 if (!ppd || !ppd->Callback)
314 WARN("Invalid ppd %p\n", ppd);
315 return E_PROP_ID_UNSUPPORTED;
318 wodn = waveOutGetNumDevs();
319 widn = waveInGetNumDevs();
321 data.DeviceId = DSOUND_renderer_guids[0];
322 for (i = 0; i < wodn; ++i)
325 data.DeviceId.Data4[7] = i;
326 hr = DSPROPERTY_DescriptionW(&data, sizeof(data), NULL);
329 ERR("DescriptionW failed!\n");
332 ret = ppd->Callback(&data, ppd->Context);
333 HeapFree(GetProcessHeap(), 0, data.Module);
334 HeapFree(GetProcessHeap(), 0, data.Description);
339 data.DeviceId = DSOUND_capture_guids[0];
340 for (i = 0; i < widn; ++i)
343 data.DeviceId.Data4[7] = i;
344 hr = DSPROPERTY_DescriptionW(&data, sizeof(data), NULL);
347 ERR("DescriptionW failed!\n");
350 ret = ppd->Callback(&data, ppd->Context);
351 HeapFree(GetProcessHeap(), 0, data.Module);
352 HeapFree(GetProcessHeap(), 0, data.Description);
359 static BOOL DSPROPERTY_descWtoA(const DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA *dataW,
360 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA *dataA)
362 DWORD modlen, desclen;
363 static char Interface[] = "Interface";
365 modlen = WideCharToMultiByte(CP_ACP, 0, dataW->Module, -1, NULL, 0, NULL, NULL);
366 desclen = WideCharToMultiByte(CP_ACP, 0, dataW->Description, -1, NULL, 0, NULL, NULL);
367 dataA->Type = dataW->Type;
368 dataA->DataFlow = dataW->DataFlow;
369 dataA->DeviceId = dataW->DeviceId;
370 dataA->WaveDeviceId = dataW->WaveDeviceId;
371 dataA->Interface = Interface;
372 dataA->Module = HeapAlloc(GetProcessHeap(), 0, modlen);
373 dataA->Description = HeapAlloc(GetProcessHeap(), 0, desclen);
374 if (!dataA->Module || !dataA->Description)
376 HeapFree(GetProcessHeap(), 0, dataA->Module);
377 HeapFree(GetProcessHeap(), 0, dataA->Description);
378 dataA->Module = dataA->Description = NULL;
382 WideCharToMultiByte(CP_ACP, 0, dataW->Module, -1, dataA->Module, modlen, NULL, NULL);
383 WideCharToMultiByte(CP_ACP, 0, dataW->Description, -1, dataA->Description, desclen, NULL, NULL);
387 static void DSPROPERTY_descWto1(const DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA *dataW,
388 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA *data1)
390 data1->DeviceId = dataW->DeviceId;
391 lstrcpynW(data1->ModuleW, dataW->Module, sizeof(data1->ModuleW)/sizeof(*data1->ModuleW));
392 lstrcpynW(data1->DescriptionW, dataW->Description, sizeof(data1->DescriptionW)/sizeof(*data1->DescriptionW));
393 WideCharToMultiByte(CP_ACP, 0, data1->DescriptionW, -1, data1->DescriptionA, sizeof(data1->DescriptionA)-1, NULL, NULL);
394 WideCharToMultiByte(CP_ACP, 0, data1->ModuleW, -1, data1->ModuleA, sizeof(data1->ModuleA)-1, NULL, NULL);
395 data1->DescriptionA[sizeof(data1->DescriptionA)-1] = 0;
396 data1->ModuleA[sizeof(data1->ModuleA)-1] = 0;
397 data1->Type = dataW->Type;
398 data1->DataFlow = dataW->DataFlow;
399 data1->WaveDeviceId = data1->Devnode = dataW->WaveDeviceId;
402 static BOOL CALLBACK DSPROPERTY_enumWtoA(DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA *descW, void *data)
404 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA descA;
405 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA *ppd = data;
408 ret = DSPROPERTY_descWtoA(descW, &descA);
411 ret = ppd->Callback(&descA, ppd->Context);
412 HeapFree(GetProcessHeap(), 0, descA.Module);
413 HeapFree(GetProcessHeap(), 0, descA.Description);
417 static HRESULT DSPROPERTY_EnumerateA(
422 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA *ppd = pPropData;
423 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA data;
425 if (!ppd || !ppd->Callback)
427 WARN("Invalid ppd %p\n", ppd);
428 return E_PROP_ID_UNSUPPORTED;
431 data.Callback = DSPROPERTY_enumWtoA;
434 return DSPROPERTY_EnumerateW(&data, cbPropData, pcbReturned);
437 static BOOL CALLBACK DSPROPERTY_enumWto1(DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA *descW, void *data)
439 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA desc1;
440 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA *ppd = data;
443 DSPROPERTY_descWto1(descW, &desc1);
444 ret = ppd->Callback(&desc1, ppd->Context);
448 static HRESULT DSPROPERTY_Enumerate1(
453 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA *ppd = pPropData;
454 DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA data;
456 if (!ppd || !ppd->Callback)
458 WARN("Invalid ppd %p\n", ppd);
459 return E_PROP_ID_UNSUPPORTED;
462 data.Callback = DSPROPERTY_enumWto1;
465 return DSPROPERTY_EnumerateW(&data, cbPropData, pcbReturned);
468 static HRESULT DSPROPERTY_DescriptionA(
473 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data;
474 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA *ppd = pPropData;
478 *pcbReturned = sizeof(*ppd);
482 data.DeviceId = ppd->DeviceId;
483 data.DataFlow = ppd->DataFlow;
484 hr = DSPROPERTY_DescriptionW(&data, sizeof(data), NULL);
487 if (!DSPROPERTY_descWtoA(&data, ppd))
489 HeapFree(GetProcessHeap(), 0, data.Module);
490 HeapFree(GetProcessHeap(), 0, data.Interface);
494 static HRESULT DSPROPERTY_Description1(
499 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data;
500 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA *ppd = pPropData;
504 *pcbReturned = sizeof(*ppd);
508 data.DeviceId = ppd->DeviceId;
509 data.DataFlow = ppd->DataFlow;
510 hr = DSPROPERTY_DescriptionW(&data, sizeof(data), NULL);
513 DSPROPERTY_descWto1(&data, ppd);
514 HeapFree(GetProcessHeap(), 0, data.Module);
515 HeapFree(GetProcessHeap(), 0, data.Interface);
519 static HRESULT WINAPI IKsPrivatePropertySetImpl_Get(
520 LPKSPROPERTYSET iface,
523 LPVOID pInstanceData,
524 ULONG cbInstanceData,
529 IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
530 TRACE("(iface=%p,guidPropSet=%s,dwPropID=%d,pInstanceData=%p,cbInstanceData=%d,pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
531 This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned);
533 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
535 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A:
536 return DSPROPERTY_WaveDeviceMappingA(pPropData,cbPropData,pcbReturned);
537 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1:
538 return DSPROPERTY_Description1(pPropData,cbPropData,pcbReturned);
539 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1:
540 return DSPROPERTY_Enumerate1(pPropData,cbPropData,pcbReturned);
541 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W:
542 return DSPROPERTY_WaveDeviceMappingW(pPropData,cbPropData,pcbReturned);
543 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A:
544 return DSPROPERTY_DescriptionA(pPropData,cbPropData,pcbReturned);
545 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W:
546 return DSPROPERTY_DescriptionW(pPropData,cbPropData,pcbReturned);
547 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A:
548 return DSPROPERTY_EnumerateA(pPropData,cbPropData,pcbReturned);
549 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W:
550 return DSPROPERTY_EnumerateW(pPropData,cbPropData,pcbReturned);
552 FIXME("unsupported ID: %d\n",dwPropID);
556 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet));
561 FIXME("*pcbReturned=%d\n", *pcbReturned);
564 return E_PROP_ID_UNSUPPORTED;
567 static HRESULT WINAPI IKsPrivatePropertySetImpl_Set(
568 LPKSPROPERTYSET iface,
571 LPVOID pInstanceData,
572 ULONG cbInstanceData,
576 IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
578 FIXME("(%p,%s,%d,%p,%d,%p,%d), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
579 return E_PROP_ID_UNSUPPORTED;
582 static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport(
583 LPKSPROPERTYSET iface,
586 PULONG pTypeSupport )
588 IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
589 TRACE("(%p,%s,%d,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
591 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
593 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A:
594 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
596 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1:
597 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
599 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1:
600 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
602 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W:
603 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
605 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A:
606 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
608 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W:
609 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
611 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A:
612 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
614 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W:
615 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
618 FIXME("unsupported ID: %d\n",dwPropID);
622 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet));
625 return E_PROP_ID_UNSUPPORTED;
628 static const IKsPropertySetVtbl ikspvt = {
629 IKsPrivatePropertySetImpl_QueryInterface,
630 IKsPrivatePropertySetImpl_AddRef,
631 IKsPrivatePropertySetImpl_Release,
632 IKsPrivatePropertySetImpl_Get,
633 IKsPrivatePropertySetImpl_Set,
634 IKsPrivatePropertySetImpl_QuerySupport
637 HRESULT IKsPrivatePropertySetImpl_Create(
639 IKsPropertySet **piks)
641 IKsPrivatePropertySetImpl *iks;
642 TRACE("(%s, %p)\n", debugstr_guid(riid), piks);
644 if (!IsEqualIID(riid, &IID_IUnknown) &&
645 !IsEqualIID(riid, &IID_IKsPropertySet)) {
647 return E_NOINTERFACE;
650 iks = HeapAlloc(GetProcessHeap(),0,sizeof(*iks));
652 iks->IKsPropertySet_iface.lpVtbl = &ikspvt;
654 *piks = &iks->IKsPropertySet_iface;