ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
June 2005
----- 2024 -----
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
649 discussions
Start a n
N
ew thread
[hyperion] 16208: Fixes for GCC compilation, also fixed w32api definition of LUID
by hyperion@svn.reactos.com
Fixes for GCC compilation, also fixed w32api definition of LUID Modified: branches/rox-u/reactos/ntoskrnl/ldr/rtl.c Modified: branches/rox-u/reactos/ntoskrnl/ps/psmgr.c Modified: branches/rox-u/reactos/ntoskrnl/se/luid.c Modified: branches/rox-u/reactos/w32api/include/winnt.h _____ Modified: branches/rox-u/reactos/ntoskrnl/ldr/rtl.c --- branches/rox-u/reactos/ntoskrnl/ldr/rtl.c 2005-06-21 17:16:25 UTC (rev 16207) +++ branches/rox-u/reactos/ntoskrnl/ldr/rtl.c 2005-06-21 18:44:20 UTC (rev 16208) @@ -17,8 +17,6 @@ /* FUNCTIONS ****************************************************************/ -#define RVA(m, b) ((ULONG)b + m) - NTSTATUS STDCALL LdrGetProcedureAddress (IN PVOID BaseAddress, IN PANSI_STRING Name, _____ Modified: branches/rox-u/reactos/ntoskrnl/ps/psmgr.c --- branches/rox-u/reactos/ntoskrnl/ps/psmgr.c 2005-06-21 17:16:25 UTC (rev 16207) +++ branches/rox-u/reactos/ntoskrnl/ps/psmgr.c 2005-06-21 18:44:20 UTC (rev 16208) @@ -173,7 +173,7 @@ ProcessObject, sizeof(EPROCESS), FALSE); - PsIdleProcess->Pcb.DirectoryTableBase.QuadPart = MmGetPageDirectory(); + PsIdleProcess->Pcb.DirectoryTableBase.QuadPart = (ULONG_PTR)MmGetPageDirectory(); strcpy(PsIdleProcess->ImageFileName, "Idle"); /* _____ Modified: branches/rox-u/reactos/ntoskrnl/se/luid.c --- branches/rox-u/reactos/ntoskrnl/se/luid.c 2005-06-21 17:16:25 UTC (rev 16207) +++ branches/rox-u/reactos/ntoskrnl/se/luid.c 2005-06-21 18:44:20 UTC (rev 16208) @@ -34,8 +34,7 @@ NTSTATUS ExpAllocateLocallyUniqueId(OUT LUID *LocallyUniqueId) { - LARGE_INTEGER NewLuid; - volatile LARGE_INTEGER PrevLuid; + LARGE_INTEGER NewLuid, PrevLuid; /* atomically increment the luid */ do _____ Modified: branches/rox-u/reactos/w32api/include/winnt.h --- branches/rox-u/reactos/w32api/include/winnt.h 2005-06-21 17:16:25 UTC (rev 16207) +++ branches/rox-u/reactos/w32api/include/winnt.h 2005-06-21 18:44:20 UTC (rev 16208) @@ -2039,7 +2039,10 @@ #endif /* NONAMELESSUNION */ ULONGLONG QuadPart; } ULARGE_INTEGER, *PULARGE_INTEGER; -typedef LARGE_INTEGER LUID,*PLUID; +typedef struct _LUID { + DWORD LowPart; + LONG HighPart; +} LUID, *PLUID; #pragma pack(push,4) typedef struct _LUID_AND_ATTRIBUTES { LUID Luid;
19 years, 3 months
1
0
0
0
[mbosma] 16207: Copy ddk ddrawi.h to include since it's more uptodate.
by mbosma@svn.reactos.com
Copy ddk ddrawi.h to include since it's more uptodate. Modified: trunk/reactos/include/ddrawi.h _____ Modified: trunk/reactos/include/ddrawi.h --- trunk/reactos/include/ddrawi.h 2005-06-21 16:35:41 UTC (rev 16206) +++ trunk/reactos/include/ddrawi.h 2005-06-21 17:16:25 UTC (rev 16207) @@ -19,19 +19,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_DDRAWI_H -#define __WINE_DDRAWI_H +#ifndef __DDRAWI_INCLUDED__ +#define __DDRAWI_INCLUDED__ #ifdef __cplusplus extern "C" { #endif #include <ddraw.h> -#include <dciddi.h> /* the DD HAL is layered onto DCI escapes */ +#ifndef __DDK_DDRAWINT_H typedef struct _DDVIDEOPORTCAPS *LPDDVIDEOPORTCAPS; /* should be in dvp.h */ typedef struct _DDKERNELCAPS *LPDDKERNELCAPS; /* should be in ddkernel.h */ typedef struct _VMEMHEAP *LPVMEMHEAP; /* should be in dmemmgr.h */ +#endif #define DDAPI WINAPI @@ -67,8 +68,10 @@ typedef DWORD (PASCAL *LPDD32BITDRIVERINIT)(DWORD dwContext); +#ifndef __DDK_DDRAWINT_H /* pointer to video memory */ typedef ULONG_PTR FLATPTR; +#endif /* predeclare some structures */ typedef struct _DDHALINFO *LPDDHALINFO; @@ -91,22 +94,6 @@ typedef struct _DDRAWI_DDMOTIONCOMP_INT *LPDDRAWI_DDMOTIONCOMP_INT; typedef struct _DDRAWI_DDMOTIONCOMP_LCL *LPDDRAWI_DDMOTIONCOMP_LCL; -/* structure GUIDs for GetDriverInfo */ -DEFINE_GUID( GUID_MiscellaneousCallbacks, 0xEFD60CC0,0x49E7,0x11D0,0x88,0x9D,0x00,0xAA,0x00,0xBB,0xB7,0x6A ); -/* ...videport stuff here... */ -DEFINE_GUID( GUID_D3DCallbacks2, 0x0BA584E1,0x70B6,0x11D0,0x88,0x9D,0x00,0xAA,0x00,0xBB,0xB7,0x6A ); -DEFINE_GUID( GUID_D3DCallbacks3, 0xDDF41230,0xEC0A,0x11D0,0xA9,0xB6,0x00,0xAA,0x00,0xC0,0x99,0x3E ); -DEFINE_GUID( GUID_NonLocalVidMemCaps, 0x86C4FA80,0x8D84,0x11D0,0x94,0xE8,0x00,0xC0,0x4F,0xC3,0x41,0x37 ); -/* ...kernel stuff here... */ -DEFINE_GUID( GUID_D3DExtendedCaps, 0x7DE41F80,0x9D93,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29 ); -DEFINE_GUID( GUID_ZPixelFormats, 0x93869880,0x36CF,0x11D1,0x9B,0x1B,0x00,0xAA,0x00,0xBB,0xB8,0xAE ); -DEFINE_GUID( GUID_DDMoreSurfaceCaps, 0x3B8A0466,0xF269,0x11D1,0x88,0x0B,0x00,0xC0,0x4F,0xD9,0x30,0xC5 ); -DEFINE_GUID( GUID_DDStereoMode, 0xF828169C,0xA8E8,0x11D2,0xA1,0xF2,0x00,0xA0,0xC9,0x83,0xEA,0xF6 ); -/* ...more stuff here... */ -DEFINE_GUID(GUID_D3DParseUnknownCommandCallback,0x2E04FFA0,0x98E4,0x11D 1,0x8C,0xE1,0x00,0xA0,0xC9,0x06,0x29,0xA8 ); -/* ...motioncomp stuff here... */ -DEFINE_GUID( GUID_Miscellaneous2Callbacks, 0x406B2F00,0x3E5A,0x11D1,0xB6,0x40,0x00,0xAA,0x00,0xA1,0xF9,0x6A ); - /*********************************************************************** ****** * driver->ddraw callbacks */ @@ -162,12 +149,14 @@ } DUMMYUNIONNAME2; } VIDMEM,*LPVIDMEM; +#ifndef __DDK_DDRAWINT_H #define VIDMEM_ISLINEAR 0x00000001 #define VIDMEM_ISRECTANGULAR 0x00000002 #define VIDMEM_ISHEAP 0x00000004 #define VIDMEM_ISNONLOCAL 0x00000008 #define VIDMEM_ISWC 0x00000010 #define VIDMEM_ISDISABLED 0x00000020 +#endif typedef struct _VIDMEMINFO { FLATPTR fpPrimary; @@ -267,9 +256,6 @@ DWORD dwNLVBRops[DD_ROP_SPACE]; } DDNONLOCALVIDMEMCAPS,*LPDDNONLOCALVIDMEMCAPS; - - - #define DDSCAPS_EXECUTEBUFFER DDSCAPS_RESERVED2 #define DDSCAPS2_VERTEXBUFFER DDSCAPS2_RESERVED1 #define DDSCAPS2_COMMANDBUFFER DDSCAPS2_RESERVED2 @@ -630,6 +616,9 @@ /*********************************************************************** ****** * high-level ddraw implementation structures */ +#ifndef __USE_W32API +typedef DWORD IUnknown; /* FIXME: implement proper definition */ +#endif typedef struct _IUNKNOWN_LIST { struct _IUNKNOWN_LIST * lpLink; LPGUID lpGuid; @@ -984,13 +973,21 @@ #define DDRAWISURF_HASCKEYDESTOVERLAY 0x00000100 #define DDRAWISURF_HASCKEYDESTBLT 0x00000200 #define DDRAWISURF_HASCKEYSRCOVERLAY 0x00000400 +#ifndef DDRAWISURF_HASCKEYSRCBLT #define DDRAWISURF_HASCKEYSRCBLT 0x00000800 +#endif #define DDRAWISURF_LOCKEXCLUDEDCURSOR 0x00001000 +#ifndef DDRAWISURF_HASPIXELFORMAT #define DDRAWISURF_HASPIXELFORMAT 0x00002000 +#endif +#ifndef DDRAWISURF_HASOVERLAYDATA #define DDRAWISURF_HASOVERLAYDATA 0x00004000 +#endif #define DDRAWISURF_SETGAMMA 0x00008000 /* more... */ +#ifndef DDRAWISURF_INVALID #define DDRAWISURF_INVALID 0x10000000 +#endif /* palettes */ typedef struct _DDRAWI_DDRAWPALETTE_INT { @@ -1048,8 +1045,287 @@ ULONG_PTR dwDDRAWReserved3; } DDRAWI_DDRAWPALETTE_LCL; +typedef struct _DDHAL_GETMOCOMPGUIDSDATA FAR *LPDDHAL_GETMOCOMPGUIDSDATA; +typedef struct _DDHAL_GETMOCOMPFORMATSDATA FAR *LPDDHAL_GETMOCOMPFORMATSDATA; +typedef struct _DDHAL_CREATEMOCOMPDATA FAR *LPDDHAL_CREATEMOCOMPDATA; +typedef struct _DDHAL_GETMOCOMPCOMPBUFFDATA FAR *LPDDHAL_GETMOCOMPCOMPBUFFDATA; +typedef struct _DDHAL_GETINTERNALMOCOMPDATA FAR *LPDDHAL_GETINTERNALMOCOMPDATA; +typedef struct _DDHAL_BEGINMOCOMPFRAMEDATA FAR *LPDDHAL_BEGINMOCOMPFRAMEDATA; +typedef struct _DDHAL_ENDMOCOMPFRAMEDATA FAR *LPDDHAL_ENDMOCOMPFRAMEDATA; +typedef struct _DDHAL_RENDERMOCOMPDATA FAR *LPDDHAL_RENDERMOCOMPDATA; +typedef struct _DDHAL_QUERYMOCOMPSTATUSDATA FAR *LPDDHAL_QUERYMOCOMPSTATUSDATA; +typedef struct _DDHAL_DESTROYMOCOMPDATA FAR *LPDDHAL_DESTROYMOCOMPDATA; +typedef struct _DDHAL_COLORCONTROLDATA FAR *LPDDHAL_COLORCONTROLDATA; + +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETGUIDS)( LPDDHAL_GETMOCOMPGUIDSDATA); +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETFORMATS)( LPDDHAL_GETMOCOMPFORMATSDATA); +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_CREATE)( LPDDHAL_CREATEMOCOMPDATA); +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETCOMPBUFFINFO)( LPDDHAL_GETMOCOMPCOMPBUFFDATA); +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETINTERNALINFO)( LPDDHAL_GETINTERNALMOCOMPDATA); +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_BEGINFRAME)( LPDDHAL_BEGINMOCOMPFRAMEDATA); +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_ENDFRAME)( LPDDHAL_ENDMOCOMPFRAMEDATA); +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_RENDER)( LPDDHAL_RENDERMOCOMPDATA); +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_QUERYSTATUS)( LPDDHAL_QUERYMOCOMPSTATUSDATA); +typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_DESTROY)( LPDDHAL_DESTROYMOCOMPDATA); +typedef DWORD (FAR PASCAL *LPDDHALCOLORCB_COLORCONTROL)(LPDDHAL_COLORCONTROLDATA); + +typedef struct _DDMCCOMPBUFFERINFO +{ + DWORD dwSize; // [in] size of the struct + DWORD dwNumCompBuffers; // [out] number of buffers required for compressed data + DWORD dwWidthToCreate; // [out] Width of surface to create + DWORD dwHeightToCreate; // [out] Height of surface to create + DWORD dwBytesToAllocate; // [out] Total number of bytes used by each surface + DDSCAPS2 ddCompCaps; // [out] caps to create surfaces to store compressed data + DDPIXELFORMAT ddPixelFormat; // [out] format to create surfaces to store compressed data +} DDMCCOMPBUFFERINFO, *LPDDMCCOMPBUFFERINFO; + +typedef struct _DDMCBUFFERINFO +{ + DWORD dwSize; // [in] size of the struct + LPDDRAWI_DDRAWSURFACE_LCL lpCompSurface; // [in] pointer to buffer containing compressed data + DWORD dwDataOffset; // [in] offset of relevant data from the beginning of buffer + DWORD dwDataSize; // [in] size of relevant data + LPVOID lpPrivate; // Reserved for DirectDraw; +} DDMCBUFFERINFO, *LPDDMCBUFFERINFO; + +typedef struct _DDHAL_GETDRIVERSTATEDATA { + DWORD dwFlags; + union + { + ULONG_PTR dwhContext; + }; + LPDWORD lpdwStates; + DWORD dwLength; + HRESULT ddRVal; +} DDHAL_GETDRIVERSTATEDATA; + +typedef struct _DDHAL_ADDATTACHEDSURFACEDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; + LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; + LPDDRAWI_DDRAWSURFACE_LCL lpSurfAttached; + HRESULT ddRVal; + LPDDHALSURFCB_ADDATTACHEDSURFACE AddAttachedSurface; +} DDHAL_ADDATTACHEDSURFACEDATA; + +typedef struct _DDHAL_BEGINMOCOMPFRAMEDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp; + LPDDRAWI_DDRAWSURFACE_LCL lpDestSurface; // [in] destination buffer in which to decoding this frame + DWORD dwInputDataSize; // [in] size of other misc input data to begin frame + LPVOID lpInputData; // [in] pointer to misc input data + DWORD dwOutputDataSize; // [in] size of other misc output data to begin frame + LPVOID lpOutputData; // [in] pointer to output misc data (allocated by client) + HRESULT ddRVal; // [out] + LPDDHALMOCOMPCB_BEGINFRAME BeginMoCompFrame; +} DDHAL_BEGINMOCOMPFRAMEDATA; + +typedef struct _DDHAL_COLORCONTROLDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface + LPDDCOLORCONTROL lpColorData; // color control information + DWORD dwFlags; // DDRAWI_GETCOLOR/DDRAWI_SETCOLOR + HRESULT ddRVal; // return value + LPDDHALCOLORCB_COLORCONTROL ColorControl; // PRIVATE: ptr to callback +} DDHAL_COLORCONTROLDATA; + +typedef struct _DDHAL_CREATEMOCOMPDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp; + LPGUID lpGuid; + DWORD dwUncompWidth; + DWORD dwUncompHeight; + DDPIXELFORMAT ddUncompPixelFormat; + LPVOID lpData; + DWORD dwDataSize; + HRESULT ddRVal; + LPDDHALMOCOMPCB_CREATE CreateMoComp; +} DDHAL_CREATEMOCOMPDATA; + +typedef struct _DDHAL_DESTROYMOCOMPDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp; + HRESULT ddRVal; + LPDDHALMOCOMPCB_DESTROY DestroyMoComp; +} DDHAL_DESTROYMOCOMPDATA; + +typedef struct _DDHAL_ENDMOCOMPFRAMEDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp; + LPVOID lpInputData; + DWORD dwInputDataSize; + HRESULT ddRVal; + LPDDHALMOCOMPCB_ENDFRAME EndMoCompFrame; +} DDHAL_ENDMOCOMPFRAMEDATA; + +typedef struct _DDHAL_FLIPTOGDISURFACEDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + DWORD dwToGDI; // TRUE if flipping to the GDI surface, FALSE if flipping away + DWORD dwReserved; // reserved for future use + HRESULT ddRVal; // return value + LPDDHAL_FLIPTOGDISURFACE FlipToGDISurface; // PRIVATE: ptr to callback +} DDHAL_FLIPTOGDISURFACEDATA; + +typedef struct _DDHAL_GETAVAILDRIVERMEMORYDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + DDSCAPS DDSCaps; // caps for type of surface memory + DWORD dwTotal; // total memory for this kind of surface + DWORD dwFree; // free memory for this kind of surface + HRESULT ddRVal; // return value + LPDDHAL_GETAVAILDRIVERMEMORY GetAvailDriverMemory; // PRIVATE: ptr to callback + DDSCAPSEX ddsCapsEx; // Added in V6. Driver should check DDVERSION info + // to see if this field is present. +} DDHAL_GETAVAILDRIVERMEMORYDATA; + +typedef struct _DDHAL_GETBLTSTATUSDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface struct + DWORD dwFlags; // flags + HRESULT ddRVal; // return value + LPDDHALSURFCB_GETBLTSTATUS GetBltStatus; // PRIVATE: ptr to callback +} DDHAL_GETBLTSTATUSDATA; + +typedef struct _DDHAL_GETFLIPSTATUSDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface struct + DWORD dwFlags; // flags + HRESULT ddRVal; // return value + LPDDHALSURFCB_GETFLIPSTATUS GetFlipStatus; // PRIVATE: ptr to callback +} DDHAL_GETFLIPSTATUSDATA; + +typedef struct _DDHAL_GETINTERNALMOCOMPDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + LPGUID lpGuid; + DWORD dwWidth; // [in] width of uncompressed data + DWORD dwHeight; // [in] height of uncompressed data + DDPIXELFORMAT ddPixelFormat; // [in] pixel-format of uncompressed data + DWORD dwScratchMemAlloc; // [out] amount of scratch memory will the hal allocate for its private use + HRESULT ddRVal; // [out] + LPDDHALMOCOMPCB_GETINTERNALINFO GetInternalMoCompInfo; +} DDHAL_GETINTERNALMOCOMPDATA; + +typedef struct _DDHAL_GETMOCOMPCOMPBUFFDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + LPGUID lpGuid; + DWORD dwWidth; // [in] width of uncompressed data + DWORD dwHeight; // [in] height of uncompressed data + DDPIXELFORMAT ddPixelFormat; // [in] pixel-format of uncompressed data + DWORD dwNumTypesCompBuffs;// [in/out] number of memory types required for comp buffers + LPDDMCCOMPBUFFERINFO lpCompBuffInfo; // [in] driver supplied info regarding comp buffers (allocated by client) + HRESULT ddRVal; // [out] + LPDDHALMOCOMPCB_GETCOMPBUFFINFO GetMoCompBuffInfo; +} DDHAL_GETMOCOMPCOMPBUFFDATA; + +typedef struct _DDHAL_GETMOCOMPGUIDSDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + DWORD dwNumGuids; + LPGUID lpGuids; + HRESULT ddRVal; + LPDDHALMOCOMPCB_GETGUIDS GetMoCompGuids; +} DDHAL_GETMOCOMPGUIDSDATA; + +typedef struct _DDHAL_GETMOCOMPFORMATSDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + LPGUID lpGuid; + DWORD dwNumFormats; + LPDDPIXELFORMAT lpFormats; + HRESULT ddRVal; + LPDDHALMOCOMPCB_GETFORMATS GetMoCompFormats; +} DDHAL_GETMOCOMPFORMATSDATA; + +typedef struct _DDHAL_GETSCANLINEDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + DWORD dwScanLine; // returned scan line + HRESULT ddRVal; // return value + LPDDHAL_GETSCANLINE GetScanLine; // PRIVATE: ptr to callback +} DDHAL_GETSCANLINEDATA; + +typedef struct _DDHAL_QUERYMOCOMPSTATUSDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp; + LPDDRAWI_DDRAWSURFACE_LCL lpSurface; // [in] Surface being queried + DWORD dwFlags; // [in] DDMCQUERY_XXX falgs + HRESULT ddRVal; // [out] + LPDDHALMOCOMPCB_QUERYSTATUS QueryMoCompStatus; +} DDHAL_QUERYMOCOMPSTATUSDATA; + +typedef struct _DDHAL_RENDERMOCOMPDATA +{ + LPDDRAWI_DIRECTDRAW_LCL lpDD; + LPDDRAWI_DDMOTIONCOMP_LCL lpMoComp; + DWORD dwNumBuffers; // [in] Number of entries in the lpMacroBlockInfo array + LPDDMCBUFFERINFO lpBufferInfo; // [in] Surfaces containing macro block info + DWORD dwFunction; // [in] Function + LPVOID lpInputData; + DWORD dwInputDataSize; + LPVOID lpOutputData; + DWORD dwOutputDataSize; + HRESULT ddRVal; // [out] + LPDDHALMOCOMPCB_RENDER RenderMoComp; +} DDHAL_RENDERMOCOMPDATA; + +typedef struct _DDHAL_SETCOLORKEYDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface; // surface struct + DWORD dwFlags; // flags + DDCOLORKEY ckNew; // new color key + HRESULT ddRVal; // return value + LPDDHALSURFCB_SETCOLORKEY SetColorKey; // PRIVATE: ptr to callback +} DDHAL_SETCOLORKEYDATA; + +typedef struct _DDHAL_SETOVERLAYPOSITIONDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface; // src surface + LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface;// dest surface + LONG lXPos; // x position + LONG lYPos; // y position + HRESULT ddRVal; // return value + LPDDHALSURFCB_SETOVERLAYPOSITION SetOverlayPosition; // PRIVATE: ptr to callback +} DDHAL_SETOVERLAYPOSITIONDATA; + +typedef struct _DDHAL_UPDATEOVERLAYDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface;// dest surface + RECTL rDest; // dest rect + LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface; // src surface + RECTL rSrc; // src rect + DWORD dwFlags; // flags + DDOVERLAYFX overlayFX; // overlay FX + HRESULT ddRVal; // return value + LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay; // PRIVATE: ptr to callback +} DDHAL_UPDATEOVERLAYDATA; + +typedef struct _DDHAL_WAITFORVERTICALBLANKDATA +{ + LPDDRAWI_DIRECTDRAW_GBL lpDD; // driver struct + DWORD dwFlags; // flags + DWORD bIsInVB; // is in vertical blank + ULONG_PTR hEvent; // event + HRESULT ddRVal; // return value + LPDDHAL_WAITFORVERTICALBLANK WaitForVerticalBlank; // PRIVATE: ptr to callback +} DDHAL_WAITFORVERTICALBLANKDATA; + #ifdef __cplusplus } /* extern "C" */ #endif -#endif /* __WINE_DDRAWI_H */ +#endif /* __DDRAWI_INCLUDED__ */
19 years, 3 months
1
0
0
0
[gvg] 16206: Patch by Hartmut Birr
by gvg@svn.reactos.com
Patch by Hartmut Birr Work around what seems to be a bug in GCC for optimized builds. See
http://reactos.com:8080/archives/public/ros-dev/2005-June/003842.html
Modified: trunk/reactos/ntoskrnl/io/driver.c _____ Modified: trunk/reactos/ntoskrnl/io/driver.c --- trunk/reactos/ntoskrnl/io/driver.c 2005-06-21 04:52:46 UTC (rev 16205) +++ trunk/reactos/ntoskrnl/io/driver.c 2005-06-21 16:35:41 UTC (rev 16206) @@ -1659,16 +1659,16 @@ KeAcquireSpinLock(&DriverReinitListLock, &Irql); - if (DriverReinitTailEntry == NULL) + Entry = DriverReinitTailEntry; + + KeReleaseSpinLock(&DriverReinitListLock, + Irql); + + if (Entry == NULL) { - KeReleaseSpinLock(&DriverReinitListLock, - Irql); return; } - KeReleaseSpinLock(&DriverReinitListLock, - Irql); - for (;;) { Entry = ExInterlockedRemoveHeadList(&DriverReinitListHead,
19 years, 3 months
1
0
0
0
[ion] 16205: Build kernel32, ntdll, csrss fully with NDK and remove ntdll header usage
by ion@svn.reactos.com
Build kernel32, ntdll, csrss fully with NDK and remove ntdll header usage Modified: trunk/reactos/include/epsapi.h Modified: trunk/reactos/include/ndk/ldrtypes.h Modified: trunk/reactos/include/ndk/umfuncs.h Modified: trunk/reactos/lib/kernel32/k32.h Modified: trunk/reactos/lib/ntdll/inc/ntdll.h Modified: trunk/reactos/lib/ntdll/inc/ntdllp.h Modified: trunk/reactos/subsys/csrss/init.c _____ Modified: trunk/reactos/include/epsapi.h --- trunk/reactos/include/epsapi.h 2005-06-21 04:28:03 UTC (rev 16204) +++ trunk/reactos/include/epsapi.h 2005-06-21 04:52:46 UTC (rev 16205) @@ -25,9 +25,6 @@ #ifndef __EPSAPI_H_INCLUDED__ #define __EPSAPI_H_INCLUDED__ -/* Remove soon */ -#include <ntdll/ldr.h> - /* TYPES */ typedef NTSTATUS (NTAPI *PPROC_ENUM_ROUTINE)(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess, IN OUT PVOID CallbackContext); _____ Modified: trunk/reactos/include/ndk/ldrtypes.h --- trunk/reactos/include/ndk/ldrtypes.h 2005-06-21 04:28:03 UTC (rev 16204) +++ trunk/reactos/include/ndk/ldrtypes.h 2005-06-21 04:52:46 UTC (rev 16205) @@ -43,7 +43,6 @@ PVOID EntryInProgress; } PEB_LDR_DATA, *PPEB_LDR_DATA; -#if 0 typedef struct _LDR_DATA_TABLE_ENTRY { LIST_ENTRY InLoadOrderModuleList; @@ -55,16 +54,20 @@ UNICODE_STRING FullDllName; UNICODE_STRING BaseDllName; ULONG Flags; - SHORT LoadCount; /* FIXME: HACK!!! FIX ASAP */ - SHORT TlsIndex; /* FIXME: HACK!!! FIX ASAP */ + USHORT LoadCount; /* FIXME: HACK!!! FIX ASAP */ + USHORT TlsIndex; /* FIXME: HACK!!! FIX ASAP */ LIST_ENTRY HashLinks; PVOID SectionPointer; ULONG CheckSum; ULONG TimeDateStamp; PVOID LoadedImports; PVOID EntryPointActivationContext; + PVOID PatchInformation; +#if defined(DBG) || defined(KDBG) + /* FIXME: THIS _REALLY_ NEEDS TO GO SOMEWHERE ELSE */ + PVOID RosSymInfo; +#endif /* KDBG */ } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY; -#endif typedef struct _LDR_RESOURCE_INFO { _____ Modified: trunk/reactos/include/ndk/umfuncs.h --- trunk/reactos/include/ndk/umfuncs.h 2005-06-21 04:28:03 UTC (rev 16204) +++ trunk/reactos/include/ndk/umfuncs.h 2005-06-21 04:52:46 UTC (rev 16205) @@ -10,6 +10,7 @@ /* DEPENDENCIES **************************************************************/ #include "ldrtypes.h" #include "lpctypes.h" +#include "rtltypes.h" #include <csrss/csrss.h> /* FIXME: Temporary */ /* PROTOTYPES ****************************************************************/ @@ -195,6 +196,14 @@ NTSTATUS STDCALL +LdrQueryProcessModuleInformation( + IN PMODULE_INFORMATION ModuleInformation OPTIONAL, + IN ULONG Size OPTIONAL, + OUT PULONG ReturnedSize +); + +NTSTATUS +STDCALL LdrShutdownProcess(VOID); NTSTATUS _____ Modified: trunk/reactos/lib/kernel32/k32.h --- trunk/reactos/lib/kernel32/k32.h 2005-06-21 04:28:03 UTC (rev 16204) +++ trunk/reactos/lib/kernel32/k32.h 2005-06-21 04:52:46 UTC (rev 16205) @@ -11,6 +11,7 @@ /* PSDK/NDK Headers */ #include <windows.h> #define NTOS_MODE_USER +#define READY_FOR_NEW_NTDLL #include <ndk/ntndk.h> /* C Headers */ @@ -21,12 +22,6 @@ #include <ddk/ntddser.h> #include <ddk/ntddtape.h> -/* FIXME: Clean this sh*t up */ -#include <ntdll/base.h> -#include <ntdll/dbg.h> -#include <ntdll/csr.h> -#include <ntdll/ldr.h> - /* Internal Kernel32 Header */ #include "include/kernel32.h" _____ Modified: trunk/reactos/lib/ntdll/inc/ntdll.h --- trunk/reactos/lib/ntdll/inc/ntdll.h 2005-06-21 04:28:03 UTC (rev 16204) +++ trunk/reactos/lib/ntdll/inc/ntdll.h 2005-06-21 04:52:46 UTC (rev 16205) @@ -11,13 +11,9 @@ /* SDK/DDK/NDK Headers. */ #include <windows.h> #define NTOS_MODE_USER +#define READY_FOR_NEW_NTDLL #include <ndk/ntndk.h> -/* NTDLL Headers FIXME: These will be gone imminently */ -#include <ntdll/ntdll.h> -#include <ntdll/ldr.h> -#include <ntdll/csr.h> - /* Internal NTDLL */ #include "ntdllp.h" _____ Modified: trunk/reactos/lib/ntdll/inc/ntdllp.h --- trunk/reactos/lib/ntdll/inc/ntdllp.h 2005-06-21 04:28:03 UTC (rev 16204) +++ trunk/reactos/lib/ntdll/inc/ntdllp.h 2005-06-21 04:52:46 UTC (rev 16205) @@ -9,7 +9,7 @@ /* INCLUDES ******************************************************************/ /* FIXME: Cleanup this mess */ -//typedef NTSTATUS (STDCALL *PEPFUNC)(PPEB); +typedef NTSTATUS (STDCALL *PEPFUNC)(PPEB); NTSTATUS LdrMapSections(HANDLE ProcessHandle, PVOID ImageBase, HANDLE SectionHandle, @@ -23,12 +23,10 @@ HANDLE SectionHandle, PLDR_DATA_TABLE_ENTRY* Module, PWSTR FullDosName); -#if 0 typedef BOOL (STDCALL *PDLLMAIN_FUNC)(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved); -#endif VOID STDCALL RtlpInitDeferedCriticalSection( _____ Modified: trunk/reactos/subsys/csrss/init.c --- trunk/reactos/subsys/csrss/init.c 2005-06-21 04:28:03 UTC (rev 16204) +++ trunk/reactos/subsys/csrss/init.c 2005-06-21 04:52:46 UTC (rev 16205) @@ -12,9 +12,8 @@ #include <windows.h> #define NTOS_MODE_USER +#define READY_FOR_NEW_NTDLL #include <ndk/ntndk.h> -#include <ntdll/csr.h> -#include <ntdll/ldr.h> #include <rosrtl/string.h> #include <sm/helper.h>
19 years, 3 months
1
0
0
0
[ion] 16204: Use correct TlsCount/LoadCount definition and fix incorrect usage i code
by ion@svn.reactos.com
Use correct TlsCount/LoadCount definition and fix incorrect usage i code Modified: trunk/reactos/include/ntdll/ldr.h Modified: trunk/reactos/lib/ntdll/ldr/utils.c _____ Modified: trunk/reactos/include/ntdll/ldr.h --- trunk/reactos/include/ntdll/ldr.h 2005-06-21 04:10:45 UTC (rev 16203) +++ trunk/reactos/include/ntdll/ldr.h 2005-06-21 04:28:03 UTC (rev 16204) @@ -65,14 +65,15 @@ UNICODE_STRING FullDllName; UNICODE_STRING BaseDllName; ULONG Flags; - SHORT LoadCount; /* FIXME: HACK!!! FIX ASAP */ - SHORT TlsIndex; /* FIXME: HACK!!! FIX ASAP */ + USHORT LoadCount; + USHORT TlsIndex; LIST_ENTRY HashLinks; PVOID SectionPointer; ULONG CheckSum; ULONG TimeDateStamp; PVOID LoadedImports; PVOID EntryPointActivationContext; + PVOID PatchInformation; #if defined(DBG) || defined(KDBG) PROSSYM_INFO RosSymInfo; /* FIXME: THIS _REALLY_ NEEDS TO GO (TLS?)!!! */ #endif /* KDBG */ _____ Modified: trunk/reactos/lib/ntdll/ldr/utils.c --- trunk/reactos/lib/ntdll/ldr/utils.c 2005-06-21 04:10:45 UTC (rev 16203) +++ trunk/reactos/lib/ntdll/ldr/utils.c 2005-06-21 04:28:03 UTC (rev 16204) @@ -123,7 +123,7 @@ RtlEnterCriticalSection (NtCurrentPeb()->LoaderLock); } LoadCount = Module->LoadCount; - if (Module->LoadCount >= 0) + if (Module->LoadCount != 0xFFFF) { Module->LoadCount++; } @@ -152,7 +152,7 @@ static inline VOID LdrpTlsCallback(PLDR_DATA_TABLE_ENTRY Module, ULONG dwReason) { PIMAGE_TLS_CALLBACK TlsCallback; - if (Module->TlsIndex >= 0 && Module->LoadCount == -1) + if (Module->TlsIndex != 0xFFFF && Module->LoadCount == 0xFFFF) { TlsCallback = LdrpTlsArray[Module->TlsIndex].TlsAddressOfCallBacks; if (TlsCallback) @@ -256,8 +256,8 @@ while (Entry != ModuleListHead) { Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); - if (Module->LoadCount == -1 && - Module->TlsIndex >= 0) + if (Module->LoadCount == 0xFFFF && + Module->TlsIndex != 0xFFFF) { TlsDirectory = (PIMAGE_TLS_DIRECTORY) RtlImageDirectoryEntryToData(Module->DllBase, @@ -482,7 +482,7 @@ * loading while app is initializing * dll must not be unloaded */ - Module->LoadCount = -1; + Module->LoadCount = 0xFFFF; } Module->Flags = 0; @@ -886,7 +886,7 @@ 0 == RtlCompareUnicodeString(&LdrpLastModule->FullDllName, &AdjustedName, TRUE))) { *Module = LdrpLastModule; - if (Ref && (*Module)->LoadCount != -1) + if (Ref && (*Module)->LoadCount != 0xFFFF) { (*Module)->LoadCount++; } @@ -907,7 +907,7 @@ 0 == RtlCompareUnicodeString(&ModulePtr->FullDllName, &AdjustedName, TRUE))) { *Module = LdrpLastModule = ModulePtr; - if (Ref && ModulePtr->LoadCount != -1) + if (Ref && ModulePtr->LoadCount != 0xFFFF) { ModulePtr->LoadCount++; } @@ -2290,7 +2290,7 @@ if (Module->DllBase == BaseAddress) { - if (Module->TlsIndex == -1) + if (Module->TlsIndex == 0xFFFF) { Module->Flags |= DONT_CALL_FOR_THREAD; Status = STATUS_SUCCESS; @@ -2432,7 +2432,7 @@ { TRACE_LDR("Unload %wZ - Calling entry point at %x\n", &Module->BaseDllName, Module->EntryPoint); - LdrpCallDllEntry(Module, DLL_PROCESS_DETACH, (PVOID)(Module->LoadCount == -1 ? 1 : 0)); + LdrpCallDllEntry(Module, DLL_PROCESS_DETACH, (PVOID)(Module->LoadCount == 0xFFFF ? 1 : 0)); } else { @@ -2454,7 +2454,7 @@ Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList); Entry = Entry->Blink; if (Module->Flags & UNLOAD_IN_PROGRESS && - ((UnloadAll && Module->LoadCount >= 0) || Module->LoadCount == 0)) + ((UnloadAll && Module->LoadCount != 0xFFFF) || Module->LoadCount == 0)) { /* remove the module entry from the list */ RemoveEntryList (&Module->InLoadOrderModuleList); @@ -2517,7 +2517,7 @@ Module->Flags |= LOAD_IN_PROGRESS; TRACE_LDR("%wZ loaded - Calling init routine at %x for process attaching\n", &Module->BaseDllName, Module->EntryPoint); - Result = LdrpCallDllEntry(Module, DLL_PROCESS_ATTACH, (PVOID)(Module->LoadCount == -1 ? 1 : 0)); + Result = LdrpCallDllEntry(Module, DLL_PROCESS_ATTACH, (PVOID)(Module->LoadCount == 0xFFFF ? 1 : 0)); if (!Result) { Status = STATUS_DLL_INIT_FAILED;
19 years, 3 months
1
0
0
0
[ion] 16203: Use LDR_DATA_TABLE_ENTRY instead of LDR_MODULE. the former is the actual structure. would be wise to fix the defs too.
by ion@svn.reactos.com
Use LDR_DATA_TABLE_ENTRY instead of LDR_MODULE. the former is the actual structure. would be wise to fix the defs too. Modified: trunk/reactos/apps/utils/pice/module/symbols.c Modified: trunk/reactos/apps/utils/sdkparse/test.h Modified: trunk/reactos/include/epsapi.h Modified: trunk/reactos/include/napi/types.h Modified: trunk/reactos/include/ndk/ldrtypes.h Modified: trunk/reactos/include/ntdll/ldr.h Modified: trunk/reactos/lib/epsapi/enum/modules.c Modified: trunk/reactos/lib/kernel32/misc/ldr.c Modified: trunk/reactos/lib/ntdll/inc/ntdllp.h Modified: trunk/reactos/lib/ntdll/ldr/startup.c Modified: trunk/reactos/lib/ntdll/ldr/utils.c Modified: trunk/reactos/lib/ntdll/rtl/dbgbuffer.c Modified: trunk/reactos/lib/psapi/psapi.c Modified: trunk/reactos/ntoskrnl/ex/dbgctrl.c Modified: trunk/reactos/ntoskrnl/include/internal/kd.h Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c Modified: trunk/reactos/ntoskrnl/ke/i386/usertrap.c Modified: trunk/reactos/subsys/smss/smss.h _____ Modified: trunk/reactos/apps/utils/pice/module/symbols.c --- trunk/reactos/apps/utils/pice/module/symbols.c 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/apps/utils/pice/module/symbols.c 2005-06-21 04:10:45 UTC (rev 16203) @@ -167,7 +167,7 @@ { PLIST_ENTRY UserModuleListHead; PLIST_ENTRY Entry; - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; PPEB_LDR_DATA Ldr; ENTER_FUNC(); @@ -179,7 +179,7 @@ Entry = UserModuleListHead->Flink; while (Entry != UserModuleListHead) { - Module = CONTAINING_RECORD(Entry, LDR_MODULE, InLoadOrderModuleList); + Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); //DbgPrint("Module: %x, BaseAddress: %x\n", Module, Module->BaseAddress); DPRINT((0,"FullName: %S, BaseName: %S, Length: %ld, EntryPoint: %x, BaseAddress: %x\n", Module->FullDllName.Buffer, _____ Modified: trunk/reactos/apps/utils/sdkparse/test.h --- trunk/reactos/apps/utils/sdkparse/test.h 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/apps/utils/sdkparse/test.h 2005-06-21 04:10:45 UTC (rev 16203) @@ -89,7 +89,7 @@ typedef NTSTATUS NTAPI (*PPROCMOD_ENUM_ROUTINE) ( IN HANDLE ProcessHandle, - IN PLDR_MODULE CurrentModule, + IN PLDR_DATA_TABLE_ENTRY CurrentModule, IN OUT PVOID CallbackContext ); _____ Modified: trunk/reactos/include/epsapi.h --- trunk/reactos/include/epsapi.h 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/include/epsapi.h 2005-06-21 04:10:45 UTC (rev 16203) @@ -25,11 +25,9 @@ #ifndef __EPSAPI_H_INCLUDED__ #define __EPSAPI_H_INCLUDED__ -/* INCLUDES */ -#include <ntdll/ldr.h> /* FIXME: USE LDR_DATA_TABLE_ENTRY */ +/* Remove soon */ +#include <ntdll/ldr.h> -/* OBJECTS */ - /* TYPES */ typedef NTSTATUS (NTAPI *PPROC_ENUM_ROUTINE)(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess, IN OUT PVOID CallbackContext); @@ -41,7 +39,7 @@ IN OUT PVOID CallbackContext); typedef NTSTATUS (NTAPI *PPROCMOD_ENUM_ROUTINE)(IN HANDLE ProcessHandle, - IN PLDR_MODULE CurrentModule, + IN PLDR_DATA_TABLE_ENTRY CurrentModule, IN OUT PVOID CallbackContext); /* CONSTANTS */ _____ Modified: trunk/reactos/include/napi/types.h --- trunk/reactos/include/napi/types.h 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/include/napi/types.h 2005-06-21 04:10:45 UTC (rev 16203) @@ -6,7 +6,7 @@ /* * General type for status information */ - +#ifndef __USE_W32API typedef enum _NT_PRODUCT_TYPE { NtProductWinNt = 1, _____ Modified: trunk/reactos/include/ndk/ldrtypes.h --- trunk/reactos/include/ndk/ldrtypes.h 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/include/ndk/ldrtypes.h 2005-06-21 04:10:45 UTC (rev 16203) @@ -43,6 +43,7 @@ PVOID EntryInProgress; } PEB_LDR_DATA, *PPEB_LDR_DATA; +#if 0 typedef struct _LDR_DATA_TABLE_ENTRY { LIST_ENTRY InLoadOrderModuleList; @@ -63,6 +64,7 @@ PVOID LoadedImports; PVOID EntryPointActivationContext; } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY; +#endif typedef struct _LDR_RESOURCE_INFO { _____ Modified: trunk/reactos/include/ntdll/ldr.h --- trunk/reactos/include/ntdll/ldr.h 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/include/ntdll/ldr.h 2005-06-21 04:10:45 UTC (rev 16203) @@ -54,29 +54,32 @@ #define PROCESS_ATTACH_CALLED 0x00080000 #define IMAGE_NOT_AT_BASE 0x00200000 -typedef struct _LDR_MODULE +typedef struct _LDR_DATA_TABLE_ENTRY { - LIST_ENTRY InLoadOrderModuleList; - LIST_ENTRY InMemoryOrderModuleList; /* not used */ - LIST_ENTRY InInitializationOrderModuleList; /* not used */ - PVOID BaseAddress; - ULONG EntryPoint; - ULONG ResidentSize; - UNICODE_STRING FullDllName; - UNICODE_STRING BaseDllName; - ULONG Flags; - SHORT LoadCount; - SHORT TlsIndex; - HANDLE SectionHandle; - ULONG CheckSum; - ULONG TimeDateStamp; + LIST_ENTRY InLoadOrderModuleList; + LIST_ENTRY InMemoryOrderModuleList; + LIST_ENTRY InInitializationOrderModuleList; + PVOID DllBase; + PVOID EntryPoint; + ULONG SizeOfImage; + UNICODE_STRING FullDllName; + UNICODE_STRING BaseDllName; + ULONG Flags; + SHORT LoadCount; /* FIXME: HACK!!! FIX ASAP */ + SHORT TlsIndex; /* FIXME: HACK!!! FIX ASAP */ + LIST_ENTRY HashLinks; + PVOID SectionPointer; + ULONG CheckSum; + ULONG TimeDateStamp; + PVOID LoadedImports; + PVOID EntryPointActivationContext; #if defined(DBG) || defined(KDBG) - PROSSYM_INFO RosSymInfo; + PROSSYM_INFO RosSymInfo; /* FIXME: THIS _REALLY_ NEEDS TO GO (TLS?)!!! */ #endif /* KDBG */ -} LDR_MODULE, *PLDR_MODULE; +} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY; typedef struct _LDR_SYMBOL_INFO { - PLDR_MODULE ModuleObject; + PLDR_DATA_TABLE_ENTRY ModuleObject; ULONG_PTR ImageBase; PVOID SymbolsBuffer; ULONG SymbolsBufferLength; @@ -90,7 +93,7 @@ #if defined(KDBG) || defined(DBG) VOID -LdrpLoadUserModuleSymbols(PLDR_MODULE LdrModule); +LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule); #endif @@ -99,7 +102,7 @@ PEPFUNC LdrPEStartup (PVOID ImageBase, HANDLE SectionHandle, - PLDR_MODULE* Module, + PLDR_DATA_TABLE_ENTRY* Module, PWSTR FullDosName); NTSTATUS LdrMapSections(HANDLE ProcessHandle, PVOID ImageBase, @@ -120,7 +123,7 @@ NTSTATUS STDCALL LdrFindEntryForAddress(IN PVOID Address, - OUT PLDR_MODULE *Module); + OUT PLDR_DATA_TABLE_ENTRY *Module); NTSTATUS STDCALL LdrGetProcedureAddress(IN PVOID BaseAddress, _____ Modified: trunk/reactos/lib/epsapi/enum/modules.c --- trunk/reactos/lib/epsapi/enum/modules.c 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/lib/epsapi/enum/modules.c 2005-06-21 04:10:45 UTC (rev 16203) @@ -49,7 +49,7 @@ while(Current != ListHead) { - PLDR_MODULE LoaderModule = CONTAINING_RECORD(Current, LDR_MODULE, InLoadOrderModuleList); + PLDR_DATA_TABLE_ENTRY LoaderModule = CONTAINING_RECORD(Current, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); /* return the current module to the callback */ Status = Callback(ProcessHandle, LoaderModule, CallbackContext); @@ -73,7 +73,7 @@ { PROCESS_BASIC_INFORMATION BasicInformation; PPEB_LDR_DATA LoaderData; - LDR_MODULE LoaderModule; + LDR_DATA_TABLE_ENTRY LoaderModule; PLIST_ENTRY ListHead, Current; /* query the process basic information (includes the PEB address) */ @@ -116,7 +116,7 @@ { /* read the current module */ Status = NtReadVirtualMemory(ProcessHandle, - CONTAINING_RECORD(Current, LDR_MODULE, InLoadOrderModuleList), + CONTAINING_RECORD(Current, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList), &LoaderModule, sizeof(LoaderModule), NULL); _____ Modified: trunk/reactos/lib/kernel32/misc/ldr.c --- trunk/reactos/lib/kernel32/misc/ldr.c 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/lib/kernel32/misc/ldr.c 2005-06-21 04:10:45 UTC (rev 16203) @@ -268,7 +268,7 @@ ANSI_STRING FileName; PLIST_ENTRY ModuleListHead; PLIST_ENTRY Entry; - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; PPEB Peb; ULONG Length = 0; @@ -283,8 +283,8 @@ while (Entry != ModuleListHead) { - Module = CONTAINING_RECORD(Entry, LDR_MODULE, InLoadOrderModuleList); - if (Module->BaseAddress == (PVOID)hModule) + Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); + if (Module->DllBase == (PVOID)hModule) { if (nSize * sizeof(WCHAR) < Module->FullDllName.Length) { @@ -336,7 +336,7 @@ UNICODE_STRING FileName; PLIST_ENTRY ModuleListHead; PLIST_ENTRY Entry; - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; PPEB Peb; ULONG Length = 0; @@ -350,9 +350,9 @@ Entry = ModuleListHead->Flink; while (Entry != ModuleListHead) { - Module = CONTAINING_RECORD(Entry, LDR_MODULE, InLoadOrderModuleList); + Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); - if (Module->BaseAddress == (PVOID)hModule) + if (Module->DllBase == (PVOID)hModule) { if (nSize * sizeof(WCHAR) < Module->FullDllName.Length) { _____ Modified: trunk/reactos/lib/ntdll/inc/ntdllp.h --- trunk/reactos/lib/ntdll/inc/ntdllp.h 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/lib/ntdll/inc/ntdllp.h 2005-06-21 04:10:45 UTC (rev 16203) @@ -21,7 +21,7 @@ LdrpGetResidentSize(PIMAGE_NT_HEADERS NTHeaders); PEPFUNC LdrPEStartup (PVOID ImageBase, HANDLE SectionHandle, - PLDR_MODULE* Module, + PLDR_DATA_TABLE_ENTRY* Module, PWSTR FullDosName); #if 0 typedef BOOL @@ -36,7 +36,7 @@ ); #if defined(KDBG) || defined(DBG) VOID -LdrpLoadUserModuleSymbols(PLDR_MODULE LdrModule); +LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule); #endif extern HANDLE WindowsApiPort; _____ Modified: trunk/reactos/lib/ntdll/ldr/startup.c --- trunk/reactos/lib/ntdll/ldr/startup.c 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/lib/ntdll/ldr/startup.c 2005-06-21 04:10:45 UTC (rev 16203) @@ -26,7 +26,7 @@ static RTL_CRITICAL_SECTION PebLock; static RTL_CRITICAL_SECTION LoaderLock; static RTL_BITMAP TlsBitMap; -PLDR_MODULE ExeModule; +PLDR_DATA_TABLE_ENTRY ExeModule; NTSTATUS LdrpAttachThread (VOID); @@ -225,7 +225,7 @@ PIMAGE_DOS_HEADER PEDosHeader; PVOID ImageBase; PPEB Peb; - PLDR_MODULE NtModule; // ntdll + PLDR_DATA_TABLE_ENTRY NtModule; // ntdll NLSTABLEINFO NlsTable; WCHAR FullNtDllPath[MAX_PATH]; SYSTEM_BASIC_INFORMATION SystemInformation; @@ -350,17 +350,17 @@ wcscat (FullNtDllPath, L"\\system32\\ntdll.dll"); /* add entry for ntdll */ - NtModule = (PLDR_MODULE)RtlAllocateHeap (Peb->ProcessHeap, + NtModule = (PLDR_DATA_TABLE_ENTRY)RtlAllocateHeap (Peb->ProcessHeap, 0, - sizeof(LDR_MODULE)); + sizeof(LDR_DATA_TABLE_ENTRY)); if (NtModule == NULL) { DPRINT1("Failed to create loader module entry (NTDLL)\n"); ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL); } - memset(NtModule, 0, sizeof(LDR_MODULE)); + memset(NtModule, 0, sizeof(LDR_DATA_TABLE_ENTRY)); - NtModule->BaseAddress = (PVOID)&_image_base__; + NtModule->DllBase = (PVOID)&_image_base__; NtModule->EntryPoint = 0; /* no entry point */ RtlCreateUnicodeString (&NtModule->FullDllName, FullNtDllPath); @@ -370,11 +370,11 @@ NtModule->LoadCount = -1; /* don't unload */ NtModule->TlsIndex = -1; - NtModule->SectionHandle = NULL; + NtModule->SectionPointer = NULL; NtModule->CheckSum = 0; - NTHeaders = RtlImageNtHeader (NtModule->BaseAddress); - NtModule->ResidentSize = LdrpGetResidentSize(NTHeaders); + NTHeaders = RtlImageNtHeader (NtModule->DllBase); + NtModule->SizeOfImage = LdrpGetResidentSize(NTHeaders); NtModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp; InsertTailList(&Peb->Ldr->InLoadOrderModuleList, @@ -389,15 +389,15 @@ #endif /* DBG || KDBG */ /* add entry for executable (becomes first list entry) */ - ExeModule = (PLDR_MODULE)RtlAllocateHeap (Peb->ProcessHeap, + ExeModule = (PLDR_DATA_TABLE_ENTRY)RtlAllocateHeap (Peb->ProcessHeap, 0, - sizeof(LDR_MODULE)); + sizeof(LDR_DATA_TABLE_ENTRY)); if (ExeModule == NULL) { DPRINT1("Failed to create loader module infomation\n"); ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL); } - ExeModule->BaseAddress = Peb->ImageBaseAddress; + ExeModule->DllBase = Peb->ImageBaseAddress; if ((Peb->ProcessParameters == NULL) || (Peb->ProcessParameters->ImagePathName.Length == 0)) @@ -418,11 +418,11 @@ ExeModule->Flags = ENTRY_PROCESSED; ExeModule->LoadCount = -1; /* don't unload */ ExeModule->TlsIndex = -1; - ExeModule->SectionHandle = NULL; + ExeModule->SectionPointer = NULL; ExeModule->CheckSum = 0; - NTHeaders = RtlImageNtHeader (ExeModule->BaseAddress); - ExeModule->ResidentSize = LdrpGetResidentSize(NTHeaders); + NTHeaders = RtlImageNtHeader (ExeModule->DllBase); + ExeModule->SizeOfImage = LdrpGetResidentSize(NTHeaders); ExeModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp; InsertHeadList(&Peb->Ldr->InLoadOrderModuleList, @@ -437,7 +437,7 @@ #endif /* DBG || KDBG */ EntryPoint = LdrPEStartup((PVOID)ImageBase, NULL, NULL, NULL); - ExeModule->EntryPoint = (ULONG)EntryPoint; + ExeModule->EntryPoint = EntryPoint; /* all required dlls are loaded now */ Peb->Ldr->Initialized = TRUE; _____ Modified: trunk/reactos/lib/ntdll/ldr/utils.c --- trunk/reactos/lib/ntdll/ldr/utils.c 2005-06-21 02:58:22 UTC (rev 16202) +++ trunk/reactos/lib/ntdll/ldr/utils.c 2005-06-21 04:10:45 UTC (rev 16203) @@ -42,7 +42,7 @@ DWORD TlsDataSize; DWORD TlsZeroSize; PIMAGE_TLS_CALLBACK TlsAddressOfCallBacks; - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; } TLS_DATA, *PTLS_DATA; static PTLS_DATA LdrpTlsArray = NULL; @@ -50,18 +50,18 @@ static ULONG LdrpTlsSize = 0; static HANDLE LdrpKnownDllsDirHandle = NULL; static UNICODE_STRING LdrpKnownDllPath = {0, 0, NULL}; -static PLDR_MODULE LdrpLastModule = NULL; -extern PLDR_MODULE ExeModule; +static PLDR_DATA_TABLE_ENTRY LdrpLastModule = NULL; +extern PLDR_DATA_TABLE_ENTRY ExeModule; /* PROTOTYPES ****************************************************************/ -static NTSTATUS LdrFindEntryForName(PUNICODE_STRING Name, PLDR_MODULE *Module, BOOLEAN Ref); +static NTSTATUS LdrFindEntryForName(PUNICODE_STRING Name, PLDR_DATA_TABLE_ENTRY *Module, BOOLEAN Ref); static PVOID LdrFixupForward(PCHAR ForwardName); static PVOID LdrGetExportByName(PVOID BaseAddress, PUCHAR SymbolName, USHORT Hint); static NTSTATUS LdrpLoadModule(IN PWSTR SearchPath OPTIONAL, IN ULONG LoadFlags, IN PUNICODE_STRING Name, - OUT PLDR_MODULE *Module, + OUT PLDR_DATA_TABLE_ENTRY *Module, OUT PVOID *BaseAddress OPTIONAL); static NTSTATUS LdrpAttachProcess(VOID); static VOID LdrpDetachProcess(BOOLEAN UnloadAll); @@ -71,7 +71,7 @@ #if defined(DBG) || defined(KDBG) VOID -LdrpLoadUserModuleSymbols(PLDR_MODULE LdrModule) +LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule) { NtSystemDebugControl( DebugDbgLoadSymbols, @@ -96,7 +96,7 @@ return FALSE; } -static inline LONG LdrpDecrementLoadCount(PLDR_MODULE Module, BOOLEAN Locked) +static inline LONG LdrpDecrementLoadCount(PLDR_DATA_TABLE_ENTRY Module, BOOLEAN Locked) { LONG LoadCount; if (!Locked) @@ -115,7 +115,7 @@ return LoadCount; } -static inline LONG LdrpIncrementLoadCount(PLDR_MODULE Module, BOOLEAN Locked) +static inline LONG LdrpIncrementLoadCount(PLDR_DATA_TABLE_ENTRY Module, BOOLEAN Locked) { LONG LoadCount; if (!Locked) @@ -134,7 +134,7 @@ return LoadCount; } -static inline VOID LdrpAcquireTlsSlot(PLDR_MODULE Module, ULONG Size, BOOLEAN Locked) +static inline VOID LdrpAcquireTlsSlot(PLDR_DATA_TABLE_ENTRY Module, ULONG Size, BOOLEAN Locked) { if (!Locked) { @@ -149,7 +149,7 @@ } } -static inline VOID LdrpTlsCallback(PLDR_MODULE Module, ULONG dwReason) +static inline VOID LdrpTlsCallback(PLDR_DATA_TABLE_ENTRY Module, ULONG dwReason) { PIMAGE_TLS_CALLBACK TlsCallback; if (Module->TlsIndex >= 0 && Module->LoadCount == -1) @@ -161,14 +161,14 @@ { TRACE_LDR("%wZ - Calling tls callback at %x\n", &Module->BaseDllName, TlsCallback); - TlsCallback(Module->BaseAddress, dwReason, NULL); + TlsCallback(Module->DllBase, dwReason, NULL); TlsCallback++; } } } } -static BOOLEAN LdrpCallDllEntry(PLDR_MODULE Module, DWORD dwReason, PVOID lpReserved) +static BOOLEAN LdrpCallDllEntry(PLDR_DATA_TABLE_ENTRY Module, DWORD dwReason, PVOID lpReserved) { if (!(Module->Flags & IMAGE_DLL) || Module->EntryPoint == 0) @@ -176,7 +176,7 @@ return TRUE; } LdrpTlsCallback(Module, dwReason); - return ((PDLLMAIN_FUNC)Module->EntryPoint)(Module->BaseAddress, dwReason, lpReserved); + return ((PDLLMAIN_FUNC)Module->EntryPoint)(Module->DllBase, dwReason, lpReserved); } static NTSTATUS @@ -234,7 +234,7 @@ { PLIST_ENTRY ModuleListHead; PLIST_ENTRY Entry; - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; PIMAGE_TLS_DIRECTORY TlsDirectory; PTLS_DATA TlsData; @@ -255,12 +255,12 @@ Entry = ModuleListHead->Flink; while (Entry != ModuleListHead) { - Module = CONTAINING_RECORD(Entry, LDR_MODULE, InLoadOrderModuleList); + Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); if (Module->LoadCount == -1 && Module->TlsIndex >= 0) { TlsDirectory = (PIMAGE_TLS_DIRECTORY) - RtlImageDirectoryEntryToData(Module->BaseAddress, + RtlImageDirectoryEntryToData(Module->DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_TLS, NULL); @@ -458,21 +458,21 @@ RtlCreateUnicodeString(FullDllName, Buffer); } -PLDR_MODULE +PLDR_DATA_TABLE_ENTRY LdrAddModuleEntry(PVOID ImageBase, PIMAGE_NT_HEADERS NTHeaders, PWSTR FullDosName) { - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; - Module = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof (LDR_MODULE)); + Module = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof (LDR_DATA_TABLE_ENTRY)); ASSERT(Module); - memset(Module, 0, sizeof(LDR_MODULE)); - Module->BaseAddress = (PVOID)ImageBase; - Module->EntryPoint = NTHeaders->OptionalHeader.AddressOfEntryPoint; + memset(Module, 0, sizeof(LDR_DATA_TABLE_ENTRY)); + Module->DllBase = (PVOID)ImageBase; + Module->EntryPoint = (PVOID)NTHeaders->OptionalHeader.AddressOfEntryPoint; if (Module->EntryPoint != 0) - Module->EntryPoint += (ULONG)Module->BaseAddress; - Module->ResidentSize = LdrpGetResidentSize(NTHeaders); + Module->EntryPoint += (ULONG)Module->DllBase; + Module->SizeOfImage = LdrpGetResidentSize(NTHeaders); if (NtCurrentPeb()->Ldr->Initialized == TRUE) { /* loading while app is running */ @@ -728,7 +728,7 @@ OUT PVOID *BaseAddress OPTIONAL) { NTSTATUS Status; - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; TRACE_LDR("LdrLoadDll, loading %wZ%s%S\n", Name, @@ -751,7 +751,7 @@ RtlLeaveCriticalSection(NtCurrentPeb()->LoaderLock); if (NT_SUCCESS(Status)) { - *BaseAddress = Module->BaseAddress; + *BaseAddress = Module->DllBase; } } return Status; @@ -776,11 +776,11 @@ */ NTSTATUS STDCALL LdrFindEntryForAddress(PVOID Address, - PLDR_MODULE *Module) + PLDR_DATA_TABLE_ENTRY *Module) { PLIST_ENTRY ModuleListHead; PLIST_ENTRY Entry; - PLDR_MODULE ModulePtr; + PLDR_DATA_TABLE_ENTRY ModulePtr; DPRINT("LdrFindEntryForAddress(Address %p)\n", Address); @@ -798,12 +798,12 @@ while (Entry != ModuleListHead) { - ModulePtr = CONTAINING_RECORD(Entry, LDR_MODULE, InLoadOrderModuleList); + ModulePtr = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); - DPRINT("Scanning %wZ at %p\n", &ModulePtr->BaseDllName, ModulePtr->BaseAddress); + DPRINT("Scanning %wZ at %p\n", &ModulePtr->BaseDllName, ModulePtr->DllBase); - if ((Address >= ModulePtr->BaseAddress) && - (Address <= (ModulePtr->BaseAddress + ModulePtr->ResidentSize))) + if ((Address >= ModulePtr->DllBase) && + (Address <= (ModulePtr->DllBase + ModulePtr->SizeOfImage))) { *Module = ModulePtr; RtlLeaveCriticalSection(NtCurrentPeb()->LoaderLock); @@ -837,12 +837,12 @@ */ static NTSTATUS LdrFindEntryForName(PUNICODE_STRING Name, - PLDR_MODULE *Module, + PLDR_DATA_TABLE_ENTRY *Module, BOOLEAN Ref) { PLIST_ENTRY ModuleListHead; PLIST_ENTRY Entry; - PLDR_MODULE ModulePtr; + PLDR_DATA_TABLE_ENTRY ModulePtr; BOOLEAN ContainsPath; UNICODE_STRING AdjustedName; unsigned i; @@ -897,7 +897,7 @@ } while (Entry != ModuleListHead) { - ModulePtr = CONTAINING_RECORD(Entry, LDR_MODULE, InLoadOrderModuleList); + ModulePtr = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); DPRINT("Scanning %wZ %wZ\n", &ModulePtr->BaseDllName, &AdjustedName); @@ -947,7 +947,7 @@ UNICODE_STRING DllName; NTSTATUS Status; PCHAR p; - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; PVOID BaseAddress; strcpy(NameBuffer, ForwardName); @@ -982,9 +982,9 @@ return NULL; } - DPRINT("BaseAddress: %p\n", Module->BaseAddress); + DPRINT("BaseAddress: %p\n", Module->DllBase); - return LdrGetExportByName(Module->BaseAddress, (PUCHAR)(p+1), -1); + return LdrGetExportByName(Module->DllBase, (PUCHAR)(p+1), -1); } return NULL; @@ -1341,7 +1341,7 @@ static NTSTATUS LdrpGetOrLoadModule(PWCHAR SerachPath, PCHAR Name, - PLDR_MODULE* Module, + PLDR_DATA_TABLE_ENTRY* Module, BOOLEAN Load) { UNICODE_STRING DllName; @@ -1373,8 +1373,8 @@ } static NTSTATUS -LdrpProcessImportDirectoryEntry(PLDR_MODULE Module, - PLDR_MODULE ImportedModule, +LdrpProcessImportDirectoryEntry(PLDR_DATA_TABLE_ENTRY Module, + PLDR_DATA_TABLE_ENTRY ImportedModule, PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory) { NTSTATUS Status; @@ -1391,16 +1391,16 @@ } /* Get the import address list. */ - ImportAddressList = (PVOID *)(Module->BaseAddress + (ULONG_PTR)ImportModuleDirectory->FirstThunk); + ImportAddressList = (PVOID *)(Module->DllBase + (ULONG_PTR)ImportModuleDirectory->FirstThunk); /* Get the list of functions to import. */ if (ImportModuleDirectory->OriginalFirstThunk != 0) { - FunctionNameList = (PULONG) (Module->BaseAddress + (ULONG_PTR)ImportModuleDirectory->OriginalFirstThunk); + FunctionNameList = (PULONG) (Module->DllBase + (ULONG_PTR)ImportModuleDirectory->OriginalFirstThunk); } else { - FunctionNameList = (PULONG)(Module->BaseAddress + (ULONG_PTR)ImportModuleDirectory->FirstThunk); + FunctionNameList = (PULONG)(Module->DllBase + (ULONG_PTR)ImportModuleDirectory->FirstThunk); } /* Get the size of IAT. */ @@ -1430,7 +1430,7 @@ if ((*FunctionNameList) & 0x80000000) { Ordinal = (*FunctionNameList) & 0x7fffffff; - *ImportAddressList = LdrGetExportByOrdinal(ImportedModule->BaseAddress, Ordinal); + *ImportAddressList = LdrGetExportByOrdinal(ImportedModule->DllBase, Ordinal); if ((*ImportAddressList) == NULL) { DPRINT1("Failed to import #%ld from %wZ\n", Ordinal, &ImportedModule->FullDllName); @@ -1440,8 +1440,8 @@ else { IMAGE_IMPORT_BY_NAME *pe_name; - pe_name = RVA(Module->BaseAddress, *FunctionNameList); - *ImportAddressList = LdrGetExportByName(ImportedModule->BaseAddress, pe_name->Name, pe_name->Hint); + pe_name = RVA(Module->DllBase, *FunctionNameList); + *ImportAddressList = LdrGetExportByName(ImportedModule->DllBase, pe_name->Name, pe_name->Hint); if ((*ImportAddressList) == NULL) { DPRINT1("Failed to import %s from %wZ\n", pe_name->Name, &ImportedModule->FullDllName); @@ -1469,8 +1469,8 @@ static NTSTATUS LdrpProcessImportDirectory( - PLDR_MODULE Module, - PLDR_MODULE ImportedModule, + PLDR_DATA_TABLE_ENTRY Module, + PLDR_DATA_TABLE_ENTRY ImportedModule, PCHAR ImportedName) { NTSTATUS Status; @@ -1482,7 +1482,7 @@ ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->BaseAddress, + RtlImageDirectoryEntryToData(Module->DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, NULL); @@ -1493,7 +1493,7 @@ while (ImportModuleDirectory->Name) { - Name = (PCHAR)Module->BaseAddress + ImportModuleDirectory->Name; + Name = (PCHAR)Module->DllBase + ImportModuleDirectory->Name; if (0 == _stricmp(Name, ImportedName)) { Status = LdrpProcessImportDirectoryEntry(Module, @@ -1513,8 +1513,8 @@ static NTSTATUS -LdrpAdjustImportDirectory(PLDR_MODULE Module, - PLDR_MODULE ImportedModule, +LdrpAdjustImportDirectory(PLDR_DATA_TABLE_ENTRY Module, + PLDR_DATA_TABLE_ENTRY ImportedModule, PCHAR ImportedName) { PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory; @@ -1534,7 +1534,7 @@ Module, &Module->BaseDllName, ImportedModule, &ImportedModule->BaseDllName, ImportedName); ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->BaseAddress, + RtlImageDirectoryEntryToData(Module->DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, NULL); @@ -1545,21 +1545,21 @@ while (ImportModuleDirectory->Name) { - Name = (PCHAR)Module->BaseAddress + ImportModuleDirectory->Name; + Name = (PCHAR)Module->DllBase + ImportModuleDirectory->Name; if (0 == _stricmp(Name, (PCHAR)ImportedName)) { /* Get the import address list. */ - ImportAddressList = (PVOID *)(Module->BaseAddress + (ULONG_PTR)ImportModuleDirectory->FirstThunk); + ImportAddressList = (PVOID *)(Module->DllBase + (ULONG_PTR)ImportModuleDirectory->FirstThunk); /* Get the list of functions to import. */ if (ImportModuleDirectory->OriginalFirstThunk != 0) { - FunctionNameList = (PULONG) (Module->BaseAddress + (ULONG_PTR)ImportModuleDirectory->OriginalFirstThunk); + FunctionNameList = (PULONG) (Module->DllBase + (ULONG_PTR)ImportModuleDirectory->OriginalFirstThunk); } else { - FunctionNameList = (PULONG)(Module->BaseAddress + (ULONG_PTR)ImportModuleDirectory->FirstThunk); + FunctionNameList = (PULONG)(Module->DllBase + (ULONG_PTR)ImportModuleDirectory->FirstThunk); } /* Get the size of IAT. */ @@ -1583,10 +1583,10 @@ return(Status); } - NTHeaders = RtlImageNtHeader (ImportedModule->BaseAddress); + NTHeaders = RtlImageNtHeader (ImportedModule->DllBase); Start = (PVOID)NTHeaders->OptionalHeader.ImageBase; - End = Start + ImportedModule->ResidentSize; - Offset = ImportedModule->BaseAddress - Start; + End = Start + ImportedModule->SizeOfImage; + Offset = ImportedModule->DllBase - Start; /* Walk through function list and fixup addresses. */ while (*FunctionNameList != 0L) @@ -1636,7 +1636,7 @@ */ static NTSTATUS LdrFixupImports(IN PWSTR SearchPath OPTIONAL, - IN PLDR_MODULE Module) + IN PLDR_DATA_TABLE_ENTRY Module) { PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory; PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectoryCurrent; @@ -1645,14 +1645,14 @@ PIMAGE_TLS_DIRECTORY TlsDirectory; ULONG TlsSize = 0; NTSTATUS Status; - PLDR_MODULE ImportedModule; + PLDR_DATA_TABLE_ENTRY ImportedModule; PCHAR ImportedName; DPRINT("LdrFixupImports(SearchPath %x, Module %x)\n", SearchPath, Module); /* Check for tls data */ TlsDirectory = (PIMAGE_TLS_DIRECTORY) - RtlImageDirectoryEntryToData(Module->BaseAddress, + RtlImageDirectoryEntryToData(Module->DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_TLS, NULL); @@ -1673,13 +1673,13 @@ * Process each import module. */ ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->BaseAddress, + RtlImageDirectoryEntryToData(Module->DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, NULL); BoundImportDescriptor = (PIMAGE_BOUND_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->BaseAddress, + RtlImageDirectoryEntryToData(Module->DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT, NULL); @@ -1737,7 +1737,7 @@ { PIMAGE_BOUND_FORWARDER_REF BoundForwarderRef; ULONG i; - PLDR_MODULE ForwarderModule; + PLDR_DATA_TABLE_ENTRY ForwarderModule; PCHAR ForwarderName; BoundForwarderRef = (PIMAGE_BOUND_FORWARDER_REF)(BoundImportDescriptorCurrent + 1); @@ -1821,7 +1821,7 @@ ImportModuleDirectoryCurrent = ImportModuleDirectory; while (ImportModuleDirectoryCurrent->Name) { - ImportedName = (PCHAR)Module->BaseAddress + ImportModuleDirectoryCurrent->Name; + ImportedName = (PCHAR)Module->DllBase + ImportModuleDirectoryCurrent->Name; TRACE_LDR("%wZ imports functions from %s\n", &Module->BaseDllName, ImportedName); Status = LdrpGetOrLoadModule(SearchPath, ImportedName, &ImportedModule, TRUE); @@ -1886,14 +1886,14 @@ */ PEPFUNC LdrPEStartup (PVOID ImageBase, HANDLE SectionHandle, - PLDR_MODULE* Module, + PLDR_DATA_TABLE_ENTRY* Module, PWSTR FullDosName) { NTSTATUS Status; PEPFUNC EntryPoint = NULL; PIMAGE_DOS_HEADER DosHeader; PIMAGE_NT_HEADERS NTHeaders; - PLDR_MODULE tmpModule; + PLDR_DATA_TABLE_ENTRY tmpModule; DPRINT("LdrPEStartup(ImageBase %x SectionHandle %x)\n", ImageBase, (ULONG)SectionHandle); @@ -1924,7 +1924,7 @@ if (Module != NULL) { *Module = LdrAddModuleEntry(ImageBase, NTHeaders, FullDosName); - (*Module)->SectionHandle = SectionHandle; + (*Module)->SectionPointer = SectionHandle; } else { @@ -1989,13 +1989,13 @@ LdrpLoadModule(IN PWSTR SearchPath OPTIONAL, IN ULONG LoadFlags, IN PUNICODE_STRING Name, - PLDR_MODULE *Module, + PLDR_DATA_TABLE_ENTRY *Module, PVOID *BaseAddress OPTIONAL) { UNICODE_STRING AdjustedName; UNICODE_STRING FullDosName; NTSTATUS Status; - PLDR_MODULE tmpModule; + PLDR_DATA_TABLE_ENTRY tmpModule; HANDLE SectionHandle; ULONG ViewSize; PVOID ImageBase; @@ -2019,7 +2019,7 @@ RtlFreeUnicodeString(&AdjustedName); if (NULL != BaseAddress) { - *BaseAddress = (*Module)->BaseAddress; + *BaseAddress = (*Module)->DllBase; } } else @@ -2104,7 +2104,7 @@ } } *Module = LdrAddModuleEntry(ImageBase, NtHeaders, FullDosName.Buffer); - (*Module)->SectionHandle = SectionHandle; + (*Module)->SectionPointer = SectionHandle; if (ImageBase != (PVOID) NtHeaders->OptionalHeader.ImageBase) { (*Module)->Flags |= IMAGE_NOT_AT_BASE; @@ -2132,14 +2132,14 @@ } static NTSTATUS -LdrpUnloadModule(PLDR_MODULE Module, +LdrpUnloadModule(PLDR_DATA_TABLE_ENTRY Module, BOOLEAN Unload) { PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory; PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundImportDescriptor; PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundImportDescriptorCurrent; PCHAR ImportedName; - PLDR_MODULE ImportedModule; + PLDR_DATA_TABLE_ENTRY ImportedModule; NTSTATUS Status; LONG LoadCount; @@ -2160,7 +2160,7 @@ else if (LoadCount == 1) { BoundImportDescriptor = (PIMAGE_BOUND_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->BaseAddress, + RtlImageDirectoryEntryToData(Module->DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT, NULL); @@ -2194,7 +2194,7 @@ else { ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->BaseAddress, + RtlImageDirectoryEntryToData(Module->DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, NULL); @@ -2203,7 +2203,7 @@ /* dereferencing all imported modules, use the import descriptor */ while (ImportModuleDirectory->Name) { - ImportedName = (PCHAR)Module->BaseAddress + ImportModuleDirectory->Name; + ImportedName = (PCHAR)Module->DllBase + ImportModuleDirectory->Name; TRACE_LDR("%wZ trys to unload %s\n", &Module->BaseDllName, ImportedName); Status = LdrpGetOrLoadModule(NULL, ImportedName, &ImportedModule, FALSE); if (!NT_SUCCESS(Status)) @@ -2242,7 +2242,7 @@ NTSTATUS STDCALL LdrUnloadDll (IN PVOID BaseAddress) { - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; NTSTATUS Status; if (BaseAddress == NULL) @@ -2273,7 +2273,7 @@ { PLIST_ENTRY ModuleListHead; PLIST_ENTRY Entry; - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; NTSTATUS Status; DPRINT("LdrDisableThreadCalloutsForDll (BaseAddress %x)\n", BaseAddress); @@ -2284,11 +2284,11 @@ Entry = ModuleListHead->Flink; while (Entry != ModuleListHead) { - Module = CONTAINING_RECORD(Entry, LDR_MODULE, InLoadOrderModuleList); + Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); - DPRINT("BaseDllName %wZ BaseAddress %x\n", &Module->BaseDllName, Module->BaseAddress); + DPRINT("BaseDllName %wZ BaseAddress %x\n", &Module->BaseDllName, Module->DllBase); - if (Module->BaseAddress == BaseAddress) + if (Module->DllBase == BaseAddress) { if (Module->TlsIndex == -1) { @@ -2312,7 +2312,7 @@ IN PUNICODE_STRING DllName, OUT PVOID* BaseAddress) { - PLDR_MODULE Module; + PLDR_DATA_TABLE_ENTRY Module; NTSTATUS Status; TRACE_LDR("LdrGetDllHandle, searching for %wZ from %S\n", DllName, Path ? Path : L""); @@ -2320,7 +2320,7 @@ /* NULL is the current executable */ if (DllName == NULL) { - *BaseAddress = ExeModule->BaseAddress; + *BaseAddress = ExeModule->DllBase; DPRINT("BaseAddress %x\n", *BaseAddress); return STATUS_SUCCESS; } @@ -2328,7 +2328,7 @@ Status = LdrFindEntryForName(DllName, &Module, FALSE); if (NT_SUCCESS(Status)) { [truncated at 1000 lines; 367 more skipped]
19 years, 3 months
1
0
0
0
[ion] 16202: Last build fix...sorry
by ion@svn.reactos.com
Last build fix...sorry Modified: trunk/reactos/include/ndk/rtlfuncs.h Modified: trunk/reactos/include/ndk/rtltypes.h _____ Modified: trunk/reactos/include/ndk/rtlfuncs.h --- trunk/reactos/include/ndk/rtlfuncs.h 2005-06-21 02:47:55 UTC (rev 16201) +++ trunk/reactos/include/ndk/rtlfuncs.h 2005-06-21 02:58:22 UTC (rev 16202) @@ -210,7 +210,7 @@ STDCALL RtlAddVectoredExceptionHandler( IN ULONG FirstHandler, - IN PRTL_VECTORED_EXCEPTION_HANDLER VectoredHandler + IN PVECTORED_EXCEPTION_HANDLER VectoredHandler ); VOID _____ Modified: trunk/reactos/include/ndk/rtltypes.h --- trunk/reactos/include/ndk/rtltypes.h 2005-06-21 02:47:55 UTC (rev 16201) +++ trunk/reactos/include/ndk/rtltypes.h 2005-06-21 02:58:22 UTC (rev 16202) @@ -87,7 +87,7 @@ PVOID ); -typedef LONG (STDCALL *PRTL_VECTORED_EXCEPTION_HANDLER)( +typedef LONG (STDCALL *PVECTORED_EXCEPTION_HANDLER)( PEXCEPTION_POINTERS ExceptionPointers );
19 years, 3 months
1
0
0
0
[ion] 16201: Fix build
by ion@svn.reactos.com
Fix build Modified: trunk/reactos/include/epsapi.h _____ Modified: trunk/reactos/include/epsapi.h --- trunk/reactos/include/epsapi.h 2005-06-21 02:11:45 UTC (rev 16200) +++ trunk/reactos/include/epsapi.h 2005-06-21 02:47:55 UTC (rev 16201) @@ -26,7 +26,6 @@ #define __EPSAPI_H_INCLUDED__ /* INCLUDES */ -#include <ntdll/rtl.h> #include <ntdll/ldr.h> /* FIXME: USE LDR_DATA_TABLE_ENTRY */ /* OBJECTS */
19 years, 3 months
1
0
0
0
[ion] 16200: Add uncleaned start of internal ntdll header
by ion@svn.reactos.com
Add uncleaned start of internal ntdll header Added: trunk/reactos/lib/ntdll/inc/ntdllp.h _____ Added: trunk/reactos/lib/ntdll/inc/ntdllp.h --- trunk/reactos/lib/ntdll/inc/ntdllp.h 2005-06-21 02:08:42 UTC (rev 16199) +++ trunk/reactos/lib/ntdll/inc/ntdllp.h 2005-06-21 02:11:45 UTC (rev 16200) @@ -0,0 +1,78 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS System Libraries + * FILE: lib/ntdll/inc/ntdllp.h + * PURPOSE: Native Libary Internal Header + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + */ + +/* INCLUDES ******************************************************************/ + +/* FIXME: Cleanup this mess */ +//typedef NTSTATUS (STDCALL *PEPFUNC)(PPEB); +NTSTATUS LdrMapSections(HANDLE ProcessHandle, + PVOID ImageBase, + HANDLE SectionHandle, + PIMAGE_NT_HEADERS NTHeaders); +NTSTATUS LdrMapNTDllForProcess(HANDLE ProcessHandle, + PHANDLE NTDllSectionHandle); +BOOLEAN LdrMappedAsDataFile(PVOID *BaseAddress); +ULONG +LdrpGetResidentSize(PIMAGE_NT_HEADERS NTHeaders); +PEPFUNC LdrPEStartup (PVOID ImageBase, + HANDLE SectionHandle, + PLDR_MODULE* Module, + PWSTR FullDosName); +#if 0 +typedef BOOL +(STDCALL *PDLLMAIN_FUNC)(HANDLE hInst, + ULONG ul_reason_for_call, + LPVOID lpReserved); +#endif +VOID +STDCALL +RtlpInitDeferedCriticalSection( + VOID +); +#if defined(KDBG) || defined(DBG) +VOID +LdrpLoadUserModuleSymbols(PLDR_MODULE LdrModule); +#endif +extern HANDLE WindowsApiPort; + +NTSTATUS +STDCALL +RtlpWaitForCriticalSection( + PRTL_CRITICAL_SECTION CriticalSection +); + +VOID +STDCALL +RtlpUnWaitCriticalSection( + PRTL_CRITICAL_SECTION CriticalSection +); + +VOID +STDCALL +RtlpCreateCriticalSectionSem( + PRTL_CRITICAL_SECTION CriticalSection +); + +VOID +STDCALL +RtlpInitDeferedCriticalSection( + VOID +); + +VOID +STDCALL +RtlpFreeDebugInfo( + PRTL_CRITICAL_SECTION_DEBUG DebugInfo +); + +PRTL_CRITICAL_SECTION_DEBUG +STDCALL +RtlpAllocateDebugInfo( + VOID +); +/* EOF */
19 years, 3 months
1
0
0
0
[ion] 16199: Add new header for native user-mode functios inside the NT library inside the NDK, it will end up replacing most of the exported parts of the ntdll headers. It's not used yet as it would conflict, I added a temporary guard for that. Also added many more types to rtlfuncs.h so that it's almost entirely complete, and took out non rtl-stuff and put it into the user-mode NT header
by ion@svn.reactos.com
Add new header for native user-mode functios inside the NT library inside the NDK, it will end up replacing most of the exported parts of the ntdll headers. It's not used yet as it would conflict, I added a temporary guard for that. Also added many more types to rtlfuncs.h so that it's almost entirely complete, and took out non rtl-stuff and put it into the user-mode NT header Modified: trunk/reactos/include/ndk/ldrtypes.h Modified: trunk/reactos/include/ndk/ntndk.h Modified: trunk/reactos/include/ndk/rtlfuncs.h Modified: trunk/reactos/include/ndk/rtltypes.h Added: trunk/reactos/include/ndk/umfuncs.h Modified: trunk/reactos/lib/kernel32/k32.h Modified: trunk/reactos/lib/ntdll/inc/ntdll.h Modified: trunk/reactos/subsys/csrss/init.c _____ Modified: trunk/reactos/include/ndk/ldrtypes.h --- trunk/reactos/include/ndk/ldrtypes.h 2005-06-21 00:23:09 UTC (rev 16198) +++ trunk/reactos/include/ndk/ldrtypes.h 2005-06-21 02:08:42 UTC (rev 16199) @@ -19,6 +19,15 @@ #define RESOURCE_LANGUAGE_LEVEL 2 #define RESOURCE_DATA_LEVEL 3 +/* FIXME: USE CORRRECT LDR_ FLAGS */ +#define IMAGE_DLL 0x00000004 +#define LOAD_IN_PROGRESS 0x00001000 +#define UNLOAD_IN_PROGRESS 0x00002000 +#define ENTRY_PROCESSED 0x00004000 +#define DONT_CALL_FOR_THREAD 0x00040000 +#define PROCESS_ATTACH_CALLED 0x00080000 +#define IMAGE_NOT_AT_BASE 0x00200000 + /* ENUMERATIONS **************************************************************/ /* TYPES *********************************************************************/ @@ -34,8 +43,26 @@ PVOID EntryInProgress; } PEB_LDR_DATA, *PPEB_LDR_DATA; -/* FIXME: Update with _LDR_DATA_TABLE_ENTRY and LDR_ flags */ -//typedef struct _LDR_MODULE +typedef struct _LDR_DATA_TABLE_ENTRY +{ + LIST_ENTRY InLoadOrderModuleList; + LIST_ENTRY InMemoryOrderModuleList; + LIST_ENTRY InInitializationOrderModuleList; + PVOID DllBase; + PVOID EntryPoint; + ULONG SizeOfImage; + UNICODE_STRING FullDllName; + UNICODE_STRING BaseDllName; + ULONG Flags; + SHORT LoadCount; /* FIXME: HACK!!! FIX ASAP */ + SHORT TlsIndex; /* FIXME: HACK!!! FIX ASAP */ + LIST_ENTRY HashLinks; + PVOID SectionPointer; + ULONG CheckSum; + ULONG TimeDateStamp; + PVOID LoadedImports; + PVOID EntryPointActivationContext; +} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY; typedef struct _LDR_RESOURCE_INFO { _____ Modified: trunk/reactos/include/ndk/ntndk.h --- trunk/reactos/include/ndk/ntndk.h 2005-06-21 00:23:09 UTC (rev 16198) +++ trunk/reactos/include/ndk/ntndk.h 2005-06-21 02:08:42 UTC (rev 16199) @@ -34,6 +34,9 @@ #else /* User-Mode NDK */ #include "umtypes.h" /* Native Types in DDK/IFS but not in PSDK */ + #ifdef READY_FOR_NEW_NTDLL /* This hack will be removed in the next commit */ + #include "umfuncs.h" /* User-Mode NT Library Functions */ + #endif #endif /* Shared NDK */ _____ Modified: trunk/reactos/include/ndk/rtlfuncs.h --- trunk/reactos/include/ndk/rtlfuncs.h 2005-06-21 00:23:09 UTC (rev 16198) +++ trunk/reactos/include/ndk/rtlfuncs.h 2005-06-21 02:08:42 UTC (rev 16199) @@ -204,22 +204,17 @@ } /* - * Debug Functions + * Error and Exception Functions */ - -ULONG -CDECL -DbgPrint( - IN PCH Format, - IN ... +PVOID +STDCALL +RtlAddVectoredExceptionHandler( + IN ULONG FirstHandler, + IN PRTL_VECTORED_EXCEPTION_HANDLER VectoredHandler ); VOID STDCALL -DbgBreakPoint(VOID); - -VOID -STDCALL RtlAssert( PVOID FailedAssertion, PVOID FileName, @@ -227,6 +222,14 @@ PCHAR Message ); +PVOID +STDCALL +RtlEncodePointer(IN PVOID Pointer); + +PVOID +STDCALL +RtlDecodePointer(IN PVOID Pointer); + ULONG STDCALL RtlNtStatusToDosError(IN NTSTATUS Status); @@ -271,6 +274,13 @@ IN PRTL_HEAP_DEFINITION Definition OPTIONAL ); +DWORD +STDCALL +RtlCompactHeap( + HANDLE heap, + DWORD flags +); + HANDLE STDCALL RtlDestroyHeap(HANDLE hheap); @@ -283,6 +293,13 @@ IN PVOID P ); +ULONG +STDCALL +RtlGetProcessHeaps( + ULONG HeapCount, + HANDLE *HeapArray +); + PVOID STDCALL RtlReAllocateHeap( @@ -1138,7 +1155,9 @@ /* * Process Management Functions - */ + */ +/* FIXME: Some of these will be split up into enviro/path functions */ + VOID STDCALL RtlAcquirePebLock(VOID); @@ -1224,6 +1243,41 @@ PULONG Length ); +BOOLEAN +STDCALL +RtlDoesFileExists_U(PWSTR FileName); + +ULONG +STDCALL +RtlDetermineDosPathNameType_U(PCWSTR Path); + +ULONG +STDCALL +RtlDosSearchPath_U( + WCHAR *sp, + WCHAR *name, + WCHAR *ext, + ULONG buf_sz, + WCHAR *buffer, + WCHAR **shortname +); + +ULONG +STDCALL +RtlGetCurrentDirectory_U( + ULONG MaximumLength, + PWSTR Buffer +); + +ULONG +STDCALL +RtlGetFullPathName_U( + const WCHAR *dosname, + ULONG size, + WCHAR *buf, + WCHAR **shortname +); + PRTL_USER_PROCESS_PARAMETERS STDCALL RtlNormalizeProcessParams( @@ -1240,6 +1294,10 @@ NTSTATUS STDCALL +RtlSetCurrentDirectory_U(PUNICODE_STRING name); + +NTSTATUS +STDCALL RtlSetEnvironmentVariable( PWSTR *Environment, PUNICODE_STRING Name, @@ -1267,6 +1325,13 @@ PRTL_CRITICAL_SECTION CriticalSection ); +NTSTATUS +STDCALL +RtlInitializeCriticalSectionAndSpinCount( + PRTL_CRITICAL_SECTION CriticalSection, + ULONG SpinCount +); + NTSTATUS STDCALL RtlLeaveCriticalSection( @@ -1309,6 +1374,28 @@ ); /* + * Debug Info Functions + */ +PDEBUG_BUFFER +STDCALL +RtlCreateQueryDebugBuffer( + IN ULONG Size, + IN BOOLEAN EventPair +); + +NTSTATUS +STDCALL +RtlDestroyQueryDebugBuffer(IN PDEBUG_BUFFER DebugBuffer); + +NTSTATUS +STDCALL +RtlQueryProcessDebugInformation( + IN ULONG ProcessId, + IN ULONG DebugInfoClassMask, + IN OUT PDEBUG_BUFFER DebugBuffer +); + +/* * Bitmap Functions */ BOOLEAN @@ -1368,19 +1455,115 @@ ); /* - * PE Functions + * Timer Functions */ -NTSTATUS +NTSTATUS STDCALL -LdrVerifyImageMatchesChecksum( - IN HANDLE FileHandle, - ULONG Unknown1, - ULONG Unknown2, - ULONG Unknown3 +RtlCreateTimer( + HANDLE TimerQueue, + PHANDLE phNewTimer, + WAITORTIMERCALLBACKFUNC Callback, + PVOID Parameter, + DWORD DueTime, + DWORD Period, + ULONG Flags ); NTSTATUS STDCALL +RtlCreateTimerQueue(PHANDLE TimerQueue); + +NTSTATUS +STDCALL +RtlDeleteTimer( + HANDLE TimerQueue, + HANDLE Timer, + HANDLE CompletionEvent +); + +NTSTATUS +STDCALL +RtlUpdateTimer( + HANDLE TimerQueue, + HANDLE Timer, + ULONG DueTime, + ULONG Period +); + +NTSTATUS +STDCALL +RtlDeleteTimerQueueEx( + HANDLE TimerQueue, + HANDLE CompletionEvent +); + +NTSTATUS +STDCALL +RtlDeleteTimerQueue(HANDLE TimerQueue); + +/* + * Debug Functions + */ +ULONG +CDECL +DbgPrint( + IN PCH Format, + IN ... +); + +VOID +STDCALL +DbgBreakPoint(VOID); + +/* + * Handle Table Functions + */ +PRTL_HANDLE +STDCALL +RtlAllocateHandle ( + IN PRTL_HANDLE_TABLE HandleTable, + IN OUT PULONG Index +); + +VOID +STDCALL +RtlDestroyHandleTable (IN PRTL_HANDLE_TABLE HandleTable); + +BOOLEAN +STDCALL +RtlFreeHandle ( + IN PRTL_HANDLE_TABLE HandleTable, + IN PRTL_HANDLE Handle +); + +VOID +STDCALL +RtlInitializeHandleTable ( + IN ULONG TableSize, + IN ULONG HandleSize, + IN PRTL_HANDLE_TABLE HandleTable +); + +BOOLEAN +STDCALL +RtlIsValidHandle ( + IN PRTL_HANDLE_TABLE HandleTable, + IN PRTL_HANDLE Handle +); + +BOOLEAN +STDCALL +RtlIsValidIndexHandle ( + IN PRTL_HANDLE_TABLE HandleTable, + IN OUT PRTL_HANDLE *Handle, + IN ULONG Index +); + +/* + * PE Functions + */ +NTSTATUS +STDCALL RtlFindMessage( IN PVOID BaseAddress, IN ULONG Type, @@ -1388,6 +1571,10 @@ IN ULONG MessageId, OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry ); + +ULONG +STDCALL +RtlGetNtGlobalFlags(VOID); PVOID STDCALL _____ Modified: trunk/reactos/include/ndk/rtltypes.h --- trunk/reactos/include/ndk/rtltypes.h 2005-06-21 00:23:09 UTC (rev 16198) +++ trunk/reactos/include/ndk/rtltypes.h 2005-06-21 02:08:42 UTC (rev 16199) @@ -43,6 +43,13 @@ #define RTL_RANGE_SHARED 0x01 #define RTL_RANGE_CONFLICT 0x02 +/* FIXME: Rename these */ +#define PDI_MODULES 0x01 /* The loaded modules of the process */ +#define PDI_BACKTRACE 0x02 /* The heap stack back traces */ +#define PDI_HEAPS 0x04 /* The heaps of the process */ +#define PDI_HEAP_TAGS 0x08 /* The heap tags */ +#define PDI_HEAP_BLOCKS 0x10 /* The heap blocks */ +#define PDI_LOCKS 0x20 /* The locks created by the process */ /* ENUMERATIONS **************************************************************/ typedef enum @@ -53,6 +60,18 @@ ExceptionCollidedUnwind } EXCEPTION_DISPOSITION; +typedef enum +{ + INVALID_PATH = 0, + UNC_PATH, /* "//foo" */ + ABSOLUTE_DRIVE_PATH, /* "c:/foo" */ + RELATIVE_DRIVE_PATH, /* "c:foo" */ + ABSOLUTE_PATH, /* "/foo" */ + RELATIVE_PATH, /* "foo" */ + DEVICE_PATH, /* "//./foo" */ + UNC_DOT_PATH /* "//." */ +} DOS_PATHNAME_TYPE; + /* FUNCTION TYPES ************************************************************/ typedef NTSTATUS (*PHEAP_ENUMERATION_ROUTINE)( @@ -68,6 +87,10 @@ PVOID ); +typedef LONG (STDCALL *PRTL_VECTORED_EXCEPTION_HANDLER)( + PEXCEPTION_POINTERS ExceptionPointers +); + typedef DWORD (STDCALL *PTHREAD_START_ROUTINE)( LPVOID Parameter ); @@ -91,6 +114,98 @@ ACCESS_MASK AccessMask; } ACE, *PACE; +/* FIXME: Review definitions and give these guys a better name */ +typedef struct _DEBUG_BUFFER +{ + HANDLE SectionHandle; + PVOID SectionBase; + PVOID RemoteSectionBase; + ULONG SectionBaseDelta; + HANDLE EventPairHandle; + ULONG Unknown[2]; + HANDLE RemoteThreadHandle; + ULONG InfoClassMask; + ULONG SizeOfInfo; + ULONG AllocatedSize; + ULONG SectionSize; + PVOID ModuleInformation; + PVOID BackTraceInformation; + PVOID HeapInformation; + PVOID LockInformation; + PVOID Reserved[8]; +} DEBUG_BUFFER, *PDEBUG_BUFFER; +typedef struct _DEBUG_MODULE_INFORMATION +{ + ULONG Reserved[2]; + PVOID Base; + ULONG Size; + ULONG Flags; + USHORT Index; + USHORT Unknown; + USHORT LoadCount; + USHORT ModuleNameOffset; + CHAR ImageName[256]; +} DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION; +typedef struct _DEBUG_HEAP_INFORMATION +{ + PVOID Base; + ULONG Flags; + USHORT Granularity; + USHORT Unknown; + ULONG Allocated; + ULONG Committed; + ULONG TagCount; + ULONG BlockCount; + ULONG Reserved[7]; + PVOID Tags; + PVOID Blocks; +} DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION; +typedef struct _DEBUG_LOCK_INFORMATION +{ + PVOID Address; + USHORT Type; + USHORT CreatorBackTraceIndex; + ULONG OwnerThreadId; + ULONG ActiveCount; + ULONG ContentionCount; + ULONG EntryCount; + ULONG RecursionCount; + ULONG NumberOfSharedWaiters; + ULONG NumberOfExclusiveWaiters; +} DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION; +typedef struct _RTL_HANDLE +{ + struct _RTL_HANDLE *Next; /* pointer to next free handle */ +} RTL_HANDLE, *PRTL_HANDLE; + +typedef struct _RTL_HANDLE_TABLE +{ + ULONG TableSize; /* maximum number of handles */ + ULONG HandleSize; /* size of handle in bytes */ + PRTL_HANDLE Handles; /* pointer to handle array */ + PRTL_HANDLE Limit; /* limit of pointers */ + PRTL_HANDLE FirstFree; /* pointer to first free handle */ + PRTL_HANDLE LastUsed; /* pointer to last allocated handle */ +} RTL_HANDLE_TABLE, *PRTL_HANDLE_TABLE; +#ifdef READY_FOR_NEW_NTDLL +typedef struct _LOCK_INFORMATION +{ + ULONG LockCount; + DEBUG_LOCK_INFORMATION LockEntry[1]; +} LOCK_INFORMATION, *PLOCK_INFORMATION; +typedef struct _HEAP_INFORMATION +{ + ULONG HeapCount; + DEBUG_HEAP_INFORMATION HeapEntry[1]; +} HEAP_INFORMATION, *PHEAP_INFORMATION; +typedef struct _MODULE_INFORMATION +{ + ULONG ModuleCount; + DEBUG_MODULE_INFORMATION ModuleEntry[1]; +} MODULE_INFORMATION, *PMODULE_INFORMATION; +/* END REVIEW AREA */ +#endif + typedef struct _EXCEPTION_REGISTRATION { struct _EXCEPTION_REGISTRATION* prev; @@ -138,6 +253,19 @@ PRTL_RANGE Range ); +typedef struct _RTL_RESOURCE +{ + RTL_CRITICAL_SECTION Lock; + HANDLE SharedSemaphore; + ULONG SharedWaiters; + HANDLE ExclusiveSemaphore; + ULONG ExclusiveWaiters; + LONG NumberActive; + HANDLE OwningThread; + ULONG TimeoutBoost; /* ?? */ + PVOID DebugInfo; /* ?? */ +} RTL_RESOURCE, *PRTL_RESOURCE; + typedef struct _RANGE_LIST_ITERATOR { PLIST_ENTRY RangeListHead; _____ Added: trunk/reactos/include/ndk/umfuncs.h --- trunk/reactos/include/ndk/umfuncs.h 2005-06-21 00:23:09 UTC (rev 16198) +++ trunk/reactos/include/ndk/umfuncs.h 2005-06-21 02:08:42 UTC (rev 16199) @@ -0,0 +1,218 @@ +/* + * PROJECT: ReactOS Native Headers + * FILE: include/ndk/umfuncs.h + * PURPOSE: Prototypes for NT Library Functions + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + */ +#ifndef _UMFUNCS_H +#define _UMFUNCS_H + +/* DEPENDENCIES **************************************************************/ +#include "ldrtypes.h" +#include "lpctypes.h" +#include <csrss/csrss.h> /* FIXME: Temporary */ + +/* PROTOTYPES ****************************************************************/ + +/* + * CSR Functions + */ +NTSTATUS +STDCALL +CsrClientConnectToServer(VOID); + +NTSTATUS +STDCALL +CsrClientCallServer( + PCSRSS_API_REQUEST Request, + PCSRSS_API_REPLY Reply OPTIONAL, + ULONG Length, + ULONG ReplyLength +); + +NTSTATUS +STDCALL +CsrIdentifyAlertableThread(VOID); + +NTSTATUS +STDCALL +CsrNewThread(VOID); + +NTSTATUS +STDCALL +CsrSetPriorityClass( + HANDLE Process, + PULONG PriorityClass +); + +VOID +STDCALL +CsrProbeForRead( + IN CONST PVOID Address, + IN ULONG Length, + IN ULONG Alignment +); + +VOID +STDCALL +CsrProbeForWrite( + IN CONST PVOID Address, + IN ULONG Length, + IN ULONG Alignment +); + +NTSTATUS +STDCALL +CsrCaptureParameterBuffer( + PVOID ParameterBuffer, + ULONG ParameterBufferSize, + PVOID* ClientAddress, + PVOID* ServerAddress +); + +NTSTATUS +STDCALL +CsrReleaseParameterBuffer(PVOID ClientAddress); + +/* + * Debug Functions + */ +ULONG +CDECL +DbgPrint( + IN PCH Format, + IN ... +); + +VOID +STDCALL +DbgBreakPoint(VOID); + +NTSTATUS +STDCALL +DbgSsInitialize( + HANDLE ReplyPort, + ULONG Unknown1, + ULONG Unknown2, + ULONG Unknown3 +); + +NTSTATUS +STDCALL +DbgUiConnectToDbg(VOID); + +NTSTATUS +STDCALL +DbgUiContinue( + PCLIENT_ID ClientId, + ULONG ContinueStatus +); + +NTSTATUS +STDCALL +DbgUiWaitStateChange( + ULONG Unknown1, + ULONG Unknown2 +); + +NTSTATUS +STDCALL +DbgUiRemoteBreakin(VOID); + +NTSTATUS +STDCALL +DbgUiIssueRemoteBreakin(HANDLE Process); + +/* + * Loader Functions + */ +NTSTATUS +STDCALL +LdrDisableThreadCalloutsForDll(IN PVOID BaseAddress); + +NTSTATUS +STDCALL +LdrGetDllHandle( + IN PWCHAR Path OPTIONAL, + IN ULONG Unknown2, + IN PUNICODE_STRING DllName, + OUT PVOID *BaseAddress +); + +NTSTATUS +STDCALL +LdrFindEntryForAddress( + IN PVOID Address, + OUT PLDR_DATA_TABLE_ENTRY *Module +); + +NTSTATUS +STDCALL +LdrGetProcedureAddress( + IN PVOID BaseAddress, + IN PANSI_STRING Name, + IN ULONG Ordinal, + OUT PVOID *ProcedureAddress +); + +VOID +STDCALL +LdrInitializeThunk( + ULONG Unknown1, + ULONG Unknown2, + ULONG Unknown3, + ULONG Unknown4 +); + +NTSTATUS +STDCALL +LdrLoadDll( + IN PWSTR SearchPath OPTIONAL, + IN ULONG LoadFlags, + IN PUNICODE_STRING Name, + OUT PVOID *BaseAddress OPTIONAL +); + +PIMAGE_BASE_RELOCATION +STDCALL +LdrProcessRelocationBlock( + IN PVOID Address, + IN USHORT Count, + IN PUSHORT TypeOffset, + IN ULONG_PTR Delta +); + +NTSTATUS +STDCALL +LdrQueryImageFileExecutionOptions( + IN PUNICODE_STRING SubKey, + IN PCWSTR ValueName, + IN ULONG ValueSize, + OUT PVOID Buffer, + IN ULONG BufferSize, + OUT PULONG RetunedLength OPTIONAL +); + +NTSTATUS +STDCALL +LdrShutdownProcess(VOID); + +NTSTATUS +STDCALL +LdrShutdownThread(VOID); + +NTSTATUS +STDCALL +LdrUnloadDll(IN PVOID BaseAddress); + +NTSTATUS +STDCALL +LdrVerifyImageMatchesChecksum( + IN HANDLE FileHandle, + ULONG Unknown1, + ULONG Unknown2, + ULONG Unknown3 +); + +#endif +/* EOF */ _____ Modified: trunk/reactos/lib/kernel32/k32.h --- trunk/reactos/lib/kernel32/k32.h 2005-06-21 00:23:09 UTC (rev 16198) +++ trunk/reactos/lib/kernel32/k32.h 2005-06-21 02:08:42 UTC (rev 16199) @@ -23,7 +23,6 @@ /* FIXME: Clean this sh*t up */ #include <ntdll/base.h> -#include <ntdll/rtl.h> #include <ntdll/dbg.h> #include <ntdll/csr.h> #include <ntdll/ldr.h> _____ Modified: trunk/reactos/lib/ntdll/inc/ntdll.h --- trunk/reactos/lib/ntdll/inc/ntdll.h 2005-06-21 00:23:09 UTC (rev 16198) +++ trunk/reactos/lib/ntdll/inc/ntdll.h 2005-06-21 02:08:42 UTC (rev 16199) @@ -13,13 +13,18 @@ #define NTOS_MODE_USER #include <ndk/ntndk.h> +/* NTDLL Headers FIXME: These will be gone imminently */ +#include <ntdll/ntdll.h> +#include <ntdll/ldr.h> +#include <ntdll/csr.h> + +/* Internal NTDLL */ +#include "ntdllp.h" + +/* CSRSS Header */ +#include <csrss/csrss.h> + /* Helper Macros */ #include <reactos/helper.h> -/* NTDLL Public Headers. FIXME: Combine/clean these after NDK */ -#include <ntdll/csr.h> -#include <ntdll/rtl.h> -#include <ntdll/ldr.h> -#include <ntdll/ntdll.h> - /* EOF */ _____ Modified: trunk/reactos/subsys/csrss/init.c --- trunk/reactos/subsys/csrss/init.c 2005-06-21 00:23:09 UTC (rev 16198) +++ trunk/reactos/subsys/csrss/init.c 2005-06-21 02:08:42 UTC (rev 16199) @@ -14,7 +14,6 @@ #define NTOS_MODE_USER #include <ndk/ntndk.h> #include <ntdll/csr.h> -#include <ntdll/rtl.h> #include <ntdll/ldr.h> #include <rosrtl/string.h> #include <sm/helper.h>
19 years, 3 months
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
65
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Results per page:
10
25
50
100
200