[wdmaudiodev] 'Incorrect function' on querying KSPROPERTY_TYPE_BASICSUPPORT from user mode

  • From: "alexander ivash" <elderorb@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 08 Sep 2016 02:53:27 +0300

What I'm doing wrong?

....

hr = pM->BindToObject(0, 0, __uuidof(IBaseFilter), (void**)&pFilt);

CComPtr<IKsControl> ctrl;
hr = pFilt->QueryInterface(__uuidof(IKsControl), (void **)&ctrl);

KSNODEPROPERTY_AUDIO_CHANNEL      cmd;
ZeroMemory(&cmd, sizeof(cmd));

cmd.NodeProperty.Property.Set = KSPROPSETID_Audio;
cmd.NodeProperty.Property.Id = KSPROPERTY_AUDIO_VOLUMELEVEL;
cmd.NodeProperty.Property.Flags = KSPROPERTY_TYPE_BASICSUPPORT | KSPROPERTY_TYPE_TOPOLOGY;
cmd.NodeProperty.NodeId = 1;
cmd.Channel = 0;
cmd.Reserved = 0;

HRESULT result = ctrl->KsProperty(&cmd.NodeProperty.Property, sizeof(cmd), &desc, sizeof(desc), &sz);

This code returns 'Incorrect function'. NodeId is '1', because in the driver this is KSNODETYPE_VOLUME. If I change it for example on '0' - then error code becomes 'Element not found'.
******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: