Commit 0ae74c2a authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dsound: Use UlongToHandle to make the real payload a HWAVEIN/HWAVEOUT.

Fixes Win64 compiler warnings.
parent 7ab165a5
...@@ -289,7 +289,7 @@ DirectSoundCaptureEnumerateA( ...@@ -289,7 +289,7 @@ DirectSoundCaptureEnumerateA(
if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) { if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
for (wid = 0; wid < devs; ++wid) { for (wid = 0; wid < devs; ++wid) {
if (IsEqualGUID( &guid, &DSOUND_capture_guids[wid] ) ) { if (IsEqualGUID( &guid, &DSOUND_capture_guids[wid] ) ) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Capture Driver",desc.szDrvname,lpContext); "Primary Sound Capture Driver",desc.szDrvname,lpContext);
...@@ -302,7 +302,7 @@ DirectSoundCaptureEnumerateA( ...@@ -302,7 +302,7 @@ DirectSoundCaptureEnumerateA(
} }
for (wid = 0; wid < devs; ++wid) { for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&DSOUND_capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext); debugstr_guid(&DSOUND_capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext);
...@@ -351,7 +351,7 @@ DirectSoundCaptureEnumerateW( ...@@ -351,7 +351,7 @@ DirectSoundCaptureEnumerateW(
if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) { if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
for (wid = 0; wid < devs; ++wid) { for (wid = 0; wid < devs; ++wid) {
if (IsEqualGUID( &guid, &DSOUND_capture_guids[wid] ) ) { if (IsEqualGUID( &guid, &DSOUND_capture_guids[wid] ) ) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Capture Driver",desc.szDrvname,lpContext); "Primary Sound Capture Driver",desc.szDrvname,lpContext);
...@@ -368,7 +368,7 @@ DirectSoundCaptureEnumerateW( ...@@ -368,7 +368,7 @@ DirectSoundCaptureEnumerateW(
} }
for (wid = 0; wid < devs; ++wid) { for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&DSOUND_capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext); debugstr_guid(&DSOUND_capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext);
...@@ -1550,7 +1550,7 @@ HRESULT DirectSoundCaptureDevice_Initialize( ...@@ -1550,7 +1550,7 @@ HRESULT DirectSoundCaptureDevice_Initialize(
device->driver = NULL; device->driver = NULL;
if (ds_hw_accel != DS_HW_ACCEL_EMULATION) if (ds_hw_accel != DS_HW_ACCEL_EMULATION)
{ {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&(device->driver),0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&device->driver,0));
if ( (err != DS_OK) && (err != DSERR_UNSUPPORTED) ) { if ( (err != DS_OK) && (err != DSERR_UNSUPPORTED) ) {
WARN("waveInMessage failed; err=%x\n",err); WARN("waveInMessage failed; err=%x\n",err);
return err; return err;
......
...@@ -308,7 +308,7 @@ HRESULT WINAPI DirectSoundEnumerateA( ...@@ -308,7 +308,7 @@ HRESULT WINAPI DirectSoundEnumerateA(
if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) { if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
for (wod = 0; wod < devs; ++wod) { for (wod = 0; wod < devs; ++wod) {
if (IsEqualGUID( &guid, &DSOUND_renderer_guids[wod]) ) { if (IsEqualGUID( &guid, &DSOUND_renderer_guids[wod]) ) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Driver","",lpContext); "Primary Sound Driver","",lpContext);
...@@ -321,7 +321,7 @@ HRESULT WINAPI DirectSoundEnumerateA( ...@@ -321,7 +321,7 @@ HRESULT WINAPI DirectSoundEnumerateA(
} }
for (wod = 0; wod < devs; ++wod) { for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext); debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
...@@ -370,7 +370,7 @@ HRESULT WINAPI DirectSoundEnumerateW( ...@@ -370,7 +370,7 @@ HRESULT WINAPI DirectSoundEnumerateW(
static const WCHAR empty[] = { 0 }; static const WCHAR empty[] = { 0 };
for (wod = 0; wod < devs; ++wod) { for (wod = 0; wod < devs; ++wod) {
if (IsEqualGUID( &guid, &DSOUND_renderer_guids[wod] ) ) { if (IsEqualGUID( &guid, &DSOUND_renderer_guids[wod] ) ) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Driver",desc.szDrvname,lpContext); "Primary Sound Driver",desc.szDrvname,lpContext);
...@@ -385,7 +385,7 @@ HRESULT WINAPI DirectSoundEnumerateW( ...@@ -385,7 +385,7 @@ HRESULT WINAPI DirectSoundEnumerateW(
} }
for (wod = 0; wod < devs; ++wod) { for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext); debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
......
...@@ -447,14 +447,14 @@ static HRESULT DSPROPERTY_Description1( ...@@ -447,14 +447,14 @@ static HRESULT DSPROPERTY_Description1(
DSDRIVERDESC desc; DSDRIVERDESC desc;
ppd->WaveDeviceId = wod; ppd->WaveDeviceId = wod;
ppd->Devnode = wod; ppd->Devnode = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSDRIVER drv = NULL; PIDSDRIVER drv = NULL;
lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA)); lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA));
lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA)); lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA));
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -478,14 +478,14 @@ static HRESULT DSPROPERTY_Description1( ...@@ -478,14 +478,14 @@ static HRESULT DSPROPERTY_Description1(
DSDRIVERDESC desc; DSDRIVERDESC desc;
ppd->WaveDeviceId = wid; ppd->WaveDeviceId = wid;
ppd->Devnode = wid; ppd->Devnode = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSCDRIVER drv; PIDSCDRIVER drv;
lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA)); lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA));
lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA)); lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA));
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -510,14 +510,14 @@ static HRESULT DSPROPERTY_Description1( ...@@ -510,14 +510,14 @@ static HRESULT DSPROPERTY_Description1(
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER; ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
ppd->WaveDeviceId = wod; ppd->WaveDeviceId = wod;
ppd->Devnode = wod; ppd->Devnode = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSDRIVER drv = NULL; PIDSDRIVER drv = NULL;
lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA)); lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA));
lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA)); lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA));
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -543,14 +543,14 @@ static HRESULT DSPROPERTY_Description1( ...@@ -543,14 +543,14 @@ static HRESULT DSPROPERTY_Description1(
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE; ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
ppd->WaveDeviceId = wid; ppd->WaveDeviceId = wid;
ppd->Devnode = wid; ppd->Devnode = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSDRIVER drv = NULL; PIDSDRIVER drv = NULL;
lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA)); lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA));
lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA)); lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA));
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveInMessage(UlongToHandle(wid), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -622,7 +622,7 @@ static HRESULT DSPROPERTY_DescriptionA( ...@@ -622,7 +622,7 @@ static HRESULT DSPROPERTY_DescriptionA(
if (IsEqualGUID( &dev_guid, &DSOUND_renderer_guids[wod] ) ) { if (IsEqualGUID( &dev_guid, &DSOUND_renderer_guids[wod] ) ) {
DSDRIVERDESC desc; DSDRIVERDESC desc;
ppd->WaveDeviceId = wod; ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSDRIVER drv = NULL; PIDSDRIVER drv = NULL;
/* FIXME: this is a memory leak */ /* FIXME: this is a memory leak */
...@@ -638,7 +638,7 @@ static HRESULT DSPROPERTY_DescriptionA( ...@@ -638,7 +638,7 @@ static HRESULT DSPROPERTY_DescriptionA(
ppd->Description = szDescription; ppd->Description = szDescription;
ppd->Module = szModule; ppd->Module = szModule;
ppd->Interface = szInterface; ppd->Interface = szInterface;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -671,7 +671,7 @@ static HRESULT DSPROPERTY_DescriptionA( ...@@ -671,7 +671,7 @@ static HRESULT DSPROPERTY_DescriptionA(
if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) { if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) {
DSDRIVERDESC desc; DSDRIVERDESC desc;
ppd->WaveDeviceId = wid; ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSCDRIVER drv; PIDSCDRIVER drv;
/* FIXME: this is a memory leak */ /* FIXME: this is a memory leak */
...@@ -687,7 +687,7 @@ static HRESULT DSPROPERTY_DescriptionA( ...@@ -687,7 +687,7 @@ static HRESULT DSPROPERTY_DescriptionA(
ppd->Description = szDescription; ppd->Description = szDescription;
ppd->Module = szModule; ppd->Module = szModule;
ppd->Interface = szInterface; ppd->Interface = szInterface;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -719,7 +719,7 @@ static HRESULT DSPROPERTY_DescriptionA( ...@@ -719,7 +719,7 @@ static HRESULT DSPROPERTY_DescriptionA(
TRACE("DSOUND_renderer_guids[%d]\n", wod); TRACE("DSOUND_renderer_guids[%d]\n", wod);
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER; ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
ppd->WaveDeviceId = wod; ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSDRIVER drv = NULL; PIDSDRIVER drv = NULL;
/* FIXME: this is a memory leak */ /* FIXME: this is a memory leak */
...@@ -735,7 +735,7 @@ static HRESULT DSPROPERTY_DescriptionA( ...@@ -735,7 +735,7 @@ static HRESULT DSPROPERTY_DescriptionA(
ppd->Description = szDescription; ppd->Description = szDescription;
ppd->Module = szModule; ppd->Module = szModule;
ppd->Interface = szInterface; ppd->Interface = szInterface;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -767,7 +767,7 @@ static HRESULT DSPROPERTY_DescriptionA( ...@@ -767,7 +767,7 @@ static HRESULT DSPROPERTY_DescriptionA(
DSDRIVERDESC desc; DSDRIVERDESC desc;
TRACE("DSOUND_capture_guids[%d]\n", wid); TRACE("DSOUND_capture_guids[%d]\n", wid);
ppd->WaveDeviceId = wid; ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSCDRIVER drv; PIDSCDRIVER drv;
/* FIXME: this is a memory leak */ /* FIXME: this is a memory leak */
...@@ -783,7 +783,7 @@ static HRESULT DSPROPERTY_DescriptionA( ...@@ -783,7 +783,7 @@ static HRESULT DSPROPERTY_DescriptionA(
ppd->Description = szDescription; ppd->Description = szDescription;
ppd->Module = szModule; ppd->Module = szModule;
ppd->Interface = szInterface; ppd->Interface = szInterface;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -863,7 +863,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -863,7 +863,7 @@ static HRESULT DSPROPERTY_DescriptionW(
DSDRIVERDESC desc; DSDRIVERDESC desc;
TRACE("DSOUND_renderer_guids[%d]\n", wod); TRACE("DSOUND_renderer_guids[%d]\n", wod);
ppd->WaveDeviceId = wod; ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSDRIVER drv = NULL; PIDSDRIVER drv = NULL;
/* FIXME: this is a memory leak */ /* FIXME: this is a memory leak */
...@@ -879,7 +879,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -879,7 +879,7 @@ static HRESULT DSPROPERTY_DescriptionW(
ppd->Description = wDescription; ppd->Description = wDescription;
ppd->Module = wModule; ppd->Module = wModule;
ppd->Interface = wInterface; ppd->Interface = wInterface;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -912,7 +912,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -912,7 +912,7 @@ static HRESULT DSPROPERTY_DescriptionW(
if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) { if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) {
DSDRIVERDESC desc; DSDRIVERDESC desc;
ppd->WaveDeviceId = wid; ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSCDRIVER drv; PIDSCDRIVER drv;
/* FIXME: this is a memory leak */ /* FIXME: this is a memory leak */
...@@ -928,7 +928,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -928,7 +928,7 @@ static HRESULT DSPROPERTY_DescriptionW(
ppd->Description = wDescription; ppd->Description = wDescription;
ppd->Module = wModule; ppd->Module = wModule;
ppd->Interface = wInterface; ppd->Interface = wInterface;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -960,7 +960,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -960,7 +960,7 @@ static HRESULT DSPROPERTY_DescriptionW(
TRACE("DSOUND_renderer_guids[%d]\n", wod); TRACE("DSOUND_renderer_guids[%d]\n", wod);
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER; ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
ppd->WaveDeviceId = wod; ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSDRIVER drv = NULL; PIDSDRIVER drv = NULL;
/* FIXME: this is a memory leak */ /* FIXME: this is a memory leak */
...@@ -976,7 +976,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -976,7 +976,7 @@ static HRESULT DSPROPERTY_DescriptionW(
ppd->Description = wDescription; ppd->Description = wDescription;
ppd->Module = wModule; ppd->Module = wModule;
ppd->Interface = wInterface; ppd->Interface = wInterface;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -1008,7 +1008,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -1008,7 +1008,7 @@ static HRESULT DSPROPERTY_DescriptionW(
DSDRIVERDESC desc; DSDRIVERDESC desc;
TRACE("DSOUND_capture_guids[%d]\n", wid); TRACE("DSOUND_capture_guids[%d]\n", wid);
ppd->WaveDeviceId = wid; ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSCDRIVER drv; PIDSCDRIVER drv;
/* FIXME: this is a memory leak */ /* FIXME: this is a memory leak */
...@@ -1024,7 +1024,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -1024,7 +1024,7 @@ static HRESULT DSPROPERTY_DescriptionW(
ppd->Description = wDescription; ppd->Description = wDescription;
ppd->Module = wModule; ppd->Module = wModule;
ppd->Interface = wInterface; ppd->Interface = wInterface;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD; ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -1078,7 +1078,7 @@ static HRESULT DSPROPERTY_Enumerate1( ...@@ -1078,7 +1078,7 @@ static HRESULT DSPROPERTY_Enumerate1(
devs = waveOutGetNumDevs(); devs = waveOutGetNumDevs();
for (wod = 0; wod < devs; ++wod) { for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSCDRIVER drv; PIDSCDRIVER drv;
ZeroMemory(&data, sizeof(data)); ZeroMemory(&data, sizeof(data));
...@@ -1092,7 +1092,7 @@ static HRESULT DSPROPERTY_Enumerate1( ...@@ -1092,7 +1092,7 @@ static HRESULT DSPROPERTY_Enumerate1(
MultiByteToWideChar( CP_ACP, 0, data.ModuleA, -1, data.ModuleW, sizeof(data.ModuleW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, data.ModuleA, -1, data.ModuleW, sizeof(data.ModuleW)/sizeof(WCHAR) );
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED; data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD; data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -1105,7 +1105,7 @@ static HRESULT DSPROPERTY_Enumerate1( ...@@ -1105,7 +1105,7 @@ static HRESULT DSPROPERTY_Enumerate1(
devs = waveInGetNumDevs(); devs = waveInGetNumDevs();
for (wid = 0; wid < devs; ++wid) { for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
PIDSCDRIVER drv; PIDSCDRIVER drv;
ZeroMemory(&data, sizeof(data)); ZeroMemory(&data, sizeof(data));
...@@ -1119,7 +1119,7 @@ static HRESULT DSPROPERTY_Enumerate1( ...@@ -1119,7 +1119,7 @@ static HRESULT DSPROPERTY_Enumerate1(
MultiByteToWideChar( CP_ACP, 0, data.ModuleA, -1, data.ModuleW, sizeof(data.ModuleW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, data.ModuleA, -1, data.ModuleW, sizeof(data.ModuleW)/sizeof(WCHAR) );
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED; data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveInMessage(UlongToHandle(wid), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD; data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -1160,14 +1160,14 @@ static HRESULT DSPROPERTY_EnumerateA( ...@@ -1160,14 +1160,14 @@ static HRESULT DSPROPERTY_EnumerateA(
devs = waveOutGetNumDevs(); devs = waveOutGetNumDevs();
for (wod = 0; wod < devs; ++wod) { for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
DWORD size; DWORD size;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDEVICEINTERFACESIZE,(DWORD_PTR)&size,0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDEVICEINTERFACESIZE,(DWORD_PTR)&size,0));
if (err == DS_OK) { if (err == DS_OK) {
WCHAR * nameW = HeapAlloc(GetProcessHeap(),0,size); WCHAR * nameW = HeapAlloc(GetProcessHeap(),0,size);
if (nameW) { if (nameW) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDEVICEINTERFACE,(DWORD_PTR)nameW,size)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDEVICEINTERFACE,(DWORD_PTR)nameW,size));
if (err == DS_OK) { if (err == DS_OK) {
CHAR * szInterface = HeapAlloc(GetProcessHeap(),0,size/sizeof(WCHAR)); CHAR * szInterface = HeapAlloc(GetProcessHeap(),0,size/sizeof(WCHAR));
if (szInterface) { if (szInterface) {
...@@ -1182,7 +1182,7 @@ static HRESULT DSPROPERTY_EnumerateA( ...@@ -1182,7 +1182,7 @@ static HRESULT DSPROPERTY_EnumerateA(
data.Interface = szInterface; data.Interface = szInterface;
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED; data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD; data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -1201,14 +1201,14 @@ static HRESULT DSPROPERTY_EnumerateA( ...@@ -1201,14 +1201,14 @@ static HRESULT DSPROPERTY_EnumerateA(
devs = waveInGetNumDevs(); devs = waveInGetNumDevs();
for (wid = 0; wid < devs; ++wid) { for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
DWORD size; DWORD size;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDEVICEINTERFACESIZE,(DWORD_PTR)&size,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDEVICEINTERFACESIZE,(DWORD_PTR)&size,0));
if (err == DS_OK) { if (err == DS_OK) {
WCHAR * nameW = HeapAlloc(GetProcessHeap(),0,size); WCHAR * nameW = HeapAlloc(GetProcessHeap(),0,size);
if (nameW) { if (nameW) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDEVICEINTERFACE,(DWORD_PTR)nameW,size)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDEVICEINTERFACE,(DWORD_PTR)nameW,size));
if (err == DS_OK) { if (err == DS_OK) {
CHAR * szInterface = HeapAlloc(GetProcessHeap(),0,size/sizeof(WCHAR)); CHAR * szInterface = HeapAlloc(GetProcessHeap(),0,size/sizeof(WCHAR));
if (szInterface) { if (szInterface) {
...@@ -1223,7 +1223,7 @@ static HRESULT DSPROPERTY_EnumerateA( ...@@ -1223,7 +1223,7 @@ static HRESULT DSPROPERTY_EnumerateA(
data.Interface = szInterface; data.Interface = szInterface;
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED; data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveInMessage(UlongToHandle(wid), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD; data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -1270,17 +1270,17 @@ static HRESULT DSPROPERTY_EnumerateW( ...@@ -1270,17 +1270,17 @@ static HRESULT DSPROPERTY_EnumerateW(
devs = waveOutGetNumDevs(); devs = waveOutGetNumDevs();
for (wod = 0; wod < devs; ++wod) { for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200); WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200); WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200);
if (wDescription && wModule) { if (wDescription && wModule) {
DWORD size; DWORD size;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&size, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod),DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&size, 0));
if (err == DS_OK) { if (err == DS_OK) {
WCHAR * wInterface = HeapAlloc(GetProcessHeap(),0,size); WCHAR * wInterface = HeapAlloc(GetProcessHeap(),0,size);
if (wInterface) { if (wInterface) {
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)wInterface, size)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)wInterface, size));
if (err == DS_OK) { if (err == DS_OK) {
PIDSCDRIVER drv; PIDSCDRIVER drv;
ZeroMemory(&data, sizeof(data)); ZeroMemory(&data, sizeof(data));
...@@ -1296,7 +1296,7 @@ static HRESULT DSPROPERTY_EnumerateW( ...@@ -1296,7 +1296,7 @@ static HRESULT DSPROPERTY_EnumerateW(
data.Interface = wInterface; data.Interface = wInterface;
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED; data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveOutMessage(UlongToHandle(wod), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD; data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
...@@ -1316,17 +1316,17 @@ static HRESULT DSPROPERTY_EnumerateW( ...@@ -1316,17 +1316,17 @@ static HRESULT DSPROPERTY_EnumerateW(
devs = waveInGetNumDevs(); devs = waveInGetNumDevs();
for (wid = 0; wid < devs; ++wid) { for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200); WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200); WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200);
if (wDescription && wModule) { if (wDescription && wModule) {
DWORD size; DWORD size;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&size, 0)); err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&size, 0));
if (err == DS_OK) { if (err == DS_OK) {
WCHAR * wInterface = HeapAlloc(GetProcessHeap(),0,size); WCHAR * wInterface = HeapAlloc(GetProcessHeap(),0,size);
if (wInterface) { if (wInterface) {
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)wInterface, size)); err = mmErr(waveInMessage(UlongToHandle(wid), DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)wInterface, size));
if (err == DS_OK) { if (err == DS_OK) {
PIDSCDRIVER drv; PIDSCDRIVER drv;
ZeroMemory(&data, sizeof(data)); ZeroMemory(&data, sizeof(data));
...@@ -1341,7 +1341,7 @@ static HRESULT DSPROPERTY_EnumerateW( ...@@ -1341,7 +1341,7 @@ static HRESULT DSPROPERTY_EnumerateW(
data.Module = wModule; data.Module = wModule;
data.Interface = wInterface; data.Interface = wInterface;
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED; data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0)); err = mmErr(waveInMessage(UlongToHandle(wid), DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv) if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD; data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment