]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/Library/DxeWinNtLib/WinNtLib.c
Success to build first Nt32 module.
[mirror_edk2.git] / Nt32Pkg / Library / DxeWinNtLib / WinNtLib.c
diff --git a/Nt32Pkg/Library/DxeWinNtLib/WinNtLib.c b/Nt32Pkg/Library/DxeWinNtLib/WinNtLib.c
new file mode 100644 (file)
index 0000000..ef04eca
--- /dev/null
@@ -0,0 +1,53 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation                                                         \r
+All rights reserved. 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
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  WinNtLib.c\r
+\r
+Abstract:\r
+\r
+  WinNt Library \r
+\r
+--*/\r
+\r
+\r
+\r
+//\r
+// Include common header file for this module.\r
+//\r
+#include "CommonHeader.h"\r
+\r
+EFI_WIN_NT_THUNK_PROTOCOL *gWinNt;\r
+\r
+EFI_STATUS\r
+WinNtLibConstructor (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  EFI_HOB_GUID_TYPE        *GuidHob;\r
+\r
+  GuidHob = GetFirstGuidHob (&gEfiWinNtThunkProtocolGuid);\r
+  ASSERT (GuidHob != NULL);\r
+  gWinNt = (EFI_WIN_NT_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));\r
+  ASSERT (gWinNt != NULL);\r
+  return EFI_SUCCESS;\r
+}\r