VirtualBox

Changeset 26587 in vbox for trunk/src/VBox/Main/win


Ignore:
Timestamp:
Feb 16, 2010 4:57:09 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57775
Message:

Main: Bstr makeover (second attempt) -- make Bstr(NULL) and Bstr() behave the same; resulting cleanup; make some more internal methods use Utf8Str instead of Bstr; fix a lot of CheckComArgNotNull?() usage

Location:
trunk/src/VBox/Main/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/win/NetIf-win.cpp

    r26186 r26587  
    908908    if(hr == S_OK)
    909909    {
    910         size_t cUnicodeName = wcslen(lpszName) + 1;
    911         size_t uniLen = (cUnicodeName * 2 + sizeof (OLECHAR) - 1) / sizeof (OLECHAR);
    912         Bstr name (uniLen + 1 /* extra zero */);
    913         wcscpy((wchar_t *) name.mutableRaw(), lpszName);
     910        Bstr name(lpszName);
    914911
    915912        hr = pncc->GetInstanceGuid(&IfGuid);
  • trunk/src/VBox/Main/win/svcmain.cpp

    r26186 r26587  
    231231
    232232                if (*lpszToken != NULL)
    233                 {
    234                     Bstr str (lpszToken);
    235                     LPCTSTR lpszToken2 = FindOneOf(lpszToken, szTokens);
    236                     if (lpszToken2)
    237                         str.mutableRaw()[lpszToken2 - lpszToken] = '\0';
    238233                    pipeName = Utf8Str(lpszToken);
    239                 }
    240234            }
    241235
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