]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/SnpNt32Dxe/SnpNt32.c
We enabled X64 native version NT32, and made it works on Windows 7 X64 OS.
[mirror_edk2.git] / Nt32Pkg / SnpNt32Dxe / SnpNt32.c
index 86414696c418e88c5f9379f1a12948dbd61eca5b..4dee182ad839db051532ea6d4c27d1c7a65fcff0 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -704,7 +704,7 @@ SnpNt32ReceiveFilters (
   ReturnValue = GlobalData->NtNetUtilityTable.SetReceiveFilter (\r
                                                 Instance->InterfaceInfo.InterfaceIndex,\r
                                                 EnableBits,\r
-                                                McastFilterCount,\r
+                                                (UINT32)McastFilterCount,\r
                                                 McastFilter\r
                                                 );\r
 \r
@@ -863,7 +863,7 @@ SnpNt32GetStatus (
 {\r
 \r
   if (TxBuffer != NULL) {\r
-    *((UINT8 **) TxBuffer) = (UINT8 *) 1;\r
+    *((UINT8 **) TxBuffer) = (UINT8 *)(UINTN) 1;\r
   }\r
 \r
   if (InterruptStatus != NULL) {\r
@@ -933,8 +933,8 @@ SnpNt32Transmit (
 \r
   ReturnValue = GlobalData->NtNetUtilityTable.Transmit (\r
                                                 Instance->InterfaceInfo.InterfaceIndex,\r
-                                                HeaderSize,\r
-                                                BufferSize,\r
+                                                (UINT32)HeaderSize,\r
+                                                (UINT32)BufferSize,\r
                                                 Buffer,\r
                                                 SrcAddr,\r
                                                 DestAddr,\r
@@ -1189,7 +1189,7 @@ SnpNt32InitializeGlobalData (
     //\r
     //  Set the interface information.\r
     //\r
-    Instance->InterfaceInfo = NetInterfaceInfoBuffer[Index];\r
+    CopyMem (&Instance->InterfaceInfo, &NetInterfaceInfoBuffer[Index], sizeof(Instance->InterfaceInfo));\r
     //\r
     //  Initialize this instance\r
     //\r
@@ -1265,8 +1265,8 @@ SnpNt32InitializeInstanceData (
   //\r
   //  Copy Current/PermanentAddress MAC address\r
   //\r
-  Instance->Mode.CurrentAddress   = Instance->InterfaceInfo.MacAddr;\r
-  Instance->Mode.PermanentAddress = Instance->InterfaceInfo.MacAddr;\r
+  CopyMem (&Instance->Mode.CurrentAddress, &Instance->InterfaceInfo.MacAddr, sizeof(Instance->Mode.CurrentAddress));\r
+  CopyMem (&Instance->Mode.PermanentAddress, &Instance->InterfaceInfo.MacAddr, sizeof(Instance->Mode.PermanentAddress));\r
 \r
   //\r
   //  Since the fake SNP is based on a real NIC, to avoid conflict with the host\r