Mercurial > mplayer.hg
annotate loader/wine/pe_image.h @ 27499:1dfad1b382fa
libass: fix type mismatch between size parameter and the way it's used
author | aurel |
---|---|
date | Fri, 05 Sep 2008 22:59:01 +0000 |
parents | a8ea87c71d18 |
children | 9e739bdb049c |
rev | line source |
---|---|
26045 | 1 #ifndef MPLAYER_PE_IMAGE_H |
2 #define MPLAYER_PE_IMAGE_H | |
1 | 3 |
7386 | 4 #include "winnt.h" |
1 | 5 #include "winbase.h" |
6 | |
7 #define PE_HEADER(module) \ | |
8 ((IMAGE_NT_HEADERS*)((LPBYTE)(module) + \ | |
9 (((IMAGE_DOS_HEADER*)(module))->e_lfanew))) | |
10 | |
11 #define PE_SECTIONS(module) \ | |
12 ((IMAGE_SECTION_HEADER*)((LPBYTE)&PE_HEADER(module)->OptionalHeader + \ | |
13 PE_HEADER(module)->FileHeader.SizeOfOptionalHeader)) | |
14 | |
15 #define RVA_PTR(module,field) ((LPBYTE)(module) + PE_HEADER(module)->field) | |
16 | |
17 /* modreference used for attached processes | |
18 * all section are calculated here, relocations etc. | |
19 */ | |
20 typedef struct { | |
21 PIMAGE_IMPORT_DESCRIPTOR pe_import; | |
22 PIMAGE_EXPORT_DIRECTORY pe_export; | |
23 PIMAGE_RESOURCE_DIRECTORY pe_resource; | |
24 int tlsindex; | |
25 } PE_MODREF; | |
26 | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
27 struct wine_modref; |
1 | 28 extern int PE_unloadImage(HMODULE hModule); |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
29 extern FARPROC PE_FindExportedFunction(struct wine_modref *wm, LPCSTR funcName, WIN_BOOL snoop); |
1 | 30 extern WIN_BOOL PE_EnumResourceTypesA(HMODULE,ENUMRESTYPEPROCA,LONG); |
31 extern WIN_BOOL PE_EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG); | |
32 extern WIN_BOOL PE_EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,LONG); | |
33 extern WIN_BOOL PE_EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROCW,LONG); | |
34 extern WIN_BOOL PE_EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,ENUMRESLANGPROCA,LONG); | |
35 extern WIN_BOOL PE_EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,ENUMRESLANGPROCW,LONG); | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
36 extern HRSRC PE_FindResourceExW(struct wine_modref*, LPCWSTR, LPCWSTR, WORD); |
1 | 37 extern DWORD PE_SizeofResource(HMODULE,HRSRC); |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
38 extern struct wine_modref *PE_LoadLibraryExA(LPCSTR, DWORD); |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
39 extern void PE_UnloadLibrary(struct wine_modref *); |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
40 extern HGLOBAL PE_LoadResource(struct wine_modref *wm, HRSRC); |
1 | 41 extern HMODULE PE_LoadImage( int hFile, LPCSTR filename, WORD *version ); |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
42 extern struct wine_modref *PE_CreateModule( HMODULE hModule, LPCSTR filename, |
1 | 43 DWORD flags, WIN_BOOL builtin ); |
44 extern WIN_BOOL PE_CreateProcess( HANDLE hFile, LPCSTR filename, LPCSTR cmd_line, LPCSTR env, | |
45 LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa, | |
46 WIN_BOOL inherit, DWORD flags, LPSTARTUPINFOA startup, | |
47 LPPROCESS_INFORMATION info ); | |
48 | |
49 extern void PE_InitTls(void); | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
50 extern WIN_BOOL PE_InitDLL(struct wine_modref *wm, DWORD type, LPVOID lpReserved); |
1 | 51 |
52 extern PIMAGE_RESOURCE_DIRECTORY GetResDirEntryA(PIMAGE_RESOURCE_DIRECTORY,LPCSTR,DWORD,WIN_BOOL); | |
53 extern PIMAGE_RESOURCE_DIRECTORY GetResDirEntryW(PIMAGE_RESOURCE_DIRECTORY,LPCWSTR,DWORD,WIN_BOOL); | |
54 | |
55 typedef DWORD CALLBACK (*DLLENTRYPROC)(HMODULE,DWORD,LPVOID); | |
56 | |
24406 | 57 typedef struct { |
58 WORD popl WINE_PACKED; /* 0x8f 0x05 */ | |
59 DWORD addr_popped WINE_PACKED;/* ... */ | |
60 BYTE pushl1 WINE_PACKED; /* 0x68 */ | |
61 DWORD newret WINE_PACKED; /* ... */ | |
62 BYTE pushl2 WINE_PACKED; /* 0x68 */ | |
63 DWORD origfun WINE_PACKED; /* original function */ | |
64 BYTE ret1 WINE_PACKED; /* 0xc3 */ | |
65 WORD addesp WINE_PACKED; /* 0x83 0xc4 */ | |
66 BYTE nrofargs WINE_PACKED; /* nr of arguments to add esp, */ | |
67 BYTE pushl3 WINE_PACKED; /* 0x68 */ | |
68 DWORD oldret WINE_PACKED; /* Filled out from popl above */ | |
69 BYTE ret2 WINE_PACKED; /* 0xc3 */ | |
1 | 70 } ELF_STDCALL_STUB; |
71 | |
72 typedef struct { | |
73 void* dlhandle; | |
74 ELF_STDCALL_STUB *stubs; | |
75 } ELF_MODREF; | |
76 | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
77 extern struct wine_modref *ELF_LoadLibraryExA( LPCSTR libname, DWORD flags); |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
78 extern void ELF_UnloadLibrary(struct wine_modref *); |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
79 extern FARPROC ELF_FindExportedFunction(struct wine_modref *wm, LPCSTR funcName); |
1 | 80 |
26045 | 81 #endif /* MPLAYER_PE_IMAGE_H */ |