- Timestamp:
- May 31, 2007 11:26:17 AM (18 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Makefile.kmk
r2784 r2960 334 334 Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK 335 335 Drivers_DEFS = IN_IDE_R3 336 Drivers_DEFS.win.x86 += _WIN32_WINNT=0x0500 337 Drivers_DEFS.win.amd64 += _WIN32_WINNT=0x0510 336 338 Drivers_INCS := \ 337 339 $(PATH_SUB_CURRENT) \ -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r2959 r2960 16 16 const char **ppszDomain) 17 17 { 18 int rc = 0; 18 19 FIXED_INFO *FixedInfo=NULL; 19 20 ULONG BufLen; … … 21 22 IP_ADDR_STRING *pIPAddr; 22 23 struct in_addr tmp_addr; 23 24 *ppszDomain = NULL;25 /** @todo implement search list for Windows host. */26 24 27 25 FixedInfo = (FIXED_INFO *)GlobalAlloc(GPTR, sizeof(FIXED_INFO)); … … 42 40 FixedInfo = NULL; 43 41 } 44 return -1; 42 rc = -1; 43 goto get_dns_prefix; 45 44 } 46 45 … … 60 59 FixedInfo = NULL; 61 60 } 62 return 0; 61 62 get_dns_prefix: 63 *ppszDomain = NULL; 64 { 65 OSVERSIONINFO ver; 66 char szDnsDomain[256]; 67 DWORD dwSize = sizeof(szDnsDomain); 68 69 GetVersionEx(&ver); 70 if (ver.dwMajorVersion >= 5) 71 { 72 /* GetComputerNameEx exists in Windows versions starting with 2000. */ 73 if (GetComputerNameEx(ComputerNameDnsDomain, szDnsDomain, &dwSize)) 74 { 75 if (szDnsDomain[0]) 76 { 77 /* Just non-empty strings are valid. */ 78 *ppszDomain = RTStrDup(szDnsDomain); 79 if (pData->fPassDomain) 80 LogRel(("NAT: passing domain name %s\n", szDnsDomain)); 81 else 82 Log(("nat: ignoring domain %s\n", szDnsDomain)); 83 } 84 } 85 else 86 Log(("nat: GetComputerNameEx failed (%d)\n", GetLastError())); 87 } 88 } 89 return rc; 63 90 } 64 91
Note:
See TracChangeset
for help on using the changeset viewer.