void InitializeDirectSoundPage(PDXDIAG_CONTEXT pContext) { HRESULT hResult; /* create DSound object */ // if (hResult != DS_OK) // return; hResult = DirectSoundEnumerateW(DSEnumCallback, pContext); /* release the DSound object */ // pObj->lpVtbl->Release(pObj); (void)hResult; }
/*************************************************************************** * DirectSoundEnumerateA [DSOUND.2] * * Enumerate all DirectSound drivers installed in the system * * PARAMS * lpDSEnumCallback [I] Address of callback function. * lpContext [I] Address of user defined context passed to callback function. * * RETURNS * Success: DS_OK * Failure: DSERR_INVALIDPARAM */ HRESULT WINAPI DirectSoundEnumerateA( LPDSENUMCALLBACKA lpDSEnumCallback, LPVOID lpContext) { struct morecontext context; if (lpDSEnumCallback == NULL) { WARN("invalid parameter: lpDSEnumCallback == NULL\n"); return DSERR_INVALIDPARAM; } context.callA = lpDSEnumCallback; context.data = lpContext; return DirectSoundEnumerateW(a_to_w_callback, &context); }
void enum_sound_play_devices(device_enum_callback *lpDSEnumCallback, LPVOID lpContext) { DirectSoundEnumerateW(lpDSEnumCallback,lpContext); }