[wdmaudiodev] Re: Friendlyname for KS-device...

  • From: "Mike Garrett" <mike.garrett@xxxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 29 Jan 2003 06:46:21 -0600

Tobias,

I recently went through the same problem.
SetupDiGetDeviceRegistryProperty() was a bust.  However, this worked
when added to the pin enumeration routine (enum.cpp,
CKsEnumFilters::EnumFilters if you are using the DirectKS sample):


        // Get Device Friendly Name
        HKEY hkey=SetupDiOpenDeviceInterfaceRegKey(hDevInfo,&DID,0,
KEY_SET_VALUE|KEY_QUERY_VALUE);
        if (hkey!=INVALID_HANDLE_VALUE)
        {                                                       
                TCHAR szFriendlyName[MAX_PATH];
                DWORD dwmess = sizeof(szFriendlyName);
                DWORD dwtype;
                if (ERROR_SUCCESS ==  RegQueryValueEx(
                                                                hkey,
        
TEXT("FriendlyName"),
                                                                0,
                                                                &dwtype,
                                                                (LPBYTE)
szFriendlyName,
        
&dwmess))
                        _tcscpy(pnewFilter->m_szFriendlyName,
szFriendlyName);
                RegCloseKey(hkey);
        }


Mike

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of wdm
Sent: Tuesday, January 28, 2003 4:13 AM
To: 'wdmaudiodev@xxxxxxxxxxxxx'
Subject: [wdmaudiodev] Friendlyname for KS-device...



...apart from my success with low latency figures,
I still have a problem concerning my "user-interface".

I want to let the user select the ks-device he wants
to use for streaming.  So I thought the thing to do is
call "SetupDiGetDeviceRegistryProperty" for the value
of "SPDRP_FRIENDLYNAME".

Unfortunately this call always returned with error-
code 13 (ERROR_INVALID_DATA).

Martin told me to try to use the KSUSER alias. 
I must admit though, that I'm not that familiar
with this whole streaming-architecture yet.

So if anyone could give me a hint on how to either
get the friendlyname or how to use the "KSUSER alias"
to perhaps do so I'd be really glad.

Best regards,
Tobias
******************

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.de/




******************

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.de/

Other related posts: