/[AnywhereTS-MSSQL]/trunk/TSAdminTool/TerminalServices.cs
ViewVC logotype

Diff of /trunk/TSAdminTool/TerminalServices.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/TSAdminTool/TerminalServices.cs	2012/08/26 02:29:18	311
+++ trunk/TSAdminTool/TerminalServices.cs	2012/08/26 02:35:34	312
@@ -102,11 +102,6 @@
         [DllImport("wtsapi32.dll")]
         static extern void WTSFreeMemory(IntPtr pMemory);
 
-        // For Lookup of MAC address
-        [DllImport("iphlpapi.dll", ExactSpelling = true)]
-        public static extern int SendARP(int DestIP, int SrcIP, [Out] byte[]
-        pMacAddr, ref int PhyAddrLen);
-
         // Consts
         public const int WTS_CURRENT_SESSION = -1;
 
@@ -450,31 +445,6 @@
         }
 
 
-       // Get Mac from IP, using ARP
-        private static string GetMACFromIP(string ipString)
-        {
-
-            IPAddress ip = IPAddress.Parse(ipString); // Actual IP
-            int rv;
-            string macStr;
-            byte[] mac = new byte[6];
-            int maclen = mac.Length;
-
-            rv = SendARP(BitConverter.ToInt32(ip.GetAddressBytes(), 0), 0, mac, ref maclen);
-            if (rv == 0) // If not 0, error
-            {
-                // macStr = BitConverter.ToString(mac, 0, 6);
-                macStr = BitConverter.ToString(mac, 0, 1)+BitConverter.ToString(mac, 1, 1)+BitConverter.ToString(mac, 2, 1)
-                    +BitConverter.ToString(mac, 3, 1)+BitConverter.ToString(mac, 4, 1)+BitConverter.ToString(mac, 5, 1);
-            }
-            else
-            {
-                macStr = "";
-            }
-            return macStr;
-        }
-
-
         private static string GetTSUserName(int sessionID, IntPtr server)
         {
             System.IntPtr ppBuffer = System.IntPtr.Zero;

 

  ViewVC Help
Powered by ViewVC 1.1.22