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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include <sys/types.h>
27 #include <sys/fcntl.h>
33 #include <math.h> /* Insomnia - pow() function */
35 #define NONAMELESSUNION
36 #define NONAMELESSSTRUCT
47 #include "wine/windef16.h"
48 #include "wine/debug.h"
51 #include "dsound_private.h"
55 WINE_DEFAULT_DEBUG_CHANNEL(dsound);
58 /*******************************************************************************
59 * IKsBufferPropertySet
62 /* IUnknown methods */
63 static HRESULT WINAPI IKsBufferPropertySetImpl_QueryInterface(
64 LPKSPROPERTYSET iface,
68 IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
69 TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
71 return IDirectSoundBuffer_QueryInterface((LPDIRECTSOUNDBUFFER8)This->dsb, riid, ppobj);
74 static ULONG WINAPI IKsBufferPropertySetImpl_AddRef(LPKSPROPERTYSET iface)
76 IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
77 TRACE("(%p) ref was %ld\n", This, This->ref);
78 return InterlockedIncrement(&(This->ref));
81 static ULONG WINAPI IKsBufferPropertySetImpl_Release(LPKSPROPERTYSET iface)
83 IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
86 TRACE("(%p) ref was %ld\n", This, This->ref);
87 ulReturn = InterlockedDecrement(&(This->ref));
90 IDirectSoundBuffer_Release((LPDIRECTSOUND3DBUFFER)This->dsb);
91 HeapFree(GetProcessHeap(),0,This);
92 TRACE("(%p) released\n",This);
97 static HRESULT WINAPI IKsBufferPropertySetImpl_Get(
98 LPKSPROPERTYSET iface,
101 LPVOID pInstanceData,
102 ULONG cbInstanceData,
107 IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
108 PIDSDRIVERPROPERTYSET ps;
109 TRACE("(iface=%p,guidPropSet=%s,dwPropID=%ld,pInstanceData=%p,cbInstanceData=%ld,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
110 This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned);
112 if (This->dsb->hwbuf) {
113 IDsDriver_QueryInterface(This->dsb->hwbuf, &IID_IDsDriverPropertySet, (void **)&ps);
119 prop.s.Set = *guidPropSet;
120 prop.s.Id = dwPropID;
121 prop.s.Flags = 0; /* unused */
122 prop.s.InstanceId = (ULONG)This->dsb->dsound;
124 hres = IDsDriverPropertySet_Get(ps, &prop, pInstanceData, cbInstanceData, pPropData, cbPropData, pcbReturned);
126 IDsDriverPropertySet_Release(ps);
132 return E_PROP_ID_UNSUPPORTED;
135 static HRESULT WINAPI IKsBufferPropertySetImpl_Set(
136 LPKSPROPERTYSET iface,
139 LPVOID pInstanceData,
140 ULONG cbInstanceData,
144 IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
145 PIDSDRIVERPROPERTYSET ps;
146 TRACE("(%p,%s,%ld,%p,%ld,%p,%ld)\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
148 if (This->dsb->hwbuf) {
149 IDsDriver_QueryInterface(This->dsb->hwbuf, &IID_IDsDriverPropertySet, (void **)&ps);
155 prop.s.Set = *guidPropSet;
156 prop.s.Id = dwPropID;
157 prop.s.Flags = 0; /* unused */
158 prop.s.InstanceId = (ULONG)This->dsb->dsound;
159 hres = IDsDriverPropertySet_Set(ps,&prop,pInstanceData,cbInstanceData,pPropData,cbPropData);
161 IDsDriverPropertySet_Release(ps);
167 return E_PROP_ID_UNSUPPORTED;
170 static HRESULT WINAPI IKsBufferPropertySetImpl_QuerySupport(
171 LPKSPROPERTYSET iface,
174 PULONG pTypeSupport )
176 IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
177 PIDSDRIVERPROPERTYSET ps;
178 TRACE("(%p,%s,%ld,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
180 if (This->dsb->hwbuf) {
181 IDsDriver_QueryInterface(This->dsb->hwbuf, &IID_IDsDriverPropertySet, (void **)&ps);
186 hres = IDsDriverPropertySet_QuerySupport(ps,guidPropSet, dwPropID,pTypeSupport);
188 IDsDriverPropertySet_Release(ps);
194 return E_PROP_ID_UNSUPPORTED;
197 static IKsPropertySetVtbl iksbvt = {
198 IKsBufferPropertySetImpl_QueryInterface,
199 IKsBufferPropertySetImpl_AddRef,
200 IKsBufferPropertySetImpl_Release,
201 IKsBufferPropertySetImpl_Get,
202 IKsBufferPropertySetImpl_Set,
203 IKsBufferPropertySetImpl_QuerySupport
206 HRESULT WINAPI IKsBufferPropertySetImpl_Create(
207 IDirectSoundBufferImpl *dsb,
208 IKsBufferPropertySetImpl **piks)
210 IKsBufferPropertySetImpl *iks;
211 TRACE("(%p,%p)\n",dsb,piks);
213 iks = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*iks));
215 WARN("out of memory\n");
217 return DSERR_OUTOFMEMORY;
223 iks->lpVtbl = &iksbvt;
225 IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER)dsb);
231 HRESULT WINAPI IKsBufferPropertySetImpl_Destroy(
232 IKsBufferPropertySetImpl *piks)
234 TRACE("(%p)\n",piks);
236 while (IKsBufferPropertySetImpl_Release((LPKSPROPERTYSET)piks) > 0);
241 /*******************************************************************************
242 * IKsPrivatePropertySet
245 /* IUnknown methods */
246 static HRESULT WINAPI IKsPrivatePropertySetImpl_QueryInterface(
247 LPKSPROPERTYSET iface,
251 IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
252 TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
255 return DSERR_INVALIDPARAM;
258 static ULONG WINAPI IKsPrivatePropertySetImpl_AddRef(LPKSPROPERTYSET iface)
260 IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
261 TRACE("(%p) ref was %ld\n", This, This->ref);
262 return InterlockedIncrement(&(This->ref));
265 static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface)
267 IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
270 TRACE("(%p) ref was %ld\n", This, This->ref);
271 ulReturn = InterlockedDecrement(&(This->ref));
273 HeapFree(GetProcessHeap(),0,This);
274 TRACE("(%p) released\n",This);
279 static HRESULT WINAPI DSPROPERTY_WaveDeviceMappingA(
285 PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA ppd;
286 FIXME("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p) not implemented!\n",
287 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
289 ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA) pPropData;
292 WARN("invalid parameter: pPropData\n");
293 return DSERR_INVALIDPARAM;
296 FIXME("DeviceName=%s\n",ppd->DeviceName);
297 FIXME("DataFlow=%s\n",
298 ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "DIRECTSOUNDDEVICE_DATAFLOW_RENDER" :
299 ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ? "DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE" : "UNKNOWN");
301 /* FIXME: match the name to a wave device somehow. */
302 ppd->DeviceId = GUID_NULL;
305 *pcbReturned = cbPropData;
306 FIXME("*pcbReturned=%ld\n", *pcbReturned);
312 static HRESULT WINAPI DSPROPERTY_WaveDeviceMappingW(
318 PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA ppd;
319 FIXME("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p) not implemented!\n",
320 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
322 ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA) pPropData;
325 WARN("invalid parameter: pPropData\n");
326 return DSERR_INVALIDPARAM;
329 FIXME("DeviceName=%s\n",debugstr_w(ppd->DeviceName));
330 FIXME("DataFlow=%s\n",
331 ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "DIRECTSOUNDDEVICE_DATAFLOW_RENDER" :
332 ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ? "DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE" : "UNKNOWN");
334 /* FIXME: match the name to a wave device somehow. */
335 ppd->DeviceId = GUID_NULL;
338 *pcbReturned = cbPropData;
339 FIXME("*pcbReturned=%ld\n", *pcbReturned);
345 static HRESULT WINAPI DSPROPERTY_Description1(
353 PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA ppd;
354 TRACE("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
355 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
357 ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA) pPropData;
360 WARN("invalid parameter: pPropData\n");
361 return DSERR_INVALIDPARAM;
364 TRACE("DeviceId=%s\n",debugstr_guid(&ppd->DeviceId));
365 if ( IsEqualGUID( &ppd->DeviceId , &GUID_NULL) ) {
366 /* default device of type specified by ppd->DataFlow */
367 if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE) {
368 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
369 } else if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER) {
370 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
372 TRACE("DataFlow=Unknown(%d)\n", ppd->DataFlow);
374 FIXME("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p) GUID_NULL not implemented!\n",
375 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
376 return E_PROP_ID_UNSUPPORTED;
379 ppd->Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
380 GetDeviceID(&ppd->DeviceId, &dev_guid);
382 if ( IsEqualGUID( &ppd->DeviceId, &DSDEVID_DefaultPlayback) ||
383 IsEqualGUID( &ppd->DeviceId, &DSDEVID_DefaultVoicePlayback) ) {
386 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
387 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
388 wodn = waveOutGetNumDevs();
389 for (wod = 0; wod < wodn; wod++) {
390 if (IsEqualGUID( &dev_guid, &renderer_guids[wod] ) ) {
392 ppd->WaveDeviceId = wod;
394 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
396 PIDSDRIVER drv = NULL;
397 strncpy(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA) - 1);
398 strncpy(ppd->ModuleA, desc.szDrvName, sizeof(ppd->ModuleA) - 1);
399 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
400 MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
401 err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
402 if (err == DS_OK && drv)
403 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
406 WARN("waveOutMessage failed\n");
407 return E_PROP_ID_UNSUPPORTED;
411 } else if ( IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultCapture) ||
412 IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoiceCapture) ) {
415 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
416 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
417 widn = waveInGetNumDevs();
418 for (wid = 0; wid < widn; wid++) {
419 if (IsEqualGUID( &dev_guid, &guid) ) {
421 ppd->WaveDeviceId = wid;
423 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
426 strncpy(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA) - 1);
427 strncpy(ppd->ModuleA, desc.szDrvName, sizeof(ppd->ModuleA) - 1);
428 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
429 MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
430 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD)&drv,0));
431 if (err == DS_OK && drv)
432 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
435 WARN("waveInMessage failed\n");
436 return E_PROP_ID_UNSUPPORTED;
444 /* given specific device so try the render devices first */
445 wodn = waveOutGetNumDevs();
446 for (wod = 0; wod < wodn; wod++) {
447 if (IsEqualGUID( &ppd->DeviceId, &renderer_guids[wod] ) ) {
449 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
450 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
451 ppd->WaveDeviceId = wod;
453 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
455 PIDSDRIVER drv = NULL;
456 strncpy(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA) - 1);
457 strncpy(ppd->ModuleA, desc.szDrvName, sizeof(ppd->ModuleA) - 1);
458 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
459 MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
460 err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
461 if (err == DS_OK && drv)
462 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
466 WARN("waveOutMessage failed\n");
467 return E_PROP_ID_UNSUPPORTED;
472 if (found == FALSE) {
475 /* given specific device so try the capture devices next */
476 widn = waveInGetNumDevs();
477 for (wid = 0; wid < widn; wid++) {
478 if (IsEqualGUID( &ppd->DeviceId, &capture_guids[wid] ) ) {
480 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
481 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
482 ppd->WaveDeviceId = wid;
484 err = mmErr(waveInMessage((HWAVEIN)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
486 PIDSDRIVER drv = NULL;
487 strncpy(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA) - 1);
488 strncpy(ppd->ModuleA, desc.szDrvName, sizeof(ppd->ModuleA) - 1);
489 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
490 MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
491 err = mmErr(waveInMessage((HWAVEIN)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
492 if (err == DS_OK && drv)
493 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
497 WARN("waveInMessage failed\n");
498 return E_PROP_ID_UNSUPPORTED;
503 if (found == FALSE) {
504 WARN("device not found\n");
505 return E_PROP_ID_UNSUPPORTED;
511 *pcbReturned = cbPropData;
512 TRACE("*pcbReturned=%ld\n", *pcbReturned);
518 static HRESULT WINAPI DSPROPERTY_DescriptionA(
524 PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA) pPropData;
527 TRACE("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
528 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
530 TRACE("DeviceId=%s\n",debugstr_guid(&ppd->DeviceId));
531 if ( IsEqualGUID( &ppd->DeviceId , &GUID_NULL) ) {
532 /* default device of type specified by ppd->DataFlow */
533 if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE) {
534 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
535 } else if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER) {
536 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
538 TRACE("DataFlow=Unknown(%d)\n", ppd->DataFlow);
540 FIXME("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p) GUID_NULL not implemented!\n",
541 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
542 return E_PROP_ID_UNSUPPORTED;
545 ppd->Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
546 GetDeviceID(&ppd->DeviceId, &dev_guid);
548 if ( IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultPlayback) ||
549 IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoicePlayback) ) {
552 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
553 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
554 wodn = waveOutGetNumDevs();
555 for (wod = 0; wod < wodn; wod++) {
556 if (IsEqualGUID( &dev_guid, &renderer_guids[wod] ) ) {
558 ppd->WaveDeviceId = wod;
559 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
561 PIDSDRIVER drv = NULL;
562 /* FIXME: this is a memory leak */
563 CHAR * szDescription = HeapAlloc(GetProcessHeap(),0,strlen(desc.szDesc) + 1);
564 CHAR * szModule = HeapAlloc(GetProcessHeap(),0,strlen(desc.szDrvName) + 1);
565 CHAR * szInterface = HeapAlloc(GetProcessHeap(),0,strlen("Interface") + 1);
567 strcpy(szDescription, desc.szDesc);
568 strcpy(szModule, desc.szDrvName);
569 strcpy(szInterface, "Interface");
571 ppd->Description = szDescription;
572 ppd->Module = szModule;
573 ppd->Interface = szInterface;
574 err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
575 if (err == DS_OK && drv)
576 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
579 WARN("waveOutMessage failed\n");
580 return E_PROP_ID_UNSUPPORTED;
584 } else if (IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultCapture) ||
585 IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoiceCapture) ) {
588 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
589 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
590 widn = waveInGetNumDevs();
591 for (wid = 0; wid < widn; wid++) {
592 if (IsEqualGUID( &dev_guid, &capture_guids[wid] ) ) {
594 ppd->WaveDeviceId = wid;
595 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
598 /* FIXME: this is a memory leak */
599 CHAR * szDescription = HeapAlloc(GetProcessHeap(),0,strlen(desc.szDesc) + 1);
600 CHAR * szModule = HeapAlloc(GetProcessHeap(),0,strlen(desc.szDrvName) + 1);
601 CHAR * szInterface = HeapAlloc(GetProcessHeap(),0,strlen("Interface") + 1);
603 strcpy(szDescription, desc.szDesc);
604 strcpy(szModule, desc.szDrvName);
605 strcpy(szInterface, "Interface");
607 ppd->Description = szDescription;
608 ppd->Module = szModule;
609 ppd->Interface = szInterface;
610 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD)&drv,0));
611 if (err == DS_OK && drv)
612 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
615 WARN("waveInMessage failed\n");
616 return E_PROP_ID_UNSUPPORTED;
624 /* given specific device so try the render devices first */
625 wodn = waveOutGetNumDevs();
626 for (wod = 0; wod < wodn; wod++) {
627 if (IsEqualGUID( &ppd->DeviceId, &renderer_guids[wod] ) ) {
629 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
630 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
631 ppd->WaveDeviceId = wod;
632 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
634 PIDSDRIVER drv = NULL;
635 /* FIXME: this is a memory leak */
636 CHAR * szDescription = HeapAlloc(GetProcessHeap(),0,strlen(desc.szDesc) + 1);
637 CHAR * szModule = HeapAlloc(GetProcessHeap(),0,strlen(desc.szDrvName) + 1);
638 CHAR * szInterface = HeapAlloc(GetProcessHeap(),0,strlen("Interface") + 1);
640 strcpy(szDescription, desc.szDesc);
641 strcpy(szModule, desc.szDrvName);
642 strcpy(szInterface, "Interface");
644 ppd->Description = szDescription;
645 ppd->Module = szModule;
646 ppd->Interface = szInterface;
647 err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
648 if (err == DS_OK && drv)
649 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
653 WARN("waveOutMessage failed\n");
654 return E_PROP_ID_UNSUPPORTED;
659 if (found == FALSE) {
660 WARN("device not found\n");
661 return E_PROP_ID_UNSUPPORTED;
666 *pcbReturned = cbPropData;
667 TRACE("*pcbReturned=%ld\n", *pcbReturned);
673 static HRESULT WINAPI DSPROPERTY_DescriptionW(
679 PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA) pPropData;
682 TRACE("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
683 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
685 TRACE("DeviceId=%s\n",debugstr_guid(&ppd->DeviceId));
686 if ( IsEqualGUID( &ppd->DeviceId , &GUID_NULL) ) {
687 /* default device of type specified by ppd->DataFlow */
688 if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE) {
689 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
690 } else if (ppd->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER) {
691 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
693 TRACE("DataFlow=Unknown(%d)\n", ppd->DataFlow);
695 FIXME("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p) GUID_NULL not implemented!\n",
696 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
697 return E_PROP_ID_UNSUPPORTED;
700 ppd->Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
701 GetDeviceID(&ppd->DeviceId, &dev_guid);
703 if ( IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultPlayback) ||
704 IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoicePlayback) ) {
707 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
708 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
709 wodn = waveOutGetNumDevs();
710 for (wod = 0; wod < wodn; wod++) {
711 if (IsEqualGUID( &dev_guid, &renderer_guids[wod] ) ) {
713 ppd->WaveDeviceId = wod;
714 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
716 PIDSDRIVER drv = NULL;
717 /* FIXME: this is a memory leak */
718 WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
719 WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200);
720 WCHAR * wInterface = HeapAlloc(GetProcessHeap(),0,0x200);
722 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, wDescription, 0x100 );
723 MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, wModule, 0x100 );
724 MultiByteToWideChar( CP_ACP, 0, "Interface", -1, wInterface, 0x100 );
726 ppd->Description = wDescription;
727 ppd->Module = wModule;
728 ppd->Interface = wInterface;
729 err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
730 if (err == DS_OK && drv)
731 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
734 WARN("waveOutMessage failed\n");
735 return E_PROP_ID_UNSUPPORTED;
739 } else if (IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultCapture) ||
740 IsEqualGUID( &ppd->DeviceId , &DSDEVID_DefaultVoiceCapture) ) {
743 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE\n");
744 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
745 widn = waveInGetNumDevs();
746 for (wid = 0; wid < widn; wid++) {
747 if (IsEqualGUID( &dev_guid, &capture_guids[wid] ) ) {
749 ppd->WaveDeviceId = wid;
750 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
753 /* FIXME: this is a memory leak */
754 WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
755 WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200);
756 WCHAR * wInterface = HeapAlloc(GetProcessHeap(),0,0x200);
758 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, wDescription, 0x100 );
759 MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, wModule, 0x100 );
760 MultiByteToWideChar( CP_ACP, 0, "Interface", -1, wInterface, 0x100 );
762 ppd->Description = wDescription;
763 ppd->Module = wModule;
764 ppd->Interface = wInterface;
765 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD)&drv,0));
766 if (err == DS_OK && drv)
767 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
770 WARN("waveInMessage failed\n");
771 return E_PROP_ID_UNSUPPORTED;
779 /* given specific device so try the render devices first */
780 wodn = waveOutGetNumDevs();
781 for (wod = 0; wod < wodn; wod++) {
782 if (IsEqualGUID( &ppd->DeviceId, &renderer_guids[wod] ) ) {
784 TRACE("DataFlow=DIRECTSOUNDDEVICE_DATAFLOW_RENDER\n");
785 ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
786 ppd->WaveDeviceId = wod;
787 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
789 PIDSDRIVER drv = NULL;
790 /* FIXME: this is a memory leak */
791 WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
792 WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200);
793 WCHAR * wInterface = HeapAlloc(GetProcessHeap(),0,0x200);
795 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, wDescription, 0x100 );
796 MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, wModule, 0x100 );
797 MultiByteToWideChar( CP_ACP, 0, "Interface", -1, wInterface, 0x100 );
799 ppd->Description = wDescription;
800 ppd->Module = wModule;
801 ppd->Interface = wInterface;
802 err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
803 if (err == DS_OK && drv)
804 ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
808 WARN("waveOutMessage failed\n");
809 return E_PROP_ID_UNSUPPORTED;
814 if (found == FALSE) {
815 WARN("device not found\n");
816 return E_PROP_ID_UNSUPPORTED;
821 *pcbReturned = cbPropData;
822 TRACE("*pcbReturned=%ld\n", *pcbReturned);
828 static HRESULT WINAPI DSPROPERTY_Enumerate1(
834 FIXME("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
835 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
836 return E_PROP_ID_UNSUPPORTED;
839 static HRESULT WINAPI DSPROPERTY_EnumerateA(
845 PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA) pPropData;
847 TRACE("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
848 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
850 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
853 unsigned devs, wod, wid;
855 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA data;
857 devs = waveOutGetNumDevs();
858 for (wod = 0; wod < devs; ++wod) {
859 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
862 memset(&data, 0, sizeof(data));
863 data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
864 data.WaveDeviceId = wod;
865 data.DeviceId = renderer_guids[wod];
866 data.Description = desc.szDesc;
867 data.Module = desc.szDrvName;
868 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDEVICEINTERFACESIZE,(DWORD_PTR)&size,0));
870 WCHAR * nameW = HeapAlloc(GetProcessHeap(),0,size);
871 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDEVICEINTERFACE,(DWORD_PTR)nameW,size));
873 CHAR * szInterface = HeapAlloc(GetProcessHeap(),0,size/sizeof(WCHAR));
874 WideCharToMultiByte( CP_ACP, 0, nameW, size/sizeof(WCHAR), szInterface, size/sizeof(WCHAR), NULL, NULL );
875 data.Interface = szInterface;
877 TRACE("calling Callback(%p,%p)\n", &data, ppd->Context);
878 (ppd->Callback)(&data, ppd->Context);
880 HeapFree(GetProcessHeap(),0,szInterface);
882 HeapFree(GetProcessHeap(),0,nameW);
887 devs = waveInGetNumDevs();
888 for (wid = 0; wid < devs; ++wid) {
889 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
892 memset(&data, 0, sizeof(data));
893 data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
894 data.WaveDeviceId = wid;
895 data.DeviceId = capture_guids[wid];
896 data.Description = desc.szDesc;
897 data.Module = desc.szDrvName;
898 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDEVICEINTERFACESIZE,(DWORD_PTR)&size,0));
900 WCHAR * nameW = HeapAlloc(GetProcessHeap(),0,size);
901 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDEVICEINTERFACE,(DWORD_PTR)nameW,size));
903 CHAR * szInterface = HeapAlloc(GetProcessHeap(),0,size/sizeof(WCHAR));
904 WideCharToMultiByte( CP_ACP, 0, nameW, size/sizeof(WCHAR), szInterface, size/sizeof(WCHAR), NULL, NULL );
905 data.Interface = szInterface;
907 TRACE("calling Callback(%p,%p)\n", &data, ppd->Context);
908 (ppd->Callback)(&data, ppd->Context);
910 HeapFree(GetProcessHeap(),0,szInterface);
912 HeapFree(GetProcessHeap(),0,nameW);
921 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet));
926 FIXME("*pcbReturned=%ld\n", *pcbReturned);
929 return E_PROP_ID_UNSUPPORTED;
932 static HRESULT WINAPI DSPROPERTY_EnumerateW(
938 PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA) pPropData;
940 TRACE("(guidPropSet=%s,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
941 debugstr_guid(guidPropSet),pPropData,cbPropData,pcbReturned);
943 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
946 unsigned devs, wod, wid;
948 DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data;
950 devs = waveOutGetNumDevs();
951 for (wod = 0; wod < devs; ++wod) {
952 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
954 WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
955 WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200);
957 err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&size, 0));
959 WCHAR * wInterface = HeapAlloc(GetProcessHeap(),0,size);
960 err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)wInterface, size));
962 memset(&data, 0, sizeof(data));
963 data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
964 data.WaveDeviceId = wod;
965 data.DeviceId = renderer_guids[wod];
967 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, wDescription, 0x100 );
968 MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, wModule, 0x100 );
970 data.Description = wDescription;
971 data.Module = wModule;
972 data.Interface = wInterface;
974 TRACE("calling Callback(%p,%p)\n", &data, ppd->Context);
975 (ppd->Callback)(&data, ppd->Context);
977 HeapFree(GetProcessHeap(),0,wInterface);
979 HeapFree(GetProcessHeap(),0,wDescription);
980 HeapFree(GetProcessHeap(),0,wModule);
984 devs = waveInGetNumDevs();
985 for (wid = 0; wid < devs; ++wid) {
986 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
988 WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
989 WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200);
991 err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&size, 0));
993 WCHAR * wInterface = HeapAlloc(GetProcessHeap(),0,size);
994 err = mmErr(waveInMessage((HWAVEIN)wod, DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)wInterface, size));
996 memset(&data, 0, sizeof(data));
997 data.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
998 data.WaveDeviceId = wid;
999 data.DeviceId = capture_guids[wid];
1001 MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, wDescription, 0x100 );
1002 MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, wModule, 0x100 );
1004 data.Description = wDescription;
1005 data.Module = wModule;
1006 data.Interface = wInterface;
1007 TRACE("calling Callback(%p,%p)\n", &data, ppd->Context);
1008 (ppd->Callback)(&data, ppd->Context);
1010 HeapFree(GetProcessHeap(),0,wInterface);
1012 HeapFree(GetProcessHeap(),0,wDescription);
1013 HeapFree(GetProcessHeap(),0,wModule);
1021 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet));
1026 FIXME("*pcbReturned=%ld\n", *pcbReturned);
1029 return E_PROP_ID_UNSUPPORTED;
1032 static HRESULT WINAPI IKsPrivatePropertySetImpl_Get(
1033 LPKSPROPERTYSET iface,
1034 REFGUID guidPropSet,
1036 LPVOID pInstanceData,
1037 ULONG cbInstanceData,
1042 IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
1043 TRACE("(iface=%p,guidPropSet=%s,dwPropID=%ld,pInstanceData=%p,cbInstanceData=%ld,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
1044 This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned);
1046 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
1048 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A:
1049 return DSPROPERTY_WaveDeviceMappingA(guidPropSet,pPropData,cbPropData,pcbReturned);
1050 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1:
1051 return DSPROPERTY_Description1(guidPropSet,pPropData,cbPropData,pcbReturned);
1052 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1:
1053 return DSPROPERTY_Enumerate1(guidPropSet,pPropData,cbPropData,pcbReturned);
1054 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W:
1055 return DSPROPERTY_WaveDeviceMappingW(guidPropSet,pPropData,cbPropData,pcbReturned);
1056 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A:
1057 return DSPROPERTY_DescriptionA(guidPropSet,pPropData,cbPropData,pcbReturned);
1058 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W:
1059 return DSPROPERTY_DescriptionW(guidPropSet,pPropData,cbPropData,pcbReturned);
1060 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A:
1061 return DSPROPERTY_EnumerateA(guidPropSet,pPropData,cbPropData,pcbReturned);
1062 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W:
1063 return DSPROPERTY_EnumerateW(guidPropSet,pPropData,cbPropData,pcbReturned);
1065 FIXME("unsupported ID: %ld\n",dwPropID);
1069 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet));
1074 FIXME("*pcbReturned=%ld\n", *pcbReturned);
1077 return E_PROP_ID_UNSUPPORTED;
1080 static HRESULT WINAPI IKsPrivatePropertySetImpl_Set(
1081 LPKSPROPERTYSET iface,
1082 REFGUID guidPropSet,
1084 LPVOID pInstanceData,
1085 ULONG cbInstanceData,
1089 IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
1091 FIXME("(%p,%s,%ld,%p,%ld,%p,%ld), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
1092 return E_PROP_ID_UNSUPPORTED;
1095 static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport(
1096 LPKSPROPERTYSET iface,
1097 REFGUID guidPropSet,
1099 PULONG pTypeSupport )
1101 IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
1102 TRACE("(%p,%s,%ld,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
1104 if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
1106 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A:
1107 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
1109 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1:
1110 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
1112 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1:
1113 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
1115 case DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W:
1116 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
1118 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A:
1119 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
1121 case DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W:
1122 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
1124 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A:
1125 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
1127 case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W:
1128 *pTypeSupport = KSPROPERTY_SUPPORT_GET;
1131 FIXME("unsupported ID: %ld\n",dwPropID);
1135 FIXME("unsupported property: %s\n",debugstr_guid(guidPropSet));
1138 return E_PROP_ID_UNSUPPORTED;
1141 static IKsPropertySetVtbl ikspvt = {
1142 IKsPrivatePropertySetImpl_QueryInterface,
1143 IKsPrivatePropertySetImpl_AddRef,
1144 IKsPrivatePropertySetImpl_Release,
1145 IKsPrivatePropertySetImpl_Get,
1146 IKsPrivatePropertySetImpl_Set,
1147 IKsPrivatePropertySetImpl_QuerySupport
1150 HRESULT WINAPI IKsPrivatePropertySetImpl_Create(
1151 IKsPrivatePropertySetImpl **piks)
1153 IKsPrivatePropertySetImpl *iks;
1155 iks = HeapAlloc(GetProcessHeap(),0,sizeof(*iks));
1157 iks->lpVtbl = &ikspvt;