Index: /trunk/include/iprt/mangling.h
===================================================================
--- /trunk/include/iprt/mangling.h	(revision 43212)
+++ /trunk/include/iprt/mangling.h	(revision 43213)
@@ -1197,5 +1197,5 @@
 # define RTSocketClose                                  RT_MANGLER(RTSocketClose)
 # define RTSocketFromNative                             RT_MANGLER(RTSocketFromNative)
-# define RTSocketGetAddrInfo                            RT_MANGLER(RTSocketGetAddrInfo)
+# define RTSocketQueryAddressStr                        RT_MANGLER(RTSocketQueryAddressStr)
 # define RTSocketGetLocalAddress                        RT_MANGLER(RTSocketGetLocalAddress)
 # define RTSocketGetPeerAddress                         RT_MANGLER(RTSocketGetPeerAddress)
Index: /trunk/include/iprt/socket.h
===================================================================
--- /trunk/include/iprt/socket.h	(revision 43212)
+++ /trunk/include/iprt/socket.h	(revision 43213)
@@ -130,12 +130,8 @@
  * Try resolve a host name, returning the first matching address.
  *
- * @remarks Gets the ip addresses of a hostname via getaddrinfo(). It returns
- *          only the first result for the moment, but this will change with the
- *          upcoming IPv6 struct.
- *
  * @returns IPRT status code.
  * @param   pszHost         Name or IP address to look up.
- * @param   pszResult       Where to return the result.
- * @param   pcbResult       Input: The size of the @a pszResult buffer.
+ * @param   pszAddress      Where to return the stringified address.
+ * @param   pcbAddress      Input: The size of the @a pszResult buffer.
  *                          Output: size of the returned string.  This is set on
  *                          VERR_BUFFER_OVERFLOW and most other error statuses.
@@ -148,5 +144,5 @@
  *                          Not modified on failure.
  */
-RTDECL(int) RTSocketGetAddrInfo(const char *pszHost, char *pszResult, size_t *pcbResult, PRTNETADDRTYPE penmAddrType);
+RTDECL(int) RTSocketQueryAddressStr(const char *pszHost, char *pszAddress, size_t *pcbAddress, PRTNETADDRTYPE penmAddrType);
 
 /**
Index: /trunk/src/VBox/ExtPacks/VNC/VBoxVNC.cpp
===================================================================
--- /trunk/src/VBox/ExtPacks/VNC/VBoxVNC.cpp	(revision 43212)
+++ /trunk/src/VBox/ExtPacks/VNC/VBoxVNC.cpp	(revision 43213)
@@ -337,5 +337,5 @@
     uint32_t cbOut = 0;
     size_t resSize = 0;
-    RTNETADDRTYPE iAddrType = RTNETADDRTYPE_INVALID;
+    RTNETADDRTYPE enmAddrType;
     char *pszTCPAddress = NULL;
     char *pszTCPPort = NULL;
@@ -346,6 +346,6 @@
     char *pszServerAddress4 = NULL;
     char *pszServerAddress6 = NULL;
-    char *pszGetAddrInfo4 = NULL; // used to store the result of RTSocketGetAddrInfo()
-    char *pszGetAddrInfo6 = NULL; // used to store the result of RTSocketGetAddrInfo()
+    char *pszGetAddrInfo4 = NULL; // used to store the result of RTSocketQueryAddressStr()
+    char *pszGetAddrInfo6 = NULL; // used to store the result of RTSocketQueryAddressStr()
 
     // get address
@@ -383,4 +383,7 @@
     pVRDEFeature->u32ClientId = 0;
 
+    /** @todo r=bird: I believe this code is more than a little of confused
+     *        about how to use RTStrCopy...  The 2nd parameter is the size of the
+     *        destination buffer, not the size of the source string!!   */
     RTStrCopy(pVRDEFeature->achInfo, 19, "Property/TCP/Ports");
 
@@ -404,6 +407,5 @@
     const uint32_t lVNCAddress4FeatureSize = sizeof(VRDEFEATURE) + 24;
 
-    pszVNCAddress4 = (char *) RTMemTmpAlloc(24);
-    memset(pszVNCAddress4,'\0',24);
+    pszVNCAddress4 = (char *) RTMemTmpAllocZ(24);
 
     pVRDEFeature->u32ClientId = 0;
@@ -454,6 +456,5 @@
     rc = -1;
 
-    pszVNCAddress6 = (char *) RTMemTmpAlloc(VNC_ADDRESS_OPTION_MAX);
-    memset(pszVNCAddress6,'\0',VNC_ADDRESS_OPTION_MAX);
+    pszVNCAddress6 = (char *) RTMemTmpAllocZ(VNC_ADDRESS_OPTION_MAX);
 
     pVRDEFeature->u32ClientId = 0;
