Author: tkreuzer
Date: Fri Jul 24 12:25:53 2009
New Revision: 42172
URL:
http://svn.reactos.org/svn/reactos?rev=42172&view=rev
Log:
[delayimp]
- move IndexFromPImgThunkData and PFromRva to delayimp.h
- use __ImageBase insetad of _image_base__
- fix include guard
- RVA is a DWORD, not a PVOID
Modified:
trunk/reactos/lib/sdk/delayimp/delayimp.c
trunk/reactos/lib/sdk/delayimp/delayimp.h
Modified: trunk/reactos/lib/sdk/delayimp/delayimp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/delayimp/delayimp.…
==============================================================================
--- trunk/reactos/lib/sdk/delayimp/delayimp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/delayimp/delayimp.c [iso-8859-1] Fri Jul 24 12:25:53 2009
@@ -9,21 +9,6 @@
#include <windows.h>
#include "delayimp.h"
-
-inline
-unsigned
-IndexFromPImgThunkData(PCImgThunkData pData, PCImgThunkData pBase)
-{
- return pData - pBase;
-}
-
-extern const IMAGE_DOS_HEADER _image_base__;
-
-inline PVOID
-PFromRva(RVA rva)
-{
- return (PVOID)(((ULONG_PTR)(rva)) + ((ULONG_PTR)&_image_base__));
-}
/**** load helper ****/
Modified: trunk/reactos/lib/sdk/delayimp/delayimp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/delayimp/delayimp.…
==============================================================================
--- trunk/reactos/lib/sdk/delayimp/delayimp.h [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/delayimp/delayimp.h [iso-8859-1] Fri Jul 24 12:25:53 2009
@@ -1,14 +1,15 @@
-#ifndef _DELAYIMP_H_
-#define _DELAYIMP_H_
+#ifndef _delayimp_h
+#define _delayimp_h
-typedef void *RVA;
+#define DELAYLOAD_VERSION 0x200
+typedef DWORD RVA;
typedef IMAGE_THUNK_DATA *PImgThunkData;
typedef const IMAGE_THUNK_DATA *PCImgThunkData;
-enum
+enum DLAttr
{
- dlattrRva
+ dlattrRva = 0x1,
};
/* Notification codes */
@@ -59,7 +60,24 @@
typedef FARPROC (WINAPI *PfnDliHook)(unsigned, PDelayLoadInfo);
+static __inline__
+unsigned
+IndexFromPImgThunkData(PCImgThunkData pData, PCImgThunkData pBase)
+{
+ return pData - pBase;
+}
+
+extern const IMAGE_DOS_HEADER __ImageBase;
+
+static __inline__
+PVOID
+PFromRva(RVA rva)
+{
+ return (PVOID)(((ULONG_PTR)(rva)) + ((ULONG_PTR)&__ImageBase));
+}
+
+
extern PfnDliHook __pfnDliNotifyHook2;
extern PfnDliHook __pfnDliFailureHook2;
-#endif /* not _DELAYIMP_H_ */
+#endif /* not _delayimp_h */