]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Library/PeCoffGetEntryPointLib.h
PeCoffGetEntryPointLib: Fix spelling issue
[mirror_edk2.git] / MdePkg / Include / Library / PeCoffGetEntryPointLib.h
... / ...
CommitLineData
1/** @file\r
2 Provides a service to retrieve the PE/COFF entry point from a PE/COFF image.\r
3\r
4Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials are licensed and made available under \r
6the terms and conditions of the BSD License that accompanies this distribution. \r
7The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php. \r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13**/\r
14\r
15#ifndef __PE_COFF_GET_ENTRY_POINT_LIB_H__\r
16#define __PE_COFF_GET_ENTRY_POINT_LIB_H__\r
17\r
18/**\r
19 Retrieves and returns a pointer to the entry point to a PE/COFF image that has been loaded\r
20 into system memory with the PE/COFF Loader Library functions.\r
21\r
22 Retrieves the entry point to the PE/COFF image specified by Pe32Data and returns this entry\r
23 point in EntryPoint. If the entry point could not be retrieved from the PE/COFF image, then\r
24 return RETURN_INVALID_PARAMETER. Otherwise return RETURN_SUCCESS.\r
25 If Pe32Data is NULL, then ASSERT().\r
26 If EntryPoint is NULL, then ASSERT().\r
27\r
28 @param Pe32Data The pointer to the PE/COFF image that is loaded in system memory.\r
29 @param EntryPoint The pointer to entry point to the PE/COFF image to return.\r
30\r
31 @retval RETURN_SUCCESS EntryPoint was returned.\r
32 @retval RETURN_INVALID_PARAMETER The entry point could not be found in the PE/COFF image.\r
33\r
34**/\r
35RETURN_STATUS\r
36EFIAPI\r
37PeCoffLoaderGetEntryPoint (\r
38 IN VOID *Pe32Data,\r
39 OUT VOID **EntryPoint\r
40 );\r
41\r
42/**\r
43 Returns the machine type of a PE/COFF image.\r
44\r
45 Returns the machine type from the PE/COFF image specified by Pe32Data.\r
46 If Pe32Data is NULL, then ASSERT().\r
47\r
48 @param Pe32Data The pointer to the PE/COFF image that is loaded in system\r
49 memory.\r
50\r
51 @return Machine type or zero if not a valid image.\r
52\r
53**/\r
54UINT16\r
55EFIAPI\r
56PeCoffLoaderGetMachineType (\r
57 IN VOID *Pe32Data\r
58 );\r
59\r
60/**\r
61 Returns a pointer to the PDB file name for a PE/COFF image that has been\r
62 loaded into system memory with the PE/COFF Loader Library functions. \r
63\r
64 Returns the PDB file name for the PE/COFF image specified by Pe32Data. If\r
65 the PE/COFF image specified by Pe32Data is not a valid, then NULL is\r
66 returned. If the PE/COFF image specified by Pe32Data does not contain a\r
67 debug directory entry, then NULL is returned. If the debug directory entry\r
68 in the PE/COFF image specified by Pe32Data does not contain a PDB file name,\r
69 then NULL is returned.\r
70 If Pe32Data is NULL, then ASSERT().\r
71\r
72 @param Pe32Data The pointer to the PE/COFF image that is loaded in system\r
73 memory.\r
74\r
75 @return The PDB file name for the PE/COFF image specified by Pe32Data, or NULL\r
76 if it cannot be retrieved.\r
77\r
78**/\r
79VOID *\r
80EFIAPI\r
81PeCoffLoaderGetPdbPointer (\r
82 IN VOID *Pe32Data\r
83 );\r
84\r
85\r
86/**\r
87 Returns the size of the PE/COFF headers\r
88\r
89 Returns the size of the PE/COFF header specified by Pe32Data.\r
90 If Pe32Data is NULL, then ASSERT().\r
91\r
92 @param Pe32Data The pointer to the PE/COFF image that is loaded in system\r
93 memory.\r
94\r
95 @return Size of PE/COFF header in bytes, or zero if not a valid image.\r
96\r
97**/\r
98UINT32\r
99EFIAPI\r
100PeCoffGetSizeOfHeaders (\r
101 IN VOID *Pe32Data\r
102 );\r
103\r
104/**\r
105 Returns PE/COFF image base specified by the address in this PE/COFF image.\r
106\r
107 On DEBUG build, searches the PE/COFF image base forward the address in this\r
108 PE/COFF image and returns it.\r
109\r
110 @param Address Address located in one PE/COFF image.\r
111\r
112 @retval 0 RELEASE build or cannot find the PE/COFF image base.\r
113 @retval others PE/COFF image base found.\r
114\r
115**/\r
116UINTN\r
117EFIAPI\r
118PeCoffSearchImageBase (\r
119 IN UINTN Address\r
120 );\r
121\r
122#endif\r