VirtualBox

Changeset 57717 in vbox for trunk


Ignore:
Timestamp:
Sep 11, 2015 1:52:45 PM (9 years ago)
Author:
vboxsync
Message:

DrvHostDSound: CFGMR3QueryStringAlloc()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp

    r57538 r57717  
    15471547}
    15481548
    1549 static int dsoundConfigQueryStringAlloc(PCFGMNODE pNode, const char *pszName, char **ppszString)
    1550 {
    1551     /** @todo r=bird: What's wrong with CFGMR3QueryStringAlloc ??   */
    1552     size_t cbString;
    1553     int rc = CFGMR3QuerySize(pNode, pszName, &cbString);
     1549static LPCGUID dsoundConfigQueryGUID(PCFGMNODE pCfg, const char *pszName, RTUUID *pUuid)
     1550{
     1551    LPCGUID pGuid = NULL;
     1552
     1553    char *pszGuid = NULL;
     1554    int rc = CFGMR3QueryStringAlloc(pCfg, pszName, &pszGuid);
    15541555    if (RT_SUCCESS(rc))
    1555     {
    1556         char *pszString = RTStrAlloc(cbString);
    1557         if (pszString)
    1558         {
    1559             rc = CFGMR3QueryString(pNode, pszName, pszString, cbString);
    1560             if (RT_SUCCESS(rc))
    1561                 *ppszString = pszString;
    1562             else
    1563                 RTStrFree(pszString);
    1564         }
    1565         else
    1566             rc = VERR_NO_MEMORY;
    1567     }
    1568     return rc;
    1569 }
    1570 
    1571 static LPCGUID dsoundConfigQueryGUID(PCFGMNODE pCfg, const char *pszName, RTUUID *pUuid)
    1572 {
    1573     LPCGUID pGuid = NULL;
    1574 
    1575     char *pszGuid = NULL;
    1576     dsoundConfigQueryStringAlloc(pCfg, pszName, &pszGuid);
    1577     if (pszGuid)
    15781556    {
    15791557        int rc = RTUuidFromStr(pUuid, pszGuid);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette