VirtualBox

Changeset 62979 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Aug 4, 2016 11:12:14 AM (8 years ago)
Author:
vboxsync
Message:

Please, don't use the windows 1.x 'long-pointer' HN. It's obsolete for 20 years.

File:
1 edited

Legend:

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

    r62973 r62979  
    253253
    254254        default:
    255             AssertMsgFailed(("Wave format %ld not supported\n", pCfg->enmFormat));
     255            AssertMsgFailed(("Wave format %d not supported\n", pCfg->enmFormat));
    256256            return VERR_NOT_SUPPORTED;
    257257    }
     
    305305}
    306306
    307 static char *dsoundGUIDToUtf8StrA(LPCGUID lpGUID)
    308 {
    309     if (lpGUID)
     307static char *dsoundGUIDToUtf8StrA(LPCGUID pGUID)
     308{
     309    if (pGUID)
    310310    {
    311311        LPOLESTR lpOLEStr;
    312         HRESULT hr = StringFromCLSID(*lpGUID, &lpOLEStr);
     312        HRESULT hr = StringFromCLSID(*pGUID, &lpOLEStr);
    313313        if (SUCCEEDED(hr))
    314314        {
     
    549549    AssertPtrReturn(pDSoundStream, E_POINTER);
    550550
    551     DSLOG(("DSound: pDSoundStream=%p, cbBufferOut=%ld, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
     551    DSLOG(("DSound: pDSoundStream=%p, cbBufferOut=%RU32, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
    552552           pDSoundStream,
    553553           pThis->cfg.cbBufferOut,
     
    10161016    AssertPtrReturn(pDSoundStream, E_POINTER);
    10171017
    1018     DSLOG(("DSound: pDSoundStream=%p, cbBufferIn=%ld, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
     1018    DSLOG(("DSound: pDSoundStream=%p, cbBufferIn=%RU32, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",
    10191019           pDSoundStream,
    10201020           pThis->cfg.cbBufferIn,
     
    12131213}
    12141214
    1215 static int dsoundDevAdd(PRTLISTANCHOR pList, LPGUID lpGUID, LPCWSTR lpwstrDescription, PDSOUNDDEV *ppDev)
     1215static int dsoundDevAdd(PRTLISTANCHOR pList, LPGUID pGUID, LPCWSTR pwszDescription, PDSOUNDDEV *ppDev)
    12161216{
    12171217    AssertPtrReturn(pList, VERR_INVALID_POINTER);
    1218     AssertPtrReturn(lpGUID, VERR_INVALID_POINTER);
    1219     AssertPtrReturn(lpwstrDescription, VERR_INVALID_POINTER);
     1218    AssertPtrReturn(pGUID, VERR_INVALID_POINTER);
     1219    AssertPtrReturn(pwszDescription, VERR_INVALID_POINTER);
    12201220
    12211221    PDSOUNDDEV pDev = (PDSOUNDDEV)RTMemAlloc(sizeof(DSOUNDDEV));
     
    12231223        return VERR_NO_MEMORY;
    12241224
    1225     int rc = RTUtf16ToUtf8(lpwstrDescription, &pDev->pszName);
     1225    int rc = RTUtf16ToUtf8(pwszDescription, &pDev->pszName);
    12261226    if (RT_SUCCESS(rc))
    1227         memcpy(&pDev->Guid, lpGUID, sizeof(GUID));
     1227        memcpy(&pDev->Guid, pGUID, sizeof(GUID));
    12281228
    12291229    if (RT_SUCCESS(rc))
     
    12491249}
    12501250
    1251 static void dsoundLogDevice(const char *pszType, LPGUID lpGUID, LPCWSTR lpwstrDescription, LPCWSTR lpwstrModule)
    1252 {
    1253     char *pszGUID = dsoundGUIDToUtf8StrA(lpGUID);
     1251static void dsoundLogDevice(const char *pszType, LPGUID pGUID, LPCWSTR pwszDescription, LPCWSTR pwszModule)
     1252{
     1253    char *pszGUID = dsoundGUIDToUtf8StrA(pGUID);
    12541254    /* This always has to be in the release log. */
    1255     LogRel(("DSound: %s: GUID: %s [%ls] (Module: %ls)\n",
    1256             pszType, pszGUID? pszGUID: "{?}", lpwstrDescription, lpwstrModule));
     1255    LogRel(("DSound: %s: GUID: %s [%ls] (Module: %ls)\n", pszType, pszGUID ? pszGUID : "{?}", pwszDescription, pwszModule));
    12571256    RTStrFree(pszGUID);
    12581257}
    12591258
    1260 static BOOL CALLBACK dsoundDevicesEnumCbPlayback(LPGUID lpGUID, LPCWSTR lpwstrDescription, LPCWSTR lpwstrModule, PVOID lpContext)
     1259static BOOL CALLBACK dsoundDevicesEnumCbPlayback(LPGUID pGUID, LPCWSTR pwszDescription, LPCWSTR pwszModule, PVOID lpContext)
    12611260{
    12621261    PDSOUNDENUMCBCTX pCtx = (PDSOUNDENUMCBCTX)lpContext;
     
    12641263    AssertPtrReturn(pCtx->pDrv, FALSE);
    12651264
    1266     if (!lpGUID)
     1265    if (!pGUID)
    12671266        return TRUE;
    12681267
    1269     AssertPtrReturn(lpwstrDescription, FALSE);
    1270     /* Do not care about lpwstrModule. */
     1268    AssertPtrReturn(pwszDescription, FALSE);
     1269    /* Do not care about pwszModule. */
    12711270
    12721271    if (pCtx->fFlags & DSOUNDENUMCBFLAGS_LOG)
    1273         dsoundLogDevice("Output", lpGUID, lpwstrDescription, lpwstrModule);
     1272        dsoundLogDevice("Output", pGUID, pwszDescription, pwszModule);
    12741273
    12751274    int rc = dsoundDevAdd(&pCtx->pDrv->lstDevOutput,
    1276                           lpGUID, lpwstrDescription, NULL /* ppDev */);
     1275                          pGUID, pwszDescription, NULL /* ppDev */);
    12771276    if (RT_FAILURE(rc))
    12781277        return FALSE; /* Abort enumeration. */
     
    12831282}
    12841283
    1285 static BOOL CALLBACK dsoundDevicesEnumCbCapture(LPGUID lpGUID, LPCWSTR lpwstrDescription, LPCWSTR lpwstrModule, PVOID lpContext)
     1284static BOOL CALLBACK dsoundDevicesEnumCbCapture(LPGUID pGUID, LPCWSTR pwszDescription, LPCWSTR pwszModule, PVOID lpContext)
    12861285{
    12871286    PDSOUNDENUMCBCTX pCtx = (PDSOUNDENUMCBCTX)lpContext;
     
    12891288    AssertPtrReturn(pCtx->pDrv, FALSE);
    12901289
    1291     if (!lpGUID)
     1290    if (!pGUID)
    12921291        return TRUE;
    12931292
    12941293    if (pCtx->fFlags & DSOUNDENUMCBFLAGS_LOG)
    1295         dsoundLogDevice("Input", lpGUID, lpwstrDescription, lpwstrModule);
     1294        dsoundLogDevice("Input", pGUID, pwszDescription, pwszModule);
    12961295
    12971296    int rc = dsoundDevAdd(&pCtx->pDrv->lstDevInput,
    1298                           lpGUID, lpwstrDescription, NULL /* ppDev */);
     1297                          pGUID, pwszDescription, NULL /* ppDev */);
    12991298    if (RT_FAILURE(rc))
    13001299        return FALSE; /* Abort enumeration. */
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