@@ -476,6 +477,5 @@
 
     // VNCPort6
-    pszVNCPort6 = (char *) RTMemTmpAlloc(6);
-    memset(pszVNCPort6,'\0', 6);
+    pszVNCPort6 = (char *) RTMemTmpAllocZ(6);
 
     pVRDEFeature->u32ClientId = 0;
@@ -573,10 +573,9 @@
     {
         // here we go, we prefer IPv6 over IPv4;
-        pszGetAddrInfo6 = (char *) RTMemTmpAlloc(42);
-        memset(pszGetAddrInfo6, '\0', 42);
         resSize = 42;
-        iAddrType = RTNETADDRTYPE_IPV6;
-
-        rc = RTSocketGetAddrInfo(pszTCPAddress, pszGetAddrInfo6, &resSize, &iAddrType);
+        pszGetAddrInfo6 = (char *) RTMemTmpAllocZ(resSize);
+        enmAddrType = RTNETADDRTYPE_IPV6;
+
+        rc = RTSocketQueryAddressStr(pszTCPAddress, pszGetAddrInfo6, &resSize, &enmAddrType);
 
         if (RT_SUCCESS(rc))
@@ -593,10 +592,9 @@
         if (!pszServerAddress6)
         {
-            pszGetAddrInfo4 = (char *) RTMemTmpAlloc(16);
-            memset(pszGetAddrInfo4,'\0',16);
             resSize = 16;
-            iAddrType = RTNETADDRTYPE_IPV4;
-
-            rc = RTSocketGetAddrInfo(pszTCPAddress, pszGetAddrInfo4, &resSize, &iAddrType);
+            pszGetAddrInfo4 = (char *) RTMemTmpAllocZ(resSize);
+            enmAddrType = RTNETADDRTYPE_IPV4;
+
+            rc = RTSocketQueryAddressStr(pszTCPAddress, pszGetAddrInfo4, &resSize, &enmAddrType);
 
             if (RT_SUCCESS(rc))
@@ -614,10 +612,9 @@
     if (!pszServerAddress4 && strlen(pszVNCAddress4) > 0)
     {
-        pszGetAddrInfo4 = (char *) RTMemTmpAlloc(16);
-        memset(pszGetAddrInfo4,'\0',16);
         resSize = 16;
-        iAddrType = RTNETADDRTYPE_IPV4;
-
-        rc = RTSocketGetAddrInfo(pszVNCAddress4, pszGetAddrInfo4, &resSize, &iAddrType);
+        pszGetAddrInfo4 = (char *) RTMemTmpAllocZ(resSize);
+        enmAddrType = RTNETADDRTYPE_IPV4;
+
+        rc = RTSocketQueryAddressStr(pszVNCAddress4, pszGetAddrInfo4, &resSize, &enmAddrType);
 
         if (RT_SUCCESS(rc))
@@ -628,10 +625,9 @@
     if (!pszServerAddress6 && strlen(pszVNCAddress6) > 0)
     {
-        pszGetAddrInfo6 = (char *) RTMemTmpAlloc(42);
-        memset(pszGetAddrInfo6, '\0', 42);
         resSize = 42;
-        iAddrType = RTNETADDRTYPE_IPV6;
-
-        rc = RTSocketGetAddrInfo(pszVNCAddress6, pszGetAddrInfo6, &resSize, &iAddrType);
+        pszGetAddrInfo6 = (char *) RTMemTmpAllocZ(resSize);
+        enmAddrType = RTNETADDRTYPE_IPV6;
+
+        rc = RTSocketQueryAddressStr(pszVNCAddress6, pszGetAddrInfo6, &resSize, &enmAddrType);
 
         if (RT_SUCCESS(rc))
Index: /trunk/src/VBox/Runtime/r3/socket.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/socket.cpp	(revision 43212)
+++ /trunk/src/VBox/Runtime/r3/socket.cpp	(revision 43213)
@@ -685,10 +685,8 @@
 
 /*
- * new function to allow both ipv4 and ipv6 addresses to be resolved.
- * breaks compatibility with windows before 2000
- * will change when the new ipv6 struct will be added
- * temporary solution
- */
-RTDECL(int) RTSocketGetAddrInfo(const char *pszHost, char *pszResult, size_t *pcbResult, PRTNETADDRTYPE penmAddrType)
+ * New function to allow both ipv4 and ipv6 addresses to be resolved.
+ * Breaks compatibility with windows before 2000.
+ */
+RTDECL(int) RTSocketQueryAddressStr(const char *pszHost, char *pszResult, size_t *pcbResult, PRTNETADDRTYPE penmAddrType)
 {
     AssertPtrReturn(pszHost, VERR_INVALID_POINTER);
