Changeset 57639 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Sep 7, 2015 11:45:55 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 102525
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
r57370 r57639 56 56 #define VBOX_NETCFG_LOCK_TIME_OUT 5000 /** @todo r=bird: What does this do? */ 57 57 58 59 /* 60 * For some weird reason we do not want to use IPRT here, hence the following 61 * function provides a replacement for BstrFmt. 62 */ 63 static bstr_t bstr_printf(const char *cszFmt, ...) 64 { 65 char szBuffer[4096]; 66 szBuffer[sizeof(szBuffer) - 1] = 0; /* Make sure the string will be null-terminated */ 67 va_list va; 68 va_start(va, cszFmt); 69 _vsnprintf(szBuffer, sizeof(szBuffer) - 1, cszFmt, va); 70 va_end(va); 71 return bstr_t(szBuffer); 72 } 58 73 59 74 static HRESULT vboxNetCfgWinINetCfgLock(IN INetCfg *pNetCfg, … … 2463 2478 hrc = E_FAIL; \ 2464 2479 NonStandardLog strAndArgs; \ 2480 bstrError = bstr_printf strAndArgs; \ 2465 2481 break; \ 2466 2482 } else do {} while (0) … … 2469 2485 { 2470 2486 HRESULT hrc = S_OK; 2487 bstr_t bstrError; 2471 2488 2472 2489 do … … 2668 2685 while (0); 2669 2686 2687 if (pErrMsg && bstrError.length()) 2688 *pErrMsg = bstrError.Detach(); 2689 2670 2690 return hrc; 2671 2691 } … … 2691 2711 WCHAR DevName[256]; 2692 2712 HKEY hkey = (HKEY)INVALID_HANDLE_VALUE; 2713 bstr_t bstrError; 2693 2714 2694 2715 do … … 3120 3141 NonStandardLogFlow(("VBoxNetCfgWinQueryINetCfg failed, hr 0x%x\n", hr)); 3121 3142 } 3143 3144 if (pErrMsg && bstrError.length()) 3145 *pErrMsg = bstrError.Detach(); 3146 3122 3147 return hrc; 3123 3148 }
Note:
See TracChangeset
for help on using the changeset viewer.