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
2025
January
2024
December
November
October
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
August 2005
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 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
23 participants
669 discussions
Start a n
N
ew thread
[ea] 17278: Some guessing on the API used by server DLLs.
by ea@svn.reactos.com
Some guessing on the API used by server DLLs. Modified: trunk/reactos/include/subsys/csr/protocol.h Modified: trunk/reactos/include/subsys/csr/server.h _____ Modified: trunk/reactos/include/subsys/csr/protocol.h --- trunk/reactos/include/subsys/csr/protocol.h 2005-08-11 03:23:44 UTC (rev 17277) +++ trunk/reactos/include/subsys/csr/protocol.h 2005-08-11 07:13:03 UTC (rev 17278) @@ -34,4 +34,4 @@ // } CSR_PORT_MESSAGE_HEADER, * PCSR_PORT_MESSAGE_HEADER; -#endif /* ndef __INCLUDE_CSR_LPCPROTO_H */ +#endif /* ndef __INCLUDE_CSR_PROTOCOL_H */ _____ Modified: trunk/reactos/include/subsys/csr/server.h --- trunk/reactos/include/subsys/csr/server.h 2005-08-11 03:23:44 UTC (rev 17277) +++ trunk/reactos/include/subsys/csr/server.h 2005-08-11 07:13:03 UTC (rev 17278) @@ -5,7 +5,9 @@ typedef struct _CSR_SESSION { - ULONG SessionId; + ULONG SessionId; + HANDLE Heap; + PVOID ServerData; } CSR_SESSION, * PCSR_SESSION; @@ -13,7 +15,9 @@ typedef struct _CSR_PROCESS { HANDLE Process; + PCSR_SESSION CsrSession; ULONG ReferenceCount; + PVOID ServerData; } CSR_PROCESS, * PCSR_PROCESS; @@ -23,6 +27,7 @@ PCSR_SESSION CsrSession; PCSR_PROCESS CsrProcess; ULONG ReferenceCount; + PVOID ServerData; } CSR_THREAD, * PCSR_THREAD; @@ -36,39 +41,38 @@ NTSTATUS STDCALL CsrAddStaticServerThread(); NTSTATUS STDCALL CsrCallServerFromServer(); -NTSTATUS STDCALL CsrConnectToUser(); -NTSTATUS STDCALL CsrCreateProcess(); +NTSTATUS STDCALL CsrCreateProcess(PCSR_SESSION,PCSR_PROCESS*); NTSTATUS STDCALL CsrCreateRemoteThread(); -NTSTATUS STDCALL CsrCreateSession(); -NTSTATUS STDCALL CsrCreateThread(); -NTSTATUS STDCALL CsrCreateWait(); -NTSTATUS STDCALL CsrDebugProcess(); -NTSTATUS STDCALL CsrDebugProcessStop(); -NTSTATUS STDCALL CsrDereferenceProcess(); -NTSTATUS STDCALL CsrDereferenceThread(); -NTSTATUS STDCALL CsrDereferenceWait(); -NTSTATUS STDCALL CsrDestroyProcess(); -NTSTATUS STDCALL CsrDestroyThread(); +NTSTATUS STDCALL CsrCreateSession(PCSR_SESSION*); +NTSTATUS STDCALL CsrCreateThread(PCSR_PROCESS,PCSR_THREAD*); +NTSTATUS STDCALL CsrCreateWait(PCSR_THREAD,PCSR_WAIT*); +NTSTATUS STDCALL CsrDebugProcess(PCSR_PROCESS); +NTSTATUS STDCALL CsrDebugProcessStop(PCSR_PROCESS); +NTSTATUS STDCALL CsrDereferenceProcess(PCSR_PROCESS); +NTSTATUS STDCALL CsrDereferenceThread(PCSR_THREAD); +NTSTATUS STDCALL CsrDereferenceWait(PCSR_WAIT); +NTSTATUS STDCALL CsrDestroyProcess(PCSR_PROCESS); +NTSTATUS STDCALL CsrDestroySession (PCSR_SESSION); +NTSTATUS STDCALL CsrDestroyThread(PCSR_THREAD); NTSTATUS STDCALL CsrExecServerThread(); NTSTATUS STDCALL CsrGetApiPorts(PHANDLE,PHANDLE); -NTSTATUS STDCALL CsrGetProcessLuid(); +NTSTATUS STDCALL CsrGetProcessLuid(PCSR_PROCESS,PLUID); NTSTATUS STDCALL CsrImpersonateClient(); NTSTATUS STDCALL CsrLockProcessByClientId(); NTSTATUS STDCALL CsrLockThreadByClientId(); -NTSTATUS STDCALL CsrMoveSatisfiedWait(); -NTSTATUS STDCALL CsrNotifyWait(); -NTSTATUS STDCALL CsrPopulateDosDevices(); +NTSTATUS STDCALL CsrMoveSatisfiedWait(PCSR_WAIT); +NTSTATUS STDCALL CsrNotifyWait(PCSR_WAIT); HANDLE STDCALL CsrQueryApiPort(VOID); -NTSTATUS STDCALL CsrReferenceThread(); +NTSTATUS STDCALL CsrReferenceThread(PCSR_THREAD); NTSTATUS STDCALL CsrRevertToSelf(); NTSTATUS STDCALL CsrServerInitialization(ULONG,LPWSTR*); NTSTATUS STDCALL CsrSetBackgroundPriority(); NTSTATUS STDCALL CsrSetCallingSpooler(); NTSTATUS STDCALL CsrSetForegroundPriority(); -NTSTATUS STDCALL CsrShutdownProcesses(); +NTSTATUS STDCALL CsrShutdownProcesses(PCSR_SESSION); NTSTATUS STDCALL CsrUnhandledExceptionFilter(); -NTSTATUS STDCALL CsrUnlockProcess(); -NTSTATUS STDCALL CsrUnlockThread(); +NTSTATUS STDCALL CsrUnlockProcess(PCSR_PROCESS); +NTSTATUS STDCALL CsrUnlockThread(PCSR_THREAD); NTSTATUS STDCALL CsrValidateMessageBuffer(); NTSTATUS STDCALL CsrValidateMessageString();
19 years, 4 months
1
0
0
0
[ion] 17277: - Use correct, documented, LPC Message structures (PORT_VIEW, REMOTE_PORT_VIEW). Fix all caller code to use new member names and structure names.
by ion@svn.reactos.com
- Use correct, documented, LPC Message structures (PORT_VIEW, REMOTE_PORT_VIEW). Fix all caller code to use new member names and structure names. Modified: trunk/reactos/include/ndk/lpctypes.h Modified: trunk/reactos/include/ndk/zwfuncs.h Modified: trunk/reactos/lib/ntdll/csr/lpc.c Modified: trunk/reactos/ntoskrnl/lpc/connect.c Modified: trunk/reactos/subsys/csrss/api/wapi.c _____ Modified: trunk/reactos/include/ndk/lpctypes.h --- trunk/reactos/include/ndk/lpctypes.h 2005-08-11 03:15:17 UTC (rev 17276) +++ trunk/reactos/include/ndk/lpctypes.h 2005-08-11 03:23:44 UTC (rev 17277) @@ -87,24 +87,22 @@ }; } PORT_MESSAGE, *PPORT_MESSAGE; -/* FIXME: USE REAL DEFINITION */ -typedef struct _LPC_SECTION_WRITE +typedef struct _PORT_VIEW { - ULONG Length; - HANDLE SectionHandle; - ULONG SectionOffset; - ULONG ViewSize; - PVOID ViewBase; - PVOID TargetViewBase; -} LPC_SECTION_WRITE, *PLPC_SECTION_WRITE; + ULONG Length; + LPC_HANDLE SectionHandle; + ULONG SectionOffset; + LPC_SIZE_T ViewSize; + LPC_PVOID ViewBase; + LPC_PVOID ViewRemoteBase; +} PORT_VIEW, *PPORT_VIEW; -/* FIXME: USE REAL DEFINITION */ -typedef struct _LPC_SECTION_READ +typedef struct _REMOTE_PORT_VIEW { - ULONG Length; - ULONG ViewSize; - PVOID ViewBase; -} LPC_SECTION_READ, *PLPC_SECTION_READ; + ULONG Length; + LPC_SIZE_T ViewSize; + LPC_PVOID ViewBase; +} REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW; /* FIXME: USE REAL DEFINITION */ typedef struct _LPC_MAX_MESSAGE _____ Modified: trunk/reactos/include/ndk/zwfuncs.h --- trunk/reactos/include/ndk/zwfuncs.h 2005-08-11 03:15:17 UTC (rev 17276) +++ trunk/reactos/include/ndk/zwfuncs.h 2005-08-11 03:23:44 UTC (rev 17277) @@ -27,8 +27,8 @@ HANDLE NamedPortHandle, PPORT_MESSAGE ServerReply, BOOLEAN AcceptIt, - PLPC_SECTION_WRITE WriteMap, - PLPC_SECTION_READ ReadMap + PPORT_VIEW WriteMap, + PREMOTE_PORT_VIEW ReadMap ); NTSTATUS @@ -350,8 +350,8 @@ PHANDLE PortHandle, PUNICODE_STRING PortName, PSECURITY_QUALITY_OF_SERVICE SecurityQos, - PLPC_SECTION_WRITE SectionInfo, - PLPC_SECTION_READ MapInfo, + PPORT_VIEW SectionInfo, + PREMOTE_PORT_VIEW MapInfo, PULONG MaxMessageSize, PVOID ConnectInfo, PULONG ConnectInfoLength @@ -363,8 +363,8 @@ PHANDLE PortHandle, PUNICODE_STRING PortName, PSECURITY_QUALITY_OF_SERVICE SecurityQos, - PLPC_SECTION_WRITE SectionInfo, - PLPC_SECTION_READ MapInfo, + PPORT_VIEW SectionInfo, + PREMOTE_PORT_VIEW MapInfo, PULONG MaxMessageSize, PVOID ConnectInfo, PULONG ConnectInfoLength _____ Modified: trunk/reactos/lib/ntdll/csr/lpc.c --- trunk/reactos/lib/ntdll/csr/lpc.c 2005-08-11 03:15:17 UTC (rev 17276) +++ trunk/reactos/lib/ntdll/csr/lpc.c 2005-08-11 03:23:44 UTC (rev 17277) @@ -113,7 +113,7 @@ UNICODE_STRING PortName = RTL_CONSTANT_STRING(L"\\Windows\\ApiPort"); ULONG ConnectInfoLength; CSR_API_MESSAGE Request; - LPC_SECTION_WRITE LpcWrite; + PORT_VIEW LpcWrite; HANDLE CsrSectionHandle; LARGE_INTEGER CsrSectionViewSize; @@ -135,7 +135,7 @@ return(Status); } ConnectInfoLength = 0; - LpcWrite.Length = sizeof(LPC_SECTION_WRITE); + LpcWrite.Length = sizeof(PORT_VIEW); LpcWrite.SectionHandle = CsrSectionHandle; LpcWrite.SectionOffset = 0; LpcWrite.ViewSize = CsrSectionViewSize.u.LowPart; @@ -155,7 +155,7 @@ NtClose(CsrSectionHandle); CsrSectionMapBase = LpcWrite.ViewBase; - CsrSectionMapServerBase = LpcWrite.TargetViewBase; + CsrSectionMapServerBase = LpcWrite.ViewRemoteBase; /* Create the heap for communication for csrss. */ CsrCommHeap = RtlCreateHeap(0, _____ Modified: trunk/reactos/ntoskrnl/lpc/connect.c --- trunk/reactos/ntoskrnl/lpc/connect.c 2005-08-11 03:15:17 UTC (rev 17276) +++ trunk/reactos/ntoskrnl/lpc/connect.c 2005-08-11 03:23:44 UTC (rev 17277) @@ -240,15 +240,15 @@ NtConnectPort (PHANDLE UnsafeConnectedPortHandle, PUNICODE_STRING PortName, PSECURITY_QUALITY_OF_SERVICE Qos, - PLPC_SECTION_WRITE UnsafeWriteMap, - PLPC_SECTION_READ UnsafeReadMap, + PPORT_VIEW UnsafeWriteMap, + PREMOTE_PORT_VIEW UnsafeReadMap, PULONG UnsafeMaximumMessageSize, PVOID UnsafeConnectData, PULONG UnsafeConnectDataLength) { HANDLE ConnectedPortHandle; - LPC_SECTION_WRITE WriteMap; - LPC_SECTION_READ ReadMap; + PORT_VIEW WriteMap; + REMOTE_PORT_VIEW ReadMap; ULONG MaximumMessageSize; PVOID ConnectData = NULL; ULONG ConnectDataLength = 0; @@ -297,11 +297,11 @@ _SEH_TRY { ProbeForWrite(UnsafeWriteMap, - sizeof(LPC_SECTION_WRITE), + sizeof(PORT_VIEW), 1); RtlCopyMemory(&WriteMap, UnsafeWriteMap, - sizeof(LPC_SECTION_WRITE)); + sizeof(PORT_VIEW)); } _SEH_HANDLE { @@ -318,10 +318,10 @@ { RtlCopyMemory(&WriteMap, UnsafeWriteMap, - sizeof(LPC_SECTION_WRITE)); + sizeof(PORT_VIEW)); } - if (WriteMap.Length != sizeof(LPC_SECTION_WRITE)) + if (WriteMap.Length != sizeof(PORT_VIEW)) { return(STATUS_INVALID_PARAMETER_4); } @@ -457,7 +457,7 @@ SectionOffset, WriteMap.ViewSize, &WriteMap.ViewBase, - &WriteMap.TargetViewBase, + &WriteMap.ViewRemoteBase, &ReadMap.ViewSize, &ReadMap.ViewBase, &MaximumMessageSize, @@ -579,14 +579,14 @@ { RtlCopyMemory(UnsafeWriteMap, &WriteMap, - sizeof(LPC_SECTION_WRITE)); + sizeof(PORT_VIEW)); } if (UnsafeReadMap != NULL) { RtlCopyMemory(UnsafeReadMap, &ReadMap, - sizeof(LPC_SECTION_READ)); + sizeof(REMOTE_PORT_VIEW)); } if (UnsafeMaximumMessageSize != NULL) @@ -613,14 +613,14 @@ { RtlCopyMemory(UnsafeWriteMap, &WriteMap, - sizeof(LPC_SECTION_WRITE)); + sizeof(PORT_VIEW)); } if (UnsafeReadMap != NULL) { RtlCopyMemory(UnsafeReadMap, &ReadMap, - sizeof(LPC_SECTION_READ)); + sizeof(REMOTE_PORT_VIEW)); } if (UnsafeMaximumMessageSize != NULL) @@ -658,8 +658,8 @@ HANDLE NamedPortHandle, PPORT_MESSAGE LpcMessage, BOOLEAN AcceptIt, - PLPC_SECTION_WRITE WriteMap, - PLPC_SECTION_READ ReadMap) + PPORT_VIEW WriteMap, + PREMOTE_PORT_VIEW ReadMap) { NTSTATUS Status; PEPORT NamedPort; @@ -799,11 +799,11 @@ } SectionOffset.QuadPart = WriteMap->SectionOffset; - WriteMap->TargetViewBase = 0; + WriteMap->ViewRemoteBase = 0; CReply->ReceiveClientViewSize = WriteMap->ViewSize; Status = MmMapViewOfSection(SectionObject, CRequest->ConnectingProcess, - &WriteMap->TargetViewBase, + &WriteMap->ViewRemoteBase, 0, CReply->ReceiveClientViewSize, &SectionOffset, @@ -870,7 +870,7 @@ } if (WriteMap != NULL) { - CReply->ReceiveClientViewBase = WriteMap->TargetViewBase; + CReply->ReceiveClientViewBase = WriteMap->ViewRemoteBase; } CReply->MaximumMessageSize = LPC_MAX_MESSAGE_LENGTH; @@ -920,9 +920,9 @@ NtSecureConnectPort (OUT PHANDLE ConnectedPort, IN PUNICODE_STRING PortName, IN PSECURITY_QUALITY_OF_SERVICE Qos, - IN OUT PLPC_SECTION_WRITE WriteMap OPTIONAL, + IN OUT PPORT_VIEW WriteMap OPTIONAL, IN PSID ServerSid OPTIONAL, - IN OUT PLPC_SECTION_READ ReadMap OPTIONAL, + IN OUT PREMOTE_PORT_VIEW ReadMap OPTIONAL, OUT PULONG MaxMessageSize OPTIONAL, IN OUT PVOID ConnectInfo OPTIONAL, IN OUT PULONG UserConnectInfoLength OPTIONAL) _____ Modified: trunk/reactos/subsys/csrss/api/wapi.c --- trunk/reactos/subsys/csrss/api/wapi.c 2005-08-11 03:15:17 UTC (rev 17276) +++ trunk/reactos/subsys/csrss/api/wapi.c 2005-08-11 03:23:44 UTC (rev 17277) @@ -192,7 +192,7 @@ for (;;) { - LPC_SECTION_READ LpcRead; + REMOTE_PORT_VIEW LpcRead; ServerPort = NULL; Status = NtListenPort (hApiListenPort, & Request.Header);
19 years, 4 months
1
0
0
0
[sedwards] 17276: TrackMoveEvent is a semi-implemented not UNIMPLEMENTED. Shut it up.
by sedwards@svn.reactos.com
TrackMoveEvent is a semi-implemented not UNIMPLEMENTED. Shut it up. Modified: trunk/reactos/lib/user32/windows/input.c _____ Modified: trunk/reactos/lib/user32/windows/input.c --- trunk/reactos/lib/user32/windows/input.c 2005-08-11 02:58:54 UTC (rev 17275) +++ trunk/reactos/lib/user32/windows/input.c 2005-08-11 03:15:17 UTC (rev 17276) @@ -870,8 +870,7 @@ pos.y = 0; SetRectEmpty(&client); - DbgPrint("%lx, %lx, %p, %lx\n", ptme->cbSize, ptme->dwFlags, ptme->hwndTrack, ptme->dwHoverTime); - UNIMPLEMENTED; + DPRINT("%lx, %lx, %p, %lx\n", ptme->cbSize, ptme->dwFlags, ptme->hwndTrack, ptme->dwHoverTime); if (ptme->cbSize != sizeof(TRACKMOUSEEVENT)) { DPRINT("wrong TRACKMOUSEEVENT size from app\n");
19 years, 4 months
1
0
0
0
[ion] 17275: - Use correct, documented, LPC Message structure (PORT_MESSAGE). Fix all caller code to use new member names and structure names.
by ion@svn.reactos.com
- Use correct, documented, LPC Message structure (PORT_MESSAGE). Fix all caller code to use new member names and structure names. Modified: trunk/reactos/include/ndk/lpctypes.h Modified: trunk/reactos/include/ndk/zwfuncs.h Modified: trunk/reactos/include/subsys/csrss/csrss.h Modified: trunk/reactos/include/subsys/lsass/lsass.h Modified: trunk/reactos/include/subsys/sm/api.h Modified: trunk/reactos/lib/lsasrv/lsaport.c Modified: trunk/reactos/lib/ntdll/csr/lpc.c Modified: trunk/reactos/lib/ntdll/dbg/debug.c Modified: trunk/reactos/lib/secur32/lsa.c Modified: trunk/reactos/lib/smdll/query.c Modified: trunk/reactos/lib/smlib/compses.c Modified: trunk/reactos/lib/smlib/execpgm.c Modified: trunk/reactos/ntoskrnl/include/internal/port.h Modified: trunk/reactos/ntoskrnl/io/error.c Modified: trunk/reactos/ntoskrnl/lpc/close.c Modified: trunk/reactos/ntoskrnl/lpc/connect.c Modified: trunk/reactos/ntoskrnl/lpc/create.c Modified: trunk/reactos/ntoskrnl/lpc/listen.c Modified: trunk/reactos/ntoskrnl/lpc/port.c Modified: trunk/reactos/ntoskrnl/lpc/receive.c Modified: trunk/reactos/ntoskrnl/lpc/reply.c Modified: trunk/reactos/ntoskrnl/lpc/send.c Modified: trunk/reactos/subsys/csrss/api/process.c Modified: trunk/reactos/subsys/csrss/api/user.c Modified: trunk/reactos/subsys/csrss/api/wapi.c Modified: trunk/reactos/subsys/csrss/win32csr/conio.c Modified: trunk/reactos/subsys/csrss/win32csr/desktopbg.c Modified: trunk/reactos/subsys/csrss/win32csr/exitros.c Modified: trunk/reactos/subsys/smss/debug.c Modified: trunk/reactos/subsys/smss/smapi.c _____ Modified: trunk/reactos/include/ndk/lpctypes.h --- trunk/reactos/include/ndk/lpctypes.h 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/include/ndk/lpctypes.h 2005-08-11 02:58:54 UTC (rev 17275) @@ -9,7 +9,7 @@ #ifndef _LPCTYPES_H #define _LPCTYPES_H -#define PORT_MESSAGE_TYPE(m) ((m).Header.MessageType) +#define LPC_MESSAGE_TYPE(m) ((m).Header.u2.s2.Type) /* DEPENDENCIES **************************************************************/ @@ -18,8 +18,8 @@ /* CONSTANTS *****************************************************************/ #define LPC_MESSAGE_BASE_SIZE 24 #define MAX_MESSAGE_DATA (0x130) -#define PORT_MAX_DATA_LENGTH 0x104 -#define PORT_MAX_MESSAGE_LENGTH 0x148 +#define LPC_MAX_DATA_LENGTH 0x104 +#define LPC_MAX_MESSAGE_LENGTH 0x148 /* ENUMERATIONS **************************************************************/ @@ -42,17 +42,50 @@ /* TYPES *********************************************************************/ -/* FIXME: USE REAL DEFINITION */ -typedef struct _LPC_MESSAGE +#if defined(USE_LPC6432) +#define LPC_CLIENT_ID CLIENT_ID64 +#define LPC_SIZE_T ULONGLONG +#define LPC_PVOID ULONGLONG +#define LPC_HANDLE ULONGLONG +#else +#define LPC_CLIENT_ID CLIENT_ID +#define LPC_SIZE_T SIZE_T +#define LPC_PVOID PVOID +#define LPC_HANDLE HANDLE +#endif + +typedef struct _PORT_MESSAGE { - USHORT DataSize; - USHORT MessageSize; - USHORT MessageType; - USHORT VirtualRangesOffset; - CLIENT_ID ClientId; - ULONG MessageId; - ULONG SectionSize; -} LPC_MESSAGE, *PLPC_MESSAGE; + union + { + struct + { + CSHORT DataLength; + CSHORT TotalLength; + } s1; + ULONG Length; + } u1; + union + { + struct + { + CSHORT Type; + CSHORT DataInfoOffset; + } s2; + ULONG ZeroInit; + } u2; + union + { + LPC_CLIENT_ID ClientId; + double DoNotUseThisField; + }; + ULONG MessageId; + union + { + LPC_SIZE_T ClientViewSize; + ULONG CallbackId; + }; +} PORT_MESSAGE, *PPORT_MESSAGE; /* FIXME: USE REAL DEFINITION */ typedef struct _LPC_SECTION_WRITE @@ -76,7 +109,7 @@ /* FIXME: USE REAL DEFINITION */ typedef struct _LPC_MAX_MESSAGE { - LPC_MESSAGE Header; + PORT_MESSAGE Header; BYTE Data[MAX_MESSAGE_DATA]; } LPC_MAX_MESSAGE, *PLPC_MAX_MESSAGE; _____ Modified: trunk/reactos/include/ndk/zwfuncs.h --- trunk/reactos/include/ndk/zwfuncs.h 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/include/ndk/zwfuncs.h 2005-08-11 02:58:54 UTC (rev 17275) @@ -25,7 +25,7 @@ NtAcceptConnectPort( PHANDLE PortHandle, HANDLE NamedPortHandle, - PLPC_MESSAGE ServerReply, + PPORT_MESSAGE ServerReply, BOOLEAN AcceptIt, PLPC_SECTION_WRITE WriteMap, PLPC_SECTION_READ ReadMap @@ -1243,14 +1243,14 @@ STDCALL NtImpersonateClientOfPort( HANDLE PortHandle, - PLPC_MESSAGE ClientMessage + PPORT_MESSAGE ClientMessage ); NTSTATUS STDCALL ZwImpersonateClientOfPort( HANDLE PortHandle, - PLPC_MESSAGE ClientMessage + PPORT_MESSAGE ClientMessage ); NTSTATUS @@ -1316,13 +1316,13 @@ NTSTATUS STDCALL NtListenPort(HANDLE PortHandle, - PLPC_MESSAGE LpcMessage + PPORT_MESSAGE LpcMessage ); NTSTATUS STDCALL ZwListenPort(HANDLE PortHandle, - PLPC_MESSAGE LpcMessage + PPORT_MESSAGE LpcMessage ); NTSTATUS @@ -2825,7 +2825,7 @@ STDCALL NtReadRequestData( HANDLE PortHandle, - PLPC_MESSAGE Message, + PPORT_MESSAGE Message, ULONG Index, PVOID Buffer, ULONG BufferLength, @@ -2836,7 +2836,7 @@ STDCALL ZwReadRequestData( HANDLE PortHandle, - PLPC_MESSAGE Message, + PPORT_MESSAGE Message, ULONG Index, PVOID Buffer, ULONG BufferLength, @@ -2944,14 +2944,14 @@ STDCALL NtReplyPort( HANDLE PortHandle, - PLPC_MESSAGE LpcReply + PPORT_MESSAGE LpcReply ); NTSTATUS STDCALL ZwReplyPort( HANDLE PortHandle, - PLPC_MESSAGE LpcReply + PPORT_MESSAGE LpcReply ); NTSTATUS @@ -2959,8 +2959,8 @@ NtReplyWaitReceivePort( HANDLE PortHandle, PULONG PortId, - PLPC_MESSAGE MessageReply, - PLPC_MESSAGE MessageRequest + PPORT_MESSAGE MessageReply, + PPORT_MESSAGE MessageRequest ); NTSTATUS @@ -2968,51 +2968,51 @@ ZwReplyWaitReceivePort( HANDLE PortHandle, PULONG PortId, - PLPC_MESSAGE MessageReply, - PLPC_MESSAGE MessageRequest + PPORT_MESSAGE MessageReply, + PPORT_MESSAGE MessageRequest ); NTSTATUS STDCALL NtReplyWaitReplyPort( HANDLE PortHandle, - PLPC_MESSAGE ReplyMessage + PPORT_MESSAGE ReplyMessage ); NTSTATUS STDCALL ZwReplyWaitReplyPort( HANDLE PortHandle, - PLPC_MESSAGE ReplyMessage + PPORT_MESSAGE ReplyMessage ); NTSTATUS STDCALL NtRequestPort( HANDLE PortHandle, - PLPC_MESSAGE LpcMessage); + PPORT_MESSAGE LpcMessage); NTSTATUS STDCALL ZwRequestPort( HANDLE PortHandle, - PLPC_MESSAGE LpcMessage + PPORT_MESSAGE LpcMessage ); NTSTATUS STDCALL NtRequestWaitReplyPort( HANDLE PortHandle, - PLPC_MESSAGE LpcReply, - PLPC_MESSAGE LpcRequest + PPORT_MESSAGE LpcReply, + PPORT_MESSAGE LpcRequest ); NTSTATUS STDCALL ZwRequestWaitReplyPort( HANDLE PortHandle, - PLPC_MESSAGE LpcReply, - PLPC_MESSAGE LpcRequest + PPORT_MESSAGE LpcReply, + PPORT_MESSAGE LpcRequest ); NTSTATUS @@ -3975,7 +3975,7 @@ STDCALL NtWriteRequestData( HANDLE PortHandle, - PLPC_MESSAGE Message, + PPORT_MESSAGE Message, ULONG Index, PVOID Buffer, ULONG BufferLength, @@ -3986,7 +3986,7 @@ STDCALL ZwWriteRequestData( HANDLE PortHandle, - PLPC_MESSAGE Message, + PPORT_MESSAGE Message, ULONG Index, PVOID Buffer, ULONG BufferLength, _____ Modified: trunk/reactos/include/subsys/csrss/csrss.h --- trunk/reactos/include/subsys/csrss/csrss.h 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/include/subsys/csrss/csrss.h 2005-08-11 02:58:54 UTC (rev 17275) @@ -491,7 +491,7 @@ { union { - LPC_MESSAGE Header; + PORT_MESSAGE Header; struct { BYTE HeaderReserved[LPC_MESSAGE_BASE_SIZE]; _____ Modified: trunk/reactos/include/subsys/lsass/lsass.h --- trunk/reactos/include/subsys/lsass/lsass.h 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/include/subsys/lsass/lsass.h 2005-08-11 02:58:54 UTC (rev 17275) @@ -96,7 +96,7 @@ typedef union _LSASS_REQUEST { - LPC_MESSAGE Header; + PORT_MESSAGE Header; struct { UCHAR LpcHeader[LPC_MESSAGE_BASE_SIZE]; ULONG Type; @@ -115,7 +115,7 @@ typedef struct _LSASS_REPLY { - LPC_MESSAGE Header; + PORT_MESSAGE Header; NTSTATUS Status; union { _____ Modified: trunk/reactos/include/subsys/sm/api.h --- trunk/reactos/include/subsys/sm/api.h 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/include/subsys/sm/api.h 2005-08-11 02:58:54 UTC (rev 17275) @@ -110,7 +110,7 @@ typedef union _SM_PORT_MESSAGE { /*** LPC common header ***/ - LPC_MESSAGE Header; + PORT_MESSAGE Header; struct { UCHAR LpcHeader[LPC_MESSAGE_BASE_SIZE]; /*** SM common header ***/ @@ -138,7 +138,7 @@ /*** MACRO ***********************************************************/ -#define SM_CONNECT_DATA_SIZE(m) ((m).Header.DataSize-sizeof(USHORT)-sizeof(WORD)) +#define SM_CONNECT_DATA_SIZE(m) ((m).Header.u1.s1.DataLength-sizeof(USHORT)-sizeof(WORD)) #define SM_PORT_DATA_SIZE(c) (sizeof(DWORD)+sizeof(NTSTATUS)+sizeof(c)) #define SM_PORT_MESSAGE_SIZE (sizeof(SM_PORT_MESSAGE)) _____ Modified: trunk/reactos/lib/lsasrv/lsaport.c --- trunk/reactos/lib/lsasrv/lsaport.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/lib/lsasrv/lsaport.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -112,18 +112,18 @@ DPRINT("Received message\n"); - if (Request.Header.MessageType == LPC_PORT_CLOSED) + if (Request.Header.u2.s2.Type == LPC_PORT_CLOSED) { DPRINT("Port closed\n"); // return STATUS_UNSUCCESSFUL; } - if (Request.Header.MessageType == LPC_REQUEST) + if (Request.Header.u2.s2.Type == LPC_REQUEST) { DPRINT("Received request\n"); } - else if (Request.Header.MessageType == LPC_DATAGRAM) + else if (Request.Header.u2.s2.Type == LPC_DATAGRAM) { DPRINT("Received datagram\n"); _____ Modified: trunk/reactos/lib/ntdll/csr/lpc.c --- trunk/reactos/lib/ntdll/csr/lpc.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/lib/ntdll/csr/lpc.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -81,12 +81,12 @@ /* Fill out the header */ Request->Type = ApiNumber; - Request->Header.DataSize = RequestLength - LPC_MESSAGE_BASE_SIZE; - Request->Header.MessageSize = RequestLength; - DPRINT("CSR: API: %x, DataSize: %x, MessageSize: %x\n", + Request->Header.u1.s1.DataLength = RequestLength - LPC_MESSAGE_BASE_SIZE; + Request->Header.u1.s1.TotalLength = RequestLength; + DPRINT("CSR: API: %x, u1.s1.DataLength: %x, u1.s1.TotalLength: %x\n", ApiNumber, - Request->Header.DataSize, - Request->Header.MessageSize); + Request->Header.u1.s1.DataLength, + Request->Header.u1.s1.TotalLength); /* Send the LPC Message */ Status = NtRequestWaitReplyPort(WindowsApiPort, _____ Modified: trunk/reactos/lib/ntdll/dbg/debug.c --- trunk/reactos/lib/ntdll/dbg/debug.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/lib/ntdll/dbg/debug.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -24,7 +24,7 @@ typedef struct _LPC_DBGSS_MESSAGE { - LPC_MESSAGE Header; + PORT_MESSAGE Header; ULONG Unknown1; ULONG Unknown2; ULONG Unknown3; @@ -45,7 +45,7 @@ Status = NtReplyWaitReceivePort (DbgSsApiPort, NULL, NULL, - (PLPC_MESSAGE)&Message); + (PPORT_MESSAGE)&Message); if (!NT_SUCCESS(Status)) { DbgPrint ("DbgSs: NtReplyWaitReceivePort failed - Status == %lx\n", _____ Modified: trunk/reactos/lib/secur32/lsa.c --- trunk/reactos/lib/secur32/lsa.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/lib/secur32/lsa.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -32,8 +32,8 @@ LSASS_REPLY Reply; NTSTATUS Status; - Request.Header.DataSize = 0; - Request.Header.MessageSize = sizeof(LSASS_REQUEST); + Request.Header.u1.s1.DataLength = 0; + Request.Header.u1.s1.TotalLength = sizeof(LSASS_REQUEST); Request.Type = LSASS_REQUEST_DEREGISTER_LOGON_PROCESS; Status = NtRequestWaitReplyPort(LsaHandle, &Request.Header, @@ -82,10 +82,10 @@ Request = (PLSASS_REQUEST)RawRequest; Reply = (PLSASS_REPLY)RawReply; - Request->Header.DataSize = sizeof(LSASS_REQUEST) + SubmitBufferLength - + Request->Header.u1.s1.DataLength = sizeof(LSASS_REQUEST) + SubmitBufferLength - LPC_MESSAGE_BASE_SIZE; - Request->Header.MessageSize = - Request->Header.DataSize + LPC_MESSAGE_BASE_SIZE; + Request->Header.u1.s1.TotalLength = + Request->Header.u1.s1.DataLength + LPC_MESSAGE_BASE_SIZE; Request->Type = LSASS_REQUEST_CALL_AUTHENTICATION_PACKAGE; Request->d.CallAuthenticationPackageRequest.AuthenticationPackage = AuthenticationPackage; @@ -145,9 +145,9 @@ LSASS_REPLY Reply; Request = (PLSASS_REQUEST)RawRequest; - Request->Header.DataSize = sizeof(LSASS_REQUEST) + PackageName->Length - + Request->Header.u1.s1.DataLength = sizeof(LSASS_REQUEST) + PackageName->Length - LPC_MESSAGE_BASE_SIZE; - Request->Header.MessageSize = Request->Header.DataSize + + Request->Header.u1.s1.TotalLength = Request->Header.u1.s1.DataLength + LPC_MESSAGE_BASE_SIZE; Request->Type = LSASS_REQUEST_LOOKUP_AUTHENTICATION_PACKAGE; @@ -236,8 +236,8 @@ Request->d.LogonUserRequest.SourceContext = *SourceContext; Request->Type = LSASS_REQUEST_LOGON_USER; - Request->Header.DataSize = RequestLength - LPC_MESSAGE_BASE_SIZE; - Request->Header.MessageSize = RequestLength + LPC_MESSAGE_BASE_SIZE; + Request->Header.u1.s1.DataLength = RequestLength - LPC_MESSAGE_BASE_SIZE; + Request->Header.u1.s1.TotalLength = RequestLength + LPC_MESSAGE_BASE_SIZE; Reply = (PLSASS_REPLY)RawReply; @@ -302,9 +302,9 @@ } Request.Type = LSASS_REQUEST_REGISTER_LOGON_PROCESS; - Request.Header.DataSize = sizeof(LSASS_REQUEST) - + Request.Header.u1.s1.DataLength = sizeof(LSASS_REQUEST) - LPC_MESSAGE_BASE_SIZE; - Request.Header.MessageSize = sizeof(LSASS_REQUEST); + Request.Header.u1.s1.TotalLength = sizeof(LSASS_REQUEST); Request.d.RegisterLogonProcessRequest.Length = LsaLogonProcessName->Length; memcpy(Request.d.RegisterLogonProcessRequest.LogonProcessNameBuffer, _____ Modified: trunk/reactos/lib/smdll/query.c --- trunk/reactos/lib/smdll/query.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/lib/smdll/query.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -85,10 +85,10 @@ SmReqMsg.SmHeader.ApiIndex = SM_API_QUERY_INFORMATION; /* Prepare the port request message */ - SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; - SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.Request); - SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; - Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); + SmReqMsg.Header.u2.s2.Type = LPC_NEW_MESSAGE; + SmReqMsg.Header.u1.s1.DataLength = SM_PORT_DATA_SIZE(SmReqMsg.Request); + SmReqMsg.Header.u1.s1.TotalLength = SM_PORT_MESSAGE_SIZE; + Status = NtRequestWaitReplyPort (hSmApiPort, (PPORT_MESSAGE) & SmReqMsg, (PPORT_MESSAGE) & SmReqMsg); if (NT_SUCCESS(Status)) { /* Unmarshal data */ _____ Modified: trunk/reactos/lib/smlib/compses.c --- trunk/reactos/lib/smlib/compses.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/lib/smlib/compses.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -50,10 +50,10 @@ SmReqMsg.SmHeader.ApiIndex = SM_API_COMPLETE_SESSION; /* Port message */ - SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; - SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.Request); - SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; - Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); + SmReqMsg.Header.u2.s2.Type = LPC_NEW_MESSAGE; + SmReqMsg.Header.u1.s1.DataLength = SM_PORT_DATA_SIZE(SmReqMsg.Request); + SmReqMsg.Header.u1.s1.TotalLength = SM_PORT_MESSAGE_SIZE; + Status = NtRequestWaitReplyPort (hSmApiPort, (PPORT_MESSAGE) & SmReqMsg, (PPORT_MESSAGE) & SmReqMsg); if (NT_SUCCESS(Status)) { return SmReqMsg.SmHeader.Status; _____ Modified: trunk/reactos/lib/smlib/execpgm.c --- trunk/reactos/lib/smlib/execpgm.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/lib/smlib/execpgm.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -60,23 +60,23 @@ SmReqMsg.SmHeader.ApiIndex = SM_API_EXECUTE_PROGRAMME; /* LPC message */ - SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; - SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.Request); - SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; + SmReqMsg.Header.u2.s2.Type = LPC_NEW_MESSAGE; + SmReqMsg.Header.u1.s1.DataLength = SM_PORT_DATA_SIZE(SmReqMsg.Request); + SmReqMsg.Header.u1.s1.TotalLength = SM_PORT_MESSAGE_SIZE; DPRINT("SMLIB: %s:\n" - " MessageType = %d\n" - " DataSize = %d\n" - " MessageSize = %d\n" - " sizeof(LPC_MESSAGE)==%d\n", + " u2.s2.Type = %d\n" + " u1.s1.DataLength = %d\n" + " u1.s1.TotalLength = %d\n" + " sizeof(PORT_MESSAGE)==%d\n", __FUNCTION__, - SmReqMsg.Header.MessageType, - SmReqMsg.Header.DataSize, - SmReqMsg.Header.MessageSize, - sizeof(LPC_MESSAGE)); + SmReqMsg.Header.u2.s2.Type, + SmReqMsg.Header.u1.s1.DataLength, + SmReqMsg.Header.u1.s1.TotalLength, + sizeof(PORT_MESSAGE)); /* Call SM and wait for a reply */ - Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); + Status = NtRequestWaitReplyPort (hSmApiPort, (PPORT_MESSAGE) & SmReqMsg, (PPORT_MESSAGE) & SmReqMsg); if (NT_SUCCESS(Status)) { return SmReqMsg.SmHeader.Status; _____ Modified: trunk/reactos/ntoskrnl/include/internal/port.h --- trunk/reactos/ntoskrnl/include/internal/port.h 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/include/internal/port.h 2005-08-11 02:58:54 UTC (rev 17275) @@ -31,7 +31,7 @@ typedef struct _EPORT_CONNECT_REQUEST_MESSAGE { - LPC_MESSAGE MessageHeader; + PORT_MESSAGE MessageHeader; PEPROCESS ConnectingProcess; struct _SECTION_OBJECT* SendSectionObject; LARGE_INTEGER SendSectionOffset; @@ -42,7 +42,7 @@ typedef struct _EPORT_CONNECT_REPLY_MESSAGE { - LPC_MESSAGE MessageHeader; + PORT_MESSAGE MessageHeader; PVOID SendServerViewBase; ULONG ReceiveClientViewSize; PVOID ReceiveClientViewBase; @@ -58,7 +58,7 @@ NTSTATUS STDCALL LpcRequestPort (PEPORT Port, - PLPC_MESSAGE LpcMessage); + PPORT_MESSAGE LpcMessage); NTSTATUS STDCALL LpcSendTerminationPort (PEPORT Port, @@ -87,13 +87,13 @@ { PEPORT Sender; LIST_ENTRY QueueListEntry; - LPC_MESSAGE Message; + PORT_MESSAGE Message; UCHAR MessageData [MAX_MESSAGE_DATA]; } QUEUEDMESSAGE, *PQUEUEDMESSAGE; typedef struct _LPC_DBG_MESSAGE { - LPC_MESSAGE Header; + PORT_MESSAGE Header; ULONG Type; ULONG Status; union @@ -142,7 +142,7 @@ typedef struct _LPC_TERMINATION_MESSAGE { - LPC_MESSAGE Header; + PORT_MESSAGE Header; LARGE_INTEGER CreationTime; } LPC_TERMINATION_MESSAGE, *PLPC_TERMINATION_MESSAGE; @@ -196,7 +196,7 @@ NTSTATUS STDCALL EiReplyOrRequestPort (IN PEPORT Port, - IN PLPC_MESSAGE LpcReply, + IN PPORT_MESSAGE LpcReply, IN ULONG MessageType, IN PEPORT Sender); _____ Modified: trunk/reactos/ntoskrnl/io/error.c --- trunk/reactos/ntoskrnl/io/error.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/io/error.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -265,7 +265,7 @@ /* Initialize the log message */ Message = (PIO_ERROR_LOG_MESSAGE)Request->Data; - Message->Type = 0xC; //IO_TYPE_ERROR_MESSAGE; + Message->Type = IO_TYPE_ERROR_MESSAGE; Message->Size = sizeof(IO_ERROR_LOG_MESSAGE) - sizeof(IO_ERROR_LOG_PACKET) + LogEntry->PacketSize + DriverNameLength; @@ -285,9 +285,9 @@ DPRINT ("SequenceNumber %lx\n", Packet->SequenceNumber); - Request->Header.DataSize = Message->Size; - Request->Header.MessageSize = - Request->Header.DataSize + sizeof(LPC_MESSAGE); + Request->Header.u1.s1.DataLength = Message->Size; + Request->Header.u1.s1.TotalLength = + Request->Header.u1.s1.DataLength + sizeof(PPORT_MESSAGE); /* Send the error message to the log port */ Status = ZwRequestPort (IopLogPort, _____ Modified: trunk/reactos/ntoskrnl/lpc/close.c --- trunk/reactos/ntoskrnl/lpc/close.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/lpc/close.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -31,7 +31,7 @@ LpcpClosePort (PVOID ObjectBody, ULONG HandleCount) { PEPORT Port = (PEPORT)ObjectBody; - LPC_MESSAGE Message; + PORT_MESSAGE Message; /* FIXME Race conditions here! */ @@ -44,8 +44,8 @@ if (HandleCount == 1 && Port->State == EPORT_CONNECTED_CLIENT) { DPRINT("Informing server\n"); - Message.MessageSize = sizeof(LPC_MESSAGE); - Message.DataSize = 0; + Message.u1.s1.TotalLength = sizeof(PORT_MESSAGE); + Message.u1.s1.DataLength = 0; EiReplyOrRequestPort (Port->OtherPort, &Message, LPC_PORT_CLOSED, _____ Modified: trunk/reactos/ntoskrnl/lpc/connect.c --- trunk/reactos/ntoskrnl/lpc/connect.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/lpc/connect.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -90,14 +90,14 @@ /* * Initialize the request message. */ - RequestMessage->MessageHeader.DataSize = + RequestMessage->MessageHeader.u1.s1.DataLength = sizeof(EPORT_CONNECT_REQUEST_MESSAGE) + RequestConnectDataLength - - sizeof(LPC_MESSAGE); - RequestMessage->MessageHeader.MessageSize = + sizeof(PORT_MESSAGE); + RequestMessage->MessageHeader.u1.s1.TotalLength = sizeof(EPORT_CONNECT_REQUEST_MESSAGE) + RequestConnectDataLength; DPRINT("RequestMessageSize %d\n", - RequestMessage->MessageHeader.MessageSize); - RequestMessage->MessageHeader.SectionSize = 0; + RequestMessage->MessageHeader.u1.s1.TotalLength); + RequestMessage->MessageHeader.ClientViewSize = 0; RequestMessage->ConnectingProcess = PsGetCurrentProcess(); ObReferenceObjectByPointer(RequestMessage->ConnectingProcess, PROCESS_VM_OPERATION, @@ -148,7 +148,7 @@ /* * Check for connection refusal. */ - if (CReply->MessageHeader.MessageType == LPC_CONNECTION_REFUSED) + if (CReply->MessageHeader.u2.s2.Type == LPC_CONNECTION_REFUSED) { ObDereferenceObject(OurPort); ExFreePool(Reply); @@ -656,7 +656,7 @@ /*EXPORTED*/ NTSTATUS STDCALL NtAcceptConnectPort (PHANDLE ServerPortHandle, HANDLE NamedPortHandle, - PLPC_MESSAGE LpcMessage, + PPORT_MESSAGE LpcMessage, BOOLEAN AcceptIt, PLPC_SECTION_WRITE WriteMap, PLPC_SECTION_READ ReadMap) @@ -674,7 +674,7 @@ Size = sizeof(EPORT_CONNECT_REPLY_MESSAGE); if (LpcMessage) { - Size += LpcMessage->DataSize; + Size += LpcMessage->u1.s1.DataLength; } CReply = ExAllocatePool(NonPagedPool, Size); @@ -746,20 +746,20 @@ */ if (LpcMessage != NULL) { - memcpy(&CReply->MessageHeader, LpcMessage, sizeof(LPC_MESSAGE)); + memcpy(&CReply->MessageHeader, LpcMessage, sizeof(PORT_MESSAGE)); memcpy(&CReply->ConnectData, (PVOID)(LpcMessage + 1), - LpcMessage->DataSize); - CReply->MessageHeader.MessageSize = - sizeof(EPORT_CONNECT_REPLY_MESSAGE) + LpcMessage->DataSize; - CReply->MessageHeader.DataSize = CReply->MessageHeader.MessageSize - - sizeof(LPC_MESSAGE); - CReply->ConnectDataLength = LpcMessage->DataSize; + LpcMessage->u1.s1.DataLength); + CReply->MessageHeader.u1.s1.TotalLength = + sizeof(EPORT_CONNECT_REPLY_MESSAGE) + LpcMessage->u1.s1.DataLength; + CReply->MessageHeader.u1.s1.DataLength = CReply->MessageHeader.u1.s1.TotalLength - + sizeof(PORT_MESSAGE); + CReply->ConnectDataLength = LpcMessage->u1.s1.DataLength; } else { - CReply->MessageHeader.MessageSize = sizeof(EPORT_CONNECT_REPLY_MESSAGE); - CReply->MessageHeader.DataSize = sizeof(EPORT_CONNECT_REPLY_MESSAGE) - - sizeof(LPC_MESSAGE); + CReply->MessageHeader.u1.s1.TotalLength = sizeof(EPORT_CONNECT_REPLY_MESSAGE); + CReply->MessageHeader.u1.s1.DataLength = sizeof(EPORT_CONNECT_REPLY_MESSAGE) - + sizeof(PORT_MESSAGE); CReply->ConnectDataLength = 0; } if (!AcceptIt) @@ -872,7 +872,7 @@ { CReply->ReceiveClientViewBase = WriteMap->TargetViewBase; } - CReply->MaximumMessageSize = PORT_MAX_MESSAGE_LENGTH; + CReply->MaximumMessageSize = LPC_MAX_MESSAGE_LENGTH; /* @@ -881,7 +881,7 @@ OurPort->OtherPort = ConnectionRequest->Sender; OurPort->OtherPort->OtherPort = OurPort; EiReplyOrRequestPort(ConnectionRequest->Sender, - (PLPC_MESSAGE)CReply, + (PPORT_MESSAGE)CReply, LPC_REPLY, OurPort); ExFreePool(ConnectionRequest); _____ Modified: trunk/reactos/ntoskrnl/lpc/create.c --- trunk/reactos/ntoskrnl/lpc/create.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/lpc/create.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -49,11 +49,11 @@ { return (STATUS_INVALID_PORT_ATTRIBUTES); } - if (MaxConnectInfoLength > PORT_MAX_DATA_LENGTH) + if (MaxConnectInfoLength > LPC_MAX_DATA_LENGTH) { return (STATUS_INVALID_PARAMETER_3); } - if (MaxDataLength > PORT_MAX_MESSAGE_LENGTH) + if (MaxDataLength > LPC_MAX_MESSAGE_LENGTH) { return (STATUS_INVALID_PARAMETER_4); } @@ -128,8 +128,8 @@ } Status = LpcpInitializePort (Port, EPORT_TYPE_SERVER_RQST_PORT, NULL); - Port->MaxConnectInfoLength = PORT_MAX_DATA_LENGTH; - Port->MaxDataLength = PORT_MAX_MESSAGE_LENGTH; + Port->MaxConnectInfoLength = LPC_MAX_DATA_LENGTH; + Port->MaxDataLength = LPC_MAX_MESSAGE_LENGTH; Port->MaxPoolUsage = MaxPoolUsage; ObDereferenceObject (Port); _____ Modified: trunk/reactos/ntoskrnl/lpc/listen.c --- trunk/reactos/ntoskrnl/lpc/listen.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/lpc/listen.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -40,7 +40,7 @@ */ /*EXPORTED*/ NTSTATUS STDCALL NtListenPort (IN HANDLE PortHandle, - IN PLPC_MESSAGE ConnectMsg) + IN PPORT_MESSAGE ConnectMsg) { NTSTATUS Status; @@ -58,12 +58,12 @@ * Drop any other message. */ if (!NT_SUCCESS(Status) || - LPC_CONNECTION_REQUEST == ConnectMsg->MessageType) + LPC_CONNECTION_REQUEST == ConnectMsg->u2.s2.Type) { DPRINT("Got message (type %x)\n", LPC_CONNECTION_REQUEST); break; } - DPRINT("Got message (type %x)\n", ConnectMsg->MessageType); + DPRINT("Got message (type %x)\n", ConnectMsg->u2.s2.Type); } return (Status); _____ Modified: trunk/reactos/ntoskrnl/lpc/port.c --- trunk/reactos/ntoskrnl/lpc/port.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/lpc/port.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -121,7 +121,7 @@ */ NTSTATUS STDCALL NtImpersonateClientOfPort (HANDLE PortHandle, - PLPC_MESSAGE ClientMessage) + PPORT_MESSAGE ClientMessage) { UNIMPLEMENTED; return(STATUS_NOT_IMPLEMENTED); _____ Modified: trunk/reactos/ntoskrnl/lpc/receive.c --- trunk/reactos/ntoskrnl/lpc/receive.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/lpc/receive.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -27,7 +27,7 @@ */ NTSTATUS STDCALL NtReadRequestData (HANDLE PortHandle, - PLPC_MESSAGE Message, + PPORT_MESSAGE Message, ULONG Index, PVOID Buffer, ULONG BufferLength, _____ Modified: trunk/reactos/ntoskrnl/lpc/reply.c --- trunk/reactos/ntoskrnl/lpc/reply.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/lpc/reply.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -31,7 +31,7 @@ */ NTSTATUS STDCALL EiReplyOrRequestPort (IN PEPORT Port, - IN PLPC_MESSAGE LpcReply, + IN PPORT_MESSAGE LpcReply, IN ULONG MessageType, IN PEPORT Sender) { @@ -49,12 +49,12 @@ if (LpcReply != NULL) { - memcpy(&MessageReply->Message, LpcReply, LpcReply->MessageSize); + memcpy(&MessageReply->Message, LpcReply, LpcReply->u1.s1.TotalLength); } MessageReply->Message.ClientId.UniqueProcess = PsGetCurrentProcessId(); MessageReply->Message.ClientId.UniqueThread = PsGetCurrentThreadId(); - MessageReply->Message.MessageType = MessageType; + MessageReply->Message.u2.s2.Type = MessageType; MessageReply->Message.MessageId = InterlockedIncrementUL(&LpcpNextMessageId); KeAcquireSpinLock(&Port->Lock, &oldIrql); @@ -78,7 +78,7 @@ */ NTSTATUS STDCALL NtReplyPort (IN HANDLE PortHandle, - IN PLPC_MESSAGE LpcReply) + IN PPORT_MESSAGE LpcReply) { NTSTATUS Status; PEPORT Port; @@ -137,8 +137,8 @@ NTSTATUS STDCALL NtReplyWaitReceivePortEx(IN HANDLE PortHandle, OUT PULONG PortId, - IN PLPC_MESSAGE LpcReply, - OUT PLPC_MESSAGE LpcMessage, + IN PPORT_MESSAGE LpcReply, + OUT PPORT_MESSAGE LpcMessage, IN PLARGE_INTEGER Timeout) { PEPORT Port; @@ -159,7 +159,7 @@ _SEH_TRY { ProbeForWrite(LpcMessage, - sizeof(LPC_MESSAGE), + sizeof(PORT_MESSAGE), 1); } _SEH_HANDLE @@ -252,15 +252,15 @@ Request = EiDequeueMessagePort(Port); KeReleaseSpinLock(&Port->Lock, oldIrql); - if (Request->Message.MessageType == LPC_CONNECTION_REQUEST) + if (Request->Message.u2.s2.Type == LPC_CONNECTION_REQUEST) { - LPC_MESSAGE Header; + PORT_MESSAGE Header; PEPORT_CONNECT_REQUEST_MESSAGE CRequest; CRequest = (PEPORT_CONNECT_REQUEST_MESSAGE)&Request->Message; - memcpy(&Header, &Request->Message, sizeof(LPC_MESSAGE)); - Header.DataSize = CRequest->ConnectDataLength; - Header.MessageSize = Header.DataSize + sizeof(LPC_MESSAGE); + memcpy(&Header, &Request->Message, sizeof(PORT_MESSAGE)); + Header.u1.s1.DataLength = CRequest->ConnectDataLength; + Header.u1.s1.TotalLength = Header.u1.s1.DataLength + sizeof(PORT_MESSAGE); if (PreviousMode != KernelMode) { @@ -272,7 +272,7 @@ RtlCopyMemory(LpcMessage, &Header, - sizeof(LPC_MESSAGE)); + sizeof(PORT_MESSAGE)); RtlCopyMemory((PVOID)(LpcMessage + 1), CRequest->ConnectData, CRequest->ConnectDataLength); @@ -287,7 +287,7 @@ { RtlCopyMemory(LpcMessage, &Header, - sizeof(LPC_MESSAGE)); + sizeof(PORT_MESSAGE)); RtlCopyMemory((PVOID)(LpcMessage + 1), CRequest->ConnectData, CRequest->ConnectDataLength); @@ -300,12 +300,12 @@ _SEH_TRY { ProbeForWrite(LpcMessage, - Request->Message.MessageSize, + Request->Message.u1.s1.TotalLength, 1); RtlCopyMemory(LpcMessage, &Request->Message, - Request->Message.MessageSize); + Request->Message.u1.s1.TotalLength); } _SEH_HANDLE { @@ -317,7 +317,7 @@ { RtlCopyMemory(LpcMessage, &Request->Message, - Request->Message.MessageSize); + Request->Message.u1.s1.TotalLength); } } if (!NT_SUCCESS(Status)) @@ -333,7 +333,7 @@ ObDereferenceObject(Port); return(Status); } - if (Request->Message.MessageType == LPC_CONNECTION_REQUEST) + if (Request->Message.u2.s2.Type == LPC_CONNECTION_REQUEST) { KeAcquireSpinLock(&Port->Lock, &oldIrql); EiEnqueueConnectMessagePort(Port, Request); @@ -372,8 +372,8 @@ NTSTATUS STDCALL NtReplyWaitReceivePort (IN HANDLE PortHandle, OUT PULONG PortId, - IN PLPC_MESSAGE LpcReply, - OUT PLPC_MESSAGE LpcMessage) + IN PPORT_MESSAGE LpcReply, + OUT PPORT_MESSAGE LpcMessage) { return(NtReplyWaitReceivePortEx (PortHandle, PortId, @@ -395,7 +395,7 @@ */ NTSTATUS STDCALL NtReplyWaitReplyPort (HANDLE PortHandle, - PLPC_MESSAGE ReplyMessage) + PPORT_MESSAGE ReplyMessage) { UNIMPLEMENTED; return(STATUS_NOT_IMPLEMENTED); @@ -408,8 +408,8 @@ STDCALL LpcRequestWaitReplyPort ( IN PEPORT Port, - IN PLPC_MESSAGE LpcMessageRequest, - OUT PLPC_MESSAGE LpcMessageReply + IN PPORT_MESSAGE LpcMessageRequest, + OUT PPORT_MESSAGE LpcMessageReply ) { UNIMPLEMENTED; _____ Modified: trunk/reactos/ntoskrnl/lpc/send.c --- trunk/reactos/ntoskrnl/lpc/send.c 2005-08-11 02:51:51 UTC (rev 17274) +++ trunk/reactos/ntoskrnl/lpc/send.c 2005-08-11 02:58:54 UTC (rev 17275) @@ -36,7 +36,7 @@ LPC_TERMINATION_MESSAGE Msg; [truncated at 1000 lines; 1082 more skipped]
19 years, 4 months
1
0
0
0
[royce] 17274: initialize StringBuffer to NULL, as some code paths lead to it being tested without ever being set.
by royce@svn.reactos.com
initialize StringBuffer to NULL, as some code paths lead to it being tested without ever being set. Modified: trunk/reactos/ntoskrnl/ob/object.c _____ Modified: trunk/reactos/ntoskrnl/ob/object.c --- trunk/reactos/ntoskrnl/ob/object.c 2005-08-11 01:18:22 UTC (rev 17273) +++ trunk/reactos/ntoskrnl/ob/object.c 2005-08-11 02:51:51 UTC (rev 17274) @@ -35,7 +35,7 @@ { NTSTATUS Status = STATUS_SUCCESS; ULONG StringLength; - PWCHAR StringBuffer; + PWCHAR StringBuffer = NULL; UNICODE_STRING LocalName = {}; /* <= GCC 4.0 + Optimizer */ /* Initialize the Input String */
19 years, 4 months
1
0
0
0
[ion] 17273: Move doc folder to media
by ion@svn.reactos.com
Move doc folder to media Deleted: trunk/reactos/doc/ Added: trunk/reactos/media/doc/ _____ Copied: trunk/reactos/media/doc (from rev 17254, trunk/reactos/doc)
19 years, 4 months
1
0
0
0
[ion] 17272: - Fix DEVICE_NODE definition to remove ROS-only fields
by ion@svn.reactos.com
- Fix DEVICE_NODE definition to remove ROS-only fields - Move RTL_HEAP_PARAMETERS to umtypes.h - Fix PROCESS_PRIORITY_CLASS_XXX definitions. - Use PROCESS_PRIORITY_CLASS_INVALID in process creation code. - Move and correct EX_PUSH_LOCK definition to ntifs.h - Define KQUEUE along with KAPC_STATE if ntifs.h is not used, so that we don't force its usage - Enable usage of EX_QUEUE_WORKER_INFO and EX_WORK_QUEUE without requiring the IFS. - Fix definition of CsrClientConnectToServer - Update NDK FIXME list - Define and use a list of Bus Type GUIDs instead of saving the GUID in a ROS-only field of DEVICE_NODE. - Use a IRP_MN_QUERY_CAPABILITIES PnP IRP to get the Address of a DeviceNode, intead of saving it inside a ROS-only field. Modified: trunk/reactos/include/ndk/extypes.h Modified: trunk/reactos/include/ndk/fixmes.txt Modified: trunk/reactos/include/ndk/iotypes.h Modified: trunk/reactos/include/ndk/ketypes.h Modified: trunk/reactos/include/ndk/pstypes.h Modified: trunk/reactos/include/ndk/rtltypes.h Modified: trunk/reactos/include/ndk/umfuncs.h Modified: trunk/reactos/include/ndk/umtypes.h Modified: trunk/reactos/lib/kernel32/process/create.c Modified: trunk/reactos/lib/ntdll/csr/lpc.c Modified: trunk/reactos/ntoskrnl/include/internal/io.h Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c Modified: trunk/reactos/w32api/include/ddk/ntifs.h _____ Modified: trunk/reactos/include/ndk/extypes.h --- trunk/reactos/include/ndk/extypes.h 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/include/ndk/extypes.h 2005-08-11 00:01:17 UTC (rev 17272) @@ -38,10 +38,9 @@ /* You'll need the IFS for this, so use an equivalent version */ #ifndef _NTIFS_ typedef PVOID EX_RUNDOWN_REF; +typedef PVOID EX_PUSH_LOCK; #endif -/* You'll need the IFS for these, so let's not force everyone to have it */ -#ifdef _NTIFS_ typedef struct _EX_QUEUE_WORKER_INFO { UCHAR QueueDisabled:1; @@ -59,7 +58,6 @@ ULONG QueueDepthLastPass; EX_QUEUE_WORKER_INFO Info; } EX_WORK_QUEUE, *PEX_WORK_QUEUE; -#endif typedef struct _EX_FAST_REF { @@ -71,21 +69,6 @@ }; } EX_FAST_REF, *PEX_FAST_REF; -typedef struct _EX_PUSH_LOCK -{ - union - { - struct - { - ULONG Waiting:1; - ULONG Exclusive:1; - ULONG Shared:30; - }; - ULONG Value; - PVOID Ptr; - }; -} EX_PUSH_LOCK, *PEX_PUSH_LOCK; - typedef struct _HANDLE_TABLE_ENTRY_INFO { ULONG AuditMask; _____ Modified: trunk/reactos/include/ndk/fixmes.txt --- trunk/reactos/include/ndk/fixmes.txt 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/include/ndk/fixmes.txt 2005-08-11 00:01:17 UTC (rev 17272) @@ -2,8 +2,8 @@ ----------- Order: - * Priority 1 = Easiest to fix. - * Priority 5 = Hardest to fix. + * Priority 1 = Most important to fix. + * Priority 5 = Least important to fix. Format: <Priority Level> @@ -19,7 +19,7 @@ - FIXED: Some files need cleanup (Alex + Eric) [zwfuncs.h, rtlfuncs.h, rtltypes.h] Priority 2: - - DEVICE_NODE has 2 fields not part of NT's defintion [iotypes.h] + - FIXED: DEVICE_NODE has 2 fields not part of NT's defintion (Alex) [iotypes.h] - Object Callbacks don't match NT's (Alex) [obtypes.h] - Remove Create Callback Hack (Alex) [obtypes.h] - Object header doesn't match NT (Alex) [obtypes.h] blocks on -> @@ -32,9 +32,9 @@ Priority 4: - FIXED: Kernel and Memory Types are not architecture-specific (Eric) [ketypes.h, mmtypes.h] - - Win32K Builds with windows.h (Filip, bugzilla id 666) [extypes.h, ketypes.h] + - FIXED: Win32K Builds with windows.h (Filip) [extypes.h, ketypes.h] Priority 5: - LPC Types are totally wrong. [lpctypes.h] - Missing System Info Classes [zwtypes.h] - - Process Priority Classes are messed up (Alex) [pstypes.h] + - FIXED: Process Priority Classes are messed up (Alex) [pstypes.h] _____ Modified: trunk/reactos/include/ndk/iotypes.h --- trunk/reactos/include/ndk/iotypes.h 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/include/ndk/iotypes.h 2005-08-11 00:01:17 UTC (rev 17272) @@ -207,10 +207,6 @@ ULONG DriverUnloadRetryCount; struct _DEVICE_NODE *PreviousParent; ULONG DeletedChidren; - - /* FIXME: Not NT's */ - GUID BusTypeGuid; - ULONG Address; } DEVICE_NODE, *PDEVICE_NODE; typedef struct _PI_RESOURCE_ARBITER_ENTRY _____ Modified: trunk/reactos/include/ndk/ketypes.h --- trunk/reactos/include/ndk/ketypes.h 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/include/ndk/ketypes.h 2005-08-11 00:01:17 UTC (rev 17272) @@ -63,7 +63,7 @@ CurrentApcEnvironment } KAPC_ENVIRONMENT; -/* We don't want to force NTIFS usage only for a single structure */ +/* We don't want to force NTIFS usage only for two structures */ #ifndef _NTIFS_ typedef struct _KAPC_STATE { @@ -73,6 +73,15 @@ BOOLEAN KernelApcPending; BOOLEAN UserApcPending; } KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE; + +typedef struct _KQUEUE +{ + DISPATCHER_HEADER Header; + LIST_ENTRY EntryListHead; + ULONG CurrentCount; + ULONG MaximumCount; + LIST_ENTRY ThreadListHead; +} KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE; #endif typedef struct _KNODE _____ Modified: trunk/reactos/include/ndk/pstypes.h --- trunk/reactos/include/ndk/pstypes.h 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/include/ndk/pstypes.h 2005-08-11 00:01:17 UTC (rev 17272) @@ -36,12 +36,13 @@ #define USER_SHARED_DATA (0x7FFE0000) /* Process priority classes */ -#define PROCESS_PRIORITY_CLASS_IDLE 0 -#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL 1 -#define PROCESS_PRIORITY_CLASS_NORMAL 2 -#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL 3 -#define PROCESS_PRIORITY_CLASS_HIGH 4 -#define PROCESS_PRIORITY_CLASS_REALTIME 5 +#define PROCESS_PRIORITY_CLASS_INVALID 0 +#define PROCESS_PRIORITY_CLASS_IDLE 1 +#define PROCESS_PRIORITY_CLASS_NORMAL 2 +#define PROCESS_PRIORITY_CLASS_HIGH 3 +#define PROCESS_PRIORITY_CLASS_REALTIME 4 +#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL 5 +#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL 6 /* Global Flags */ #define FLG_STOP_ON_EXCEPTION 0x00000001 _____ Modified: trunk/reactos/include/ndk/rtltypes.h --- trunk/reactos/include/ndk/rtltypes.h 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/include/ndk/rtltypes.h 2005-08-11 00:01:17 UTC (rev 17272) @@ -40,11 +40,11 @@ #define EXCEPTION_TARGET_UNWIND 0x20 #define EXCEPTION_COLLIDED_UNWIND 0x20 -#define EH_NONCONTINUABLE 0x01 -#define EH_UNWINDING 0x02 -#define EH_EXIT_UNWIND 0x04 -#define EH_STACK_INVALID 0x08 -#define EH_NESTED_CALL 0x10 +#define EH_NONCONTINUABLE 0x01 +#define EH_UNWINDING 0x02 +#define EH_EXIT_UNWIND 0x04 +#define EH_STACK_INVALID 0x08 +#define EH_NESTED_CALL 0x10 #define RTL_RANGE_LIST_ADD_IF_CONFLICT 0x00000001 #define RTL_RANGE_LIST_ADD_SHARED 0x00000002 @@ -109,20 +109,16 @@ PVOID Parameter ); -#ifndef _NTIFS_ -typedef NTSTATUS -(NTAPI * PRTL_HEAP_COMMIT_ROUTINE) ( - IN PVOID Base, - IN OUT PVOID *CommitAddress, - IN OUT PSIZE_T CommitSize -); -#endif - /* TYPES *********************************************************************/ typedef unsigned short RTL_ATOM; typedef unsigned short *PRTL_ATOM; +/* Once again, we don't want to force NTIFS for something like this */ +#if !defined(_NTIFS_) && !defined(NTOS_MODE_USER) +typedef PVOID PRTL_HEAP_PARAMETERS; +#endif + typedef ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION; typedef ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION; typedef struct _ACE @@ -402,22 +398,6 @@ PRTL_ATOM_TABLE_ENTRY Buckets[1]; } RTL_ATOM_TABLE, *PRTL_ATOM_TABLE; -#ifndef _NTIFS_ -typedef struct _RTL_HEAP_PARAMETERS { - ULONG Length; - SIZE_T SegmentReserve; - SIZE_T SegmentCommit; - SIZE_T DeCommitFreeBlockThreshold; - SIZE_T DeCommitTotalFreeThreshold; - SIZE_T MaximumAllocationSize; - SIZE_T VirtualMemoryThreshold; - SIZE_T InitialCommit; - SIZE_T InitialReserve; - PRTL_HEAP_COMMIT_ROUTINE CommitRoutine; - SIZE_T Reserved[2]; -} RTL_HEAP_PARAMETERS, *PRTL_HEAP_PARAMETERS; -#endif - /* Let Kernel Drivers use this */ #ifndef _WINBASE_ typedef struct _SYSTEMTIME _____ Modified: trunk/reactos/include/ndk/umfuncs.h --- trunk/reactos/include/ndk/umfuncs.h 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/include/ndk/umfuncs.h 2005-08-11 00:01:17 UTC (rev 17272) @@ -25,7 +25,7 @@ PVOID Unknown, PVOID Context, ULONG ContextLength, - PULONG Unknown2 + PBOOLEAN ServerToServerCall ); NTSTATUS _____ Modified: trunk/reactos/include/ndk/umtypes.h --- trunk/reactos/include/ndk/umtypes.h 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/include/ndk/umtypes.h 2005-08-11 00:01:17 UTC (rev 17272) @@ -48,7 +48,7 @@ #define NT_WARNING(x) ((ULONG)(x)>>30==2) #define NT_ERROR(x) ((ULONG)(x)>>30==3) -/* Object Access Rights FIXME: Some are in w32api's psdk..,is that normal ?*/ +/* Object Access Rights */ #define DIRECTORY_QUERY (0x0001) #define DIRECTORY_TRAVERSE (0x0002) #define DIRECTORY_CREATE_OBJECT (0x0004) @@ -1418,7 +1418,28 @@ PUNICODE_PREFIX_TABLE_ENTRY LastNextEntry; } UNICODE_PREFIX_TABLE, *PUNICODE_PREFIX_TABLE; -/* FIXME - need FAST_MUTEX and PHANDLE_TABLE for RTL_ATOM_TABLE in umode! */ +typedef NTSTATUS +(NTAPI * PRTL_HEAP_COMMIT_ROUTINE)( + IN PVOID Base, + IN OUT PVOID *CommitAddress, + IN OUT PSIZE_T CommitSize +); + +typedef struct _RTL_HEAP_PARAMETERS +{ + ULONG Length; + SIZE_T SegmentReserve; + SIZE_T SegmentCommit; + SIZE_T DeCommitFreeBlockThreshold; + SIZE_T DeCommitTotalFreeThreshold; + SIZE_T MaximumAllocationSize; + SIZE_T VirtualMemoryThreshold; + SIZE_T InitialCommit; + SIZE_T InitialReserve; + PRTL_HEAP_COMMIT_ROUTINE CommitRoutine; + SIZE_T Reserved[2]; +} RTL_HEAP_PARAMETERS, *PRTL_HEAP_PARAMETERS; + typedef void *FAST_MUTEX; typedef void *PHANDLE_TABLE; _____ Modified: trunk/reactos/lib/kernel32/process/create.c --- trunk/reactos/lib/kernel32/process/create.c 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/lib/kernel32/process/create.c 2005-08-11 00:01:17 UTC (rev 17272) @@ -263,7 +263,7 @@ } else { - ReturnClass = 0 /* FIXME */; + ReturnClass = PROCESS_PRIORITY_CLASS_INVALID; } return ReturnClass; _____ Modified: trunk/reactos/lib/ntdll/csr/lpc.c --- trunk/reactos/lib/ntdll/csr/lpc.c 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/lib/ntdll/csr/lpc.c 2005-08-11 00:01:17 UTC (rev 17272) @@ -107,7 +107,7 @@ PVOID Unknown, PVOID Context, ULONG ContextLength, - PULONG Unknown2) + PBOOLEAN ServerToServerCall) { NTSTATUS Status; UNICODE_STRING PortName = RTL_CONSTANT_STRING(L"\\Windows\\ApiPort"); _____ Modified: trunk/reactos/ntoskrnl/include/internal/io.h --- trunk/reactos/ntoskrnl/include/internal/io.h 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/ntoskrnl/include/internal/io.h 2005-08-11 00:01:17 UTC (rev 17272) @@ -23,6 +23,15 @@ IO_STATUS_BLOCK IoStatus; } IO_COMPLETION_PACKET, *PIO_COMPLETION_PACKET; +/* List of Bus Type GUIDs */ +typedef struct _IO_BUS_TYPE_GUID_LIST +{ + ULONG GuidCount; + FAST_MUTEX Lock; + GUID Guids[1]; +} IO_BUS_TYPE_GUID_LIST, *PIO_BUS_TYPE_GUID_LIST; +extern PIO_BUS_TYPE_GUID_LIST IopBusTypeGuidList; + /* Packet Types */ #define IrpCompletionPacket 0x1 #define IrpMiniCompletionPacket 0x2 _____ Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c --- trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-08-11 00:01:17 UTC (rev 17272) @@ -22,6 +22,7 @@ /* DATA **********************************************************************/ PDRIVER_OBJECT IopRootDriverObject; +PIO_BUS_TYPE_GUID_LIST IopBusTypeGuidList = NULL; /* FUNCTIONS *****************************************************************/ @@ -32,6 +33,32 @@ return DeviceObject->DeviceObjectExtension->DeviceNode; } +NTSTATUS +STDCALL +IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode, + PDEVICE_CAPABILITIES DeviceCaps) +{ + IO_STATUS_BLOCK StatusBlock; + IO_STACK_LOCATION Stack; + + /* Set up the Header */ + RtlZeroMemory(DeviceCaps, sizeof(DEVICE_CAPABILITIES)); + DeviceCaps->Size = sizeof(DEVICE_CAPABILITIES); + DeviceCaps->Version = 1; + DeviceCaps->Address = -1; + DeviceCaps->UINumber = -1; + + /* Set up the Stack */ + RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); + Stack.Parameters.DeviceCapabilities.Capabilities = DeviceCaps; + + /* Send the IRP */ + return IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, + &StatusBlock, + IRP_MN_QUERY_CAPABILITIES, + &Stack); +} + /* * @implemented */ @@ -57,9 +84,11 @@ OUT PULONG ResultLength) { PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); + DEVICE_CAPABILITIES DeviceCaps; ULONG Length; PVOID Data = NULL; PWSTR Ptr; + NTSTATUS Status; DPRINT("IoGetDeviceProperty(0x%p %d)\n", DeviceObject, DeviceProperty); @@ -75,34 +104,61 @@ /* Complete, untested */ case DevicePropertyBusTypeGuid: - *ResultLength = 39 * sizeof(WCHAR); - if (BufferLength < (39 * sizeof(WCHAR))) - return STATUS_BUFFER_TOO_SMALL; - swprintf((PWSTR)PropertyBuffer, - L"{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - DeviceNode->BusTypeGuid.Data1, - DeviceNode->BusTypeGuid.Data2, - DeviceNode->BusTypeGuid.Data3, - DeviceNode->BusTypeGuid.Data4[0], - DeviceNode->BusTypeGuid.Data4[1], - DeviceNode->BusTypeGuid.Data4[2], - DeviceNode->BusTypeGuid.Data4[3], - DeviceNode->BusTypeGuid.Data4[4], - DeviceNode->BusTypeGuid.Data4[5], - DeviceNode->BusTypeGuid.Data4[6], - DeviceNode->BusTypeGuid.Data4[7]); - return STATUS_SUCCESS; + /* Sanity check */ + if ((DeviceNode->ChildBusTypeIndex != 0xFFFF) && + (DeviceNode->ChildBusTypeIndex < IopBusTypeGuidList->GuidCount)) + { + /* Return the GUID */ + *ResultLength = sizeof(GUID); + /* Check if the buffer given was large enough */ + if (BufferLength < *ResultLength) + { + return STATUS_BUFFER_TOO_SMALL; + } + + /* Copy the GUID */ + RtlCopyMemory(PropertyBuffer, + &(IopBusTypeGuidList->Guids[DeviceNode->ChildBusTypeIndex]), + sizeof(GUID)); + return STATUS_SUCCESS; + } + else + { + return STATUS_OBJECT_NAME_NOT_FOUND; + } + break; + case DevicePropertyLegacyBusType: Length = sizeof(INTERFACE_TYPE); Data = &DeviceNode->ChildInterfaceType; break; case DevicePropertyAddress: - Length = sizeof(ULONG); - Data = &DeviceNode->Address; - break; + /* Query the device caps */ + Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps); + if (NT_SUCCESS(Status) && (DeviceCaps.Address != -1)) + { + /* Return length */ + *ResultLength = sizeof(ULONG); + + /* Check if the buffer given was large enough */ + if (BufferLength < *ResultLength) + { + return STATUS_BUFFER_TOO_SMALL; + } + + /* Return address */ + *(PULONG)PropertyBuffer = DeviceCaps.Address; + return STATUS_SUCCESS; + } + else + { + return STATUS_OBJECT_NAME_NOT_FOUND; + } + break; + // case DevicePropertyUINumber: // if (DeviceNode->CapabilityFlags == NULL) // return STATUS_INVALID_DEVICE_REQUEST; @@ -453,6 +509,66 @@ return STATUS_UNSUCCESSFUL; } +USHORT +STDCALL +IopGetBusTypeGuidIndex(LPGUID BusTypeGuid) +{ + USHORT i = 0, FoundIndex = 0xFFFF; + ULONG NewSize; + PVOID NewList; + + /* Acquire the lock */ + ExAcquireFastMutex(&IopBusTypeGuidList->Lock); + + /* Loop all entries */ + while (i < IopBusTypeGuidList->GuidCount) + { + /* Try to find a match */ + if (RtlCompareMemory(BusTypeGuid, + &IopBusTypeGuidList->Guids[i], + sizeof(GUID))) + { + /* Found it */ + FoundIndex = i; + goto Quickie; + } + } + + /* Check if we have to grow the list */ + if (IopBusTypeGuidList->GuidCount) + { + /* Calculate the new size */ + NewSize = sizeof(IO_BUS_TYPE_GUID_LIST) + + (sizeof(GUID) * IopBusTypeGuidList->GuidCount); + + /* Allocate the new copy */ + NewList = ExAllocatePool(PagedPool, NewSize); + + /* Now copy them, decrease the size too */ + NewSize -= sizeof(GUID); + RtlCopyMemory(NewList, IopBusTypeGuidList, NewSize); + + /* Free the old list */ + ExFreePool(IopBusTypeGuidList); + + /* Use the new buffer */ + IopBusTypeGuidList = NewList; + } + + /* Copy the new GUID */ + RtlCopyMemory(&IopBusTypeGuidList->Guids[IopBusTypeGuidList->GuidCount], + BusTypeGuid, + sizeof(GUID)); + + /* The new entry is the index */ + FoundIndex = IopBusTypeGuidList->GuidCount; + IopBusTypeGuidList->GuidCount++; + +Quickie: + ExReleaseFastMutex(&IopBusTypeGuidList->Lock); + return FoundIndex; +} + /* * DESCRIPTION * Creates a device node @@ -1212,28 +1328,13 @@ DPRINT("IopInitiatePnpIrp() failed (Status %x)\n", Status); } - RtlZeroMemory(&DeviceCapabilities, sizeof(DEVICE_CAPABILITIES)); - DeviceCapabilities.Size = sizeof(DEVICE_CAPABILITIES); - DeviceCapabilities.Version = 1; - DeviceCapabilities.Address = -1; - DeviceCapabilities.UINumber = -1; - - Stack.Parameters.DeviceCapabilities.Capabilities = &DeviceCapabilities; - Status = IopInitiatePnpIrp( - DeviceNode->PhysicalDeviceObject, - &IoStatusBlock, - IRP_MN_QUERY_CAPABILITIES, - &Stack); + Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCapabilities); if (NT_SUCCESS(Status)) { - } - else - { DPRINT("IopInitiatePnpIrp() failed (Status %x)\n", Status); } DeviceNode->CapabilityFlags = *(PULONG)((ULONG_PTR)&DeviceCapabilities + 4); - DeviceNode->Address = DeviceCapabilities.Address; if (!DeviceCapabilities.UniqueID) { @@ -1457,20 +1558,16 @@ DeviceNode->ChildBusNumber = BusInformation->BusNumber; DeviceNode->ChildInterfaceType = BusInformation->LegacyBusType; - memcpy(&DeviceNode->BusTypeGuid, - &BusInformation->BusTypeGuid, - sizeof(GUID)); + DeviceNode->ChildBusTypeIndex = IopGetBusTypeGuidIndex(&BusInformation->BusTypeGuid); ExFreePool(BusInformation); } else { DPRINT("IopInitiatePnpIrp() failed (Status %x)\n", Status); - DeviceNode->ChildBusNumber = -1; - DeviceNode->ChildInterfaceType = -1; - memset(&DeviceNode->BusTypeGuid, - 0, - sizeof(GUID)); + DeviceNode->ChildBusNumber = 0xFFFFFFF0; + DeviceNode->ChildInterfaceType = InterfaceTypeUndefined; + DeviceNode->ChildBusTypeIndex = -1; } DPRINT("Sending IRP_MN_QUERY_RESOURCES to device stack\n"); @@ -2026,6 +2123,11 @@ KeInitializeSpinLock(&IopDeviceTreeLock); + /* Initialize the Bus Type GUID List */ + IopBusTypeGuidList = ExAllocatePool(PagedPool, sizeof(IO_BUS_TYPE_GUID_LIST)); + RtlZeroMemory(IopBusTypeGuidList, sizeof(IO_BUS_TYPE_GUID_LIST)); + ExInitializeFastMutex(&IopBusTypeGuidList->Lock); + /* Initialize PnP-Event notification support */ Status = IopInitPlugPlayEvents(); if (!NT_SUCCESS(Status)) _____ Modified: trunk/reactos/w32api/include/ddk/ntifs.h --- trunk/reactos/w32api/include/ddk/ntifs.h 2005-08-10 22:15:12 UTC (rev 17271) +++ trunk/reactos/w32api/include/ddk/ntifs.h 2005-08-11 00:01:17 UTC (rev 17272) @@ -627,6 +627,31 @@ } DUMMYUNIONNAME; } EX_RUNDOWN_REF, *PEX_RUNDOWN_REF; +#define EX_PUSH_LOCK_LOCK_V ((ULONG_PTR)0x0) +#define EX_PUSH_LOCK_LOCK ((ULONG_PTR)0x1) +#define EX_PUSH_LOCK_WAITING ((ULONG_PTR)0x2) +#define EX_PUSH_LOCK_WAKING ((ULONG_PTR)0x4) +#define EX_PUSH_LOCK_MULTIPLE_SHARED ((ULONG_PTR)0x8) +#define EX_PUSH_LOCK_SHARE_INC ((ULONG_PTR)0x10) +#define EX_PUSH_LOCK_PTR_BITS ((ULONG_PTR)0xf) + +typedef struct _EX_PUSH_LOCK +{ + union + { + struct + { + ULONG_PTR Locked:1; + ULONG_PTR Waiting:1; + ULONG_PTR Waking:1; + ULONG_PTR MultipleShared:1; + ULONG_PTR Shared:sizeof (ULONG_PTR) * 8 - 4; + }; + ULONG_PTR Value; + PVOID Ptr; + }; +} EX_PUSH_LOCK, *PEX_PUSH_LOCK; + typedef struct _FILE_ACCESS_INFORMATION { ACCESS_MASK AccessFlags; } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
19 years, 4 months
1
0
0
0
[gvg] 17271: Phil Krylov <phil@newstar.rinet.ru>
by gvg@svn.reactos.com
Phil Krylov <phil(a)newstar.rinet.ru> - Fixed winebuild operation in Darwin. Steve Zellers <zellers(a)mac.com> - Fixed leftover import table name in output_import_thunk. Alexandre Julliard <julliard(a)winehq.org> - Replace configure macros by explicit platform checks (probably not correct on all platforms yet). - Moved most of the implementation of CALL32_CBClient(Ex) to the C code. - Don't use the full 32 bits of %esp when called from 16-bit code. - Added a --target option to allow cross-compilation. - Improve a bit the assembly generated for import thunks. - Don't depend on ELF features for PIC code. - A couple of optimizations. - Intercept functions for 16-bit relay debugging by patching the CALLFROM16 table instead of having the wine_call_from_16 functions call out the relay functions explicitly. - Added vararg argument type so that the relay code can distinguish from a normal cdecl function. - Don't rely on the relay thunk preserving the stack pointer. - Moved all 16-bit relay code to the text section. - Changed a few symbol names for better consistency. - Get rid of the global debugging flag. Mike McCormack <mike(a)codeweavers.com> - gcc 4.0 -Wpointer-sign fixes. Marcus Meissner <marcus(a)jet.franken.de> - Fixed signedness warnings. Modified: trunk/reactos/tools/winebuild/build.h Modified: trunk/reactos/tools/winebuild/import.c Modified: trunk/reactos/tools/winebuild/main.c Modified: trunk/reactos/tools/winebuild/relay.c Modified: trunk/reactos/tools/winebuild/spec16.c Modified: trunk/reactos/tools/winebuild/spec32.c Modified: trunk/reactos/tools/winebuild/utils.c Modified: trunk/reactos/tools/winebuild/winebuild.man.in _____ Modified: trunk/reactos/tools/winebuild/build.h --- trunk/reactos/tools/winebuild/build.h 2005-08-10 21:09:05 UTC (rev 17270) +++ trunk/reactos/tools/winebuild/build.h 2005-08-10 22:15:12 UTC (rev 17271) @@ -184,6 +184,8 @@ extern const char *asm_name( const char *func ); extern const char *func_declaration( const char *func ); extern const char *func_size( const char *func ); +extern const char *get_asm_string_keyword(void); +extern const char *get_asm_short_keyword(void); extern void add_import_dll( const char *name, const char *filename ); extern void add_delayed_import( const char *name ); @@ -220,7 +222,6 @@ extern int current_line; extern int UsePIC; -extern int debugging; extern int nb_debug_channels; extern int nb_lib_paths; extern int nb_errors; _____ Modified: trunk/reactos/tools/winebuild/import.c --- trunk/reactos/tools/winebuild/import.c 2005-08-10 21:09:05 UTC (rev 17270) +++ trunk/reactos/tools/winebuild/import.c 2005-08-10 22:15:12 UTC (rev 17271) @@ -586,6 +586,7 @@ close( fd ); atexit( remove_ld_tmp_file ); + if (!ld_command) ld_command = xstrdup("ld"); for (i = 0; argv[i]; i++) len += strlen(argv[i]) + 1; cmd = xmalloc( len + strlen(ld_tmp_file) + 8 + strlen(ld_command) ); sprintf( cmd, "%s -r -o %s", ld_command, ld_tmp_file ); @@ -616,6 +617,7 @@ if (argv[1]) name = ldcombine_files( argv ); else name = argv[0]; + if (!nm_command) nm_command = xstrdup("nm"); cmd = xmalloc( strlen(nm_command) + strlen(name) + 5 ); sprintf( cmd, "%s -u %s", nm_command, name ); if (!(f = popen( cmd, "r" ))) @@ -692,7 +694,7 @@ /* output a single import thunk */ static void output_import_thunk( FILE *outfile, const char *name, const char *table, int pos ) { - fprintf( outfile, " \"\\t.align %d\\n\"\n", get_alignment(8) ); + fprintf( outfile, " \"\\t.align %d\\n\"\n", get_alignment(4) ); fprintf( outfile, " \"\\t%s\\n\"\n", func_declaration(name) ); fprintf( outfile, " \"\\t.globl %s\\n\"\n", asm_name(name) ); fprintf( outfile, " \"%s:\\n\"\n", asm_name(name) ); @@ -703,38 +705,50 @@ if (!UsePIC) { if (strstr( name, "__wine_call_from_16" )) fprintf( outfile, " \"\\t.byte 0x2e\\n\"\n" ); - fprintf( outfile, " \"\\tjmp *(imports+%d)\\n\"\n", pos ); + fprintf( outfile, " \"\\tjmp *(%s+%d)\\n\"\n", asm_name(table), pos ); } else { - if (!strcmp( name, "__wine_call_from_32_regs" ) || - !strcmp( name, "__wine_call_from_16_regs" )) + if (!strcmp( name, "__wine_call_from_32_regs" )) { /* special case: need to preserve all registers */ fprintf( outfile, " \"\\tpushl %%eax\\n\"\n" ); - fprintf( outfile, " \"\\tpushfl\\n\"\n" ); fprintf( outfile, " \"\\tcall .L__wine_spec_%s\\n\"\n", name ); fprintf( outfile, " \".L__wine_spec_%s:\\n\"\n", name ); fprintf( outfile, " \"\\tpopl %%eax\\n\"\n" ); - fprintf( outfile, " \"\\taddl $%d+%s-.L__wine_spec_%s,%%eax\\n\"\n", - pos, asm_name(table), name ); if (!strcmp( name, "__wine_call_from_16_regs" )) fprintf( outfile, " \"\\t.byte 0x2e\\n\"\n" ); - fprintf( outfile, " \"\\tmovl 0(%%eax),%%eax\\n\"\n" ); - fprintf( outfile, " \"\\txchgl 4(%%esp),%%eax\\n\"\n" ); - fprintf( outfile, " \"\\tpopfl\\n\"\n" ); + fprintf( outfile, " \"\\tmovl %s+%d-.L__wine_spec_%s(%%eax),%%eax\\n\"\n", + asm_name(table), pos, name ); + fprintf( outfile, " \"\\txchgl %%eax,(%%esp)\\n\"\n" ); fprintf( outfile, " \"\\tret\\n\"\n" ); } + else if (!strcmp( name, "__wine_call_from_16_regs" )) + { + /* special case: need to preserve all registers */ + fprintf( outfile, " \"\\tpushl %%eax\\n\"\n" ); + fprintf( outfile, " \"\\tpushl %%ecx\\n\"\n" ); + fprintf( outfile, " \"\\tcall .L__wine_spec_%s\\n\"\n", name ); + fprintf( outfile, " \".L__wine_spec_%s:\\n\"\n", name ); + fprintf( outfile, " \"\\tpopl %%eax\\n\"\n" ); + fprintf( outfile, " \"\\t.byte 0x2e\\n\"\n" ); + fprintf( outfile, " \"\\tmovl %s+%d-.L__wine_spec_%s(%%eax),%%eax\\n\"\n", + asm_name(table), pos, name ); + fprintf( outfile, " \"\\tmovzwl %%sp, %%ecx\\n\"\n" ); + fprintf( outfile, " \"\\t.byte 0x36\\n\"\n" ); + fprintf( outfile, " \"\\txchgl %%eax,4(%%ecx)\\n\"\n" ); + fprintf( outfile, " \"\\tpopl %%ecx\\n\"\n" ); + fprintf( outfile, " \"\\tret\\n\"\n" ); + } else { fprintf( outfile, " \"\\tcall .L__wine_spec_%s\\n\"\n", name ); fprintf( outfile, " \".L__wine_spec_%s:\\n\"\n", name ); fprintf( outfile, " \"\\tpopl %%eax\\n\"\n" ); - fprintf( outfile, " \"\\taddl $%d+%s-.L__wine_spec_%s,%%eax\\n\"\n", - pos, asm_name(table), name ); if (strstr( name, "__wine_call_from_16" )) fprintf( outfile, " \"\\t.byte 0x2e\\n\"\n" ); - fprintf( outfile, " \"\\tjmp *0(%%eax)\\n\"\n" ); + fprintf( outfile, " \"\\tjmp *%s+%d-.L__wine_spec_%s(%%eax)\\n\"\n", + asm_name(table), pos, name ); } } break; _____ Modified: trunk/reactos/tools/winebuild/main.c --- trunk/reactos/tools/winebuild/main.c 2005-08-10 21:09:05 UTC (rev 17270) +++ trunk/reactos/tools/winebuild/main.c 2005-08-10 22:15:12 UTC (rev 17271) @@ -44,7 +44,6 @@ int nb_errors = 0; int display_warnings = 0; int kill_at = 0; -int debugging = 0; #if defined(__i386__) || defined(__x86_64__) enum target_cpu target_cpu = CPU_x86; @@ -75,8 +74,8 @@ char *spec_file_name = NULL; const char *output_file_name = NULL; -char *ld_command = "ld"; -char *nm_command = "nm"; +char *ld_command = NULL; +char *nm_command = NULL; static FILE *output_file; static const char *current_src_dir; @@ -98,6 +97,35 @@ static enum exec_mode_values exec_mode = MODE_NONE; +static const struct +{ + const char *name; + enum target_cpu cpu; +} cpu_names[] = +{ + { "i386", CPU_x86 }, + { "i486", CPU_x86 }, + { "i586", CPU_x86 }, + { "i686", CPU_x86 }, + { "i786", CPU_x86 }, + { "sparc", CPU_SPARC }, + { "alpha", CPU_ALPHA }, + { "powerpc", CPU_POWERPC } +}; + +static const struct +{ + const char *name; + enum target_platform platform; +} platform_names[] = +{ + { "macos", PLATFORM_APPLE }, + { "darwin", PLATFORM_APPLE }, + { "sunos", PLATFORM_SVR4 }, + { "windows", PLATFORM_WINDOWS }, + { "winnt", PLATFORM_WINDOWS } +}; + /* set the dll file name from the input file name */ static void set_dll_file_name( const char *name, DLLSPEC *spec ) { @@ -137,6 +165,56 @@ free( str ); } +/* set the target CPU and platform */ +static void set_target( const char *target ) +{ + unsigned int i; + char *p, *platform, *spec = xstrdup( target ); + + /* target specification is in the form CPU-MANUFACTURER-OS or CPU-MANUFACTURER-KERNEL-OS */ + + /* get the CPU part */ + + if (!(p = strchr( spec, '-' ))) fatal_error( "Invalid target specification '%s'\n", target ); + *p++ = 0; + for (i = 0; i < sizeof(cpu_names)/sizeof(cpu_names[0]); i++) + { + if (!strcmp( cpu_names[i].name, spec )) break; + } + if (i < sizeof(cpu_names)/sizeof(cpu_names[0])) target_cpu = cpu_names[i].cpu; + else fatal_error( "Unrecognized CPU '%s'\n", spec ); + + platform = p; + if ((p = strrchr( p, '-' ))) platform = p + 1; + + /* get the OS part */ + + target_platform = PLATFORM_UNSPECIFIED; /* default value */ + for (i = 0; i < sizeof(platform_names)/sizeof(platform_names[0]); i++) + { + if (!strncmp( platform_names[i].name, platform, strlen(platform_names[i].name) )) + { + target_platform = platform_names[i].platform; + break; + } + } + + free( spec ); + + if (!ld_command) + { + ld_command = xmalloc( strlen(target) + sizeof("-ld") ); + strcpy( ld_command, target ); + strcat( ld_command, "-ld" ); + } + if (!nm_command) + { + nm_command = xmalloc( strlen(target) + sizeof("-nm") ); + strcpy( nm_command, target ); + strcat( nm_command, "-nm" ); + } +} + /* cleanup on program exit */ static void cleanup(void) { @@ -177,6 +255,7 @@ " -o --output=NAME Set the output file name (default: stdout)\n" " -r --res=RSRC.RES Load resources from RSRC.RES\n" " --subsystem=SUBSYS Set the subsystem (one of native, windows, console)\n" +" --target=TARGET Specify target CPU and platform for cross-compiling\n" " --version Print the version and exit\n" " -w --warnings Turn on warnings\n" "\nMode options:\n" @@ -201,6 +280,7 @@ LONG_OPT_RELAY32, LONG_OPT_SUBSYSTEM, LONG_OPT_VERSION, + LONG_OPT_TARGET, LONG_OPT_PEDLL }; @@ -217,6 +297,7 @@ { "relay16", 0, 0, LONG_OPT_RELAY16 }, { "relay32", 0, 0, LONG_OPT_RELAY32 }, { "subsystem",1, 0, LONG_OPT_SUBSYSTEM }, + { "target", 1, 0, LONG_OPT_TARGET }, { "version", 0, 0, LONG_OPT_VERSION }, { "pedll", 1, 0, LONG_OPT_PEDLL }, /* aliases for short options */ @@ -373,6 +454,9 @@ case LONG_OPT_SUBSYSTEM: set_subsystem( optarg, spec ); break; + case LONG_OPT_TARGET: + set_target( optarg ); + break; case LONG_OPT_VERSION: printf( "winebuild version " PACKAGE_VERSION "\n" ); exit(0); @@ -470,9 +554,6 @@ output_file = stdout; argv = parse_options( argc, argv, spec ); - /* we only support relay debugging on i386 */ - debugging = (target_cpu == CPU_x86); - switch(exec_mode) { case MODE_DLL: _____ Modified: trunk/reactos/tools/winebuild/relay.c --- trunk/reactos/tools/winebuild/relay.c 2005-08-10 21:09:05 UTC (rev 17270) +++ trunk/reactos/tools/winebuild/relay.c 2005-08-10 22:15:12 UTC (rev 17271) @@ -138,22 +138,16 @@ fprintf( outfile, "\tpushl %%edx\n" ); /* Save original EFlags register */ - fprintf( outfile, "\tpushfl\n" ); + if (reg_func) fprintf( outfile, "\tpushfl\n" ); if ( UsePIC ) { - /* Get Global Offset Table into %ecx */ - fprintf( outfile, "\tcall .L__wine_call_from_16_%s.getgot1\n", name ); - fprintf( outfile, ".L__wine_call_from_16_%s.getgot1:\n", name ); + fprintf( outfile, "\tcall .Lcall_from_16_%s.getpc\n", name ); + fprintf( outfile, ".Lcall_from_16_%s.getpc:\n", name ); fprintf( outfile, "\tpopl %%ecx\n" ); - fprintf( outfile, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-.L__wine_call_from_16_%s.getgot1], %%ecx\n", name ); + fprintf( outfile, "\t.byte 0x2e\n\tmovl %s-.Lcall_from_16_%s.getpc(%%ecx),%%edx\n", + asm_name("CallTo16_DataSelector"), name ); } - - if (UsePIC) - { - fprintf( outfile, "\t.byte 0x2e\n\tmovl %s(%%ecx), %%edx\n", asm_name("CallTo16_DataSelector@GOT") ); - fprintf( outfile, "\t.byte 0x2e\n\tmovl (%%edx), %%edx\n" ); - } else fprintf( outfile, "\t.byte 0x2e\n\tmovl %s,%%edx\n", asm_name("CallTo16_DataSelector") ); @@ -162,31 +156,29 @@ fprintf( outfile, "%s\tmovw %%dx, %%es\n", data16_prefix() ); if ( UsePIC ) - { - fprintf( outfile, "\tmovl %s(%%ecx), %%edx\n", asm_name("CallTo16_TebSelector@GOT") ); - fprintf( outfile, "\tmovw (%%edx), %%fs\n" ); - } + fprintf( outfile, "\tmovw %s-.Lcall_from_16_%s.getpc(%%ecx), %%fs\n", + asm_name("CallTo16_TebSelector"), name ); else fprintf( outfile, "\tmovw %s, %%fs\n", asm_name("CallTo16_TebSelector") ); fprintf( outfile, "\t.byte 0x64\n\tmov (%d),%%gs\n", STRUCTOFFSET(TEB,gs_sel) ); - /* Get address of wine_ldt_copy array into %ecx */ - if ( UsePIC ) - fprintf( outfile, "\tmovl %s(%%ecx), %%ecx\n", asm_name("wine_ldt_copy@GOT") ); - else - fprintf( outfile, "\tmovl $%s, %%ecx\n", asm_name("wine_ldt_copy") ); - /* Translate STACK16FRAME base to flat offset in %edx */ fprintf( outfile, "\tmovw %%ss, %%dx\n" ); fprintf( outfile, "\tandl $0xfff8, %%edx\n" ); fprintf( outfile, "\tshrl $1, %%edx\n" ); - fprintf( outfile, "\tmovl (%%ecx,%%edx), %%edx\n" ); + if (UsePIC) + { + fprintf( outfile, "\taddl wine_ldt_copy_ptr-.Lcall_from_16_%s.getpc(%%ecx),%%edx\n", name ); + fprintf( outfile, "\tmovl (%%edx), %%edx\n" ); + } + else + fprintf( outfile, "\tmovl %s(%%edx), %%edx\n", asm_name("wine_ldt_copy") ); fprintf( outfile, "\tmovzwl %%sp, %%ebp\n" ); - fprintf( outfile, "\tleal (%%ebp,%%edx), %%edx\n" ); + fprintf( outfile, "\tleal %d(%%ebp,%%edx), %%edx\n", reg_func ? 0 : -4 ); /* Get saved flags into %ecx */ - fprintf( outfile, "\tpopl %%ecx\n" ); + if (reg_func) fprintf( outfile, "\tpopl %%ecx\n" ); /* Get the 32-bit stack pointer from the TEB and complete STACK16FRAME */ fprintf( outfile, "\t.byte 0x64\n\tmovl (%d), %%ebp\n", STACKOFFSET ); @@ -292,83 +284,16 @@ fprintf( outfile, "\tpushl %%esp\n" ); } - - /* Print debug info before call */ - if ( debugging ) - { - if ( UsePIC ) - { - fprintf( outfile, "\tpushl %%ebx\n" ); - - /* Get Global Offset Table into %ebx (for PLT call) */ - fprintf( outfile, "\tcall .L__wine_call_from_16_%s.getgot2\n", name ); - fprintf( outfile, ".L__wine_call_from_16_%s.getgot2:\n", name ); - fprintf( outfile, "\tpopl %%ebx\n" ); - fprintf( outfile, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-.L__wine_call_from_16_%s.getgot2], %%ebx\n", name ); - } - - fprintf( outfile, "\tpushl %%edx\n" ); - if ( reg_func ) - fprintf( outfile, "\tleal -%d(%%ebp), %%eax\n\tpushl %%eax\n", - sizeof(CONTEXT) + STRUCTOFFSET(STACK32FRAME, ebp) ); - else - fprintf( outfile, "\tpushl $0\n" ); - - if ( UsePIC ) - fprintf( outfile, "\tcall %s\n ", asm_name("RELAY_DebugCallFrom16@PLT")); - else - fprintf( outfile, "\tcall %s\n ", asm_name("RELAY_DebugCallFrom16")); - - fprintf( outfile, "\tpopl %%edx\n" ); - fprintf( outfile, "\tpopl %%edx\n" ); - - if ( UsePIC ) - fprintf( outfile, "\tpopl %%ebx\n" ); - } - /* Call relay routine (which will call the API entry point) */ fprintf( outfile, "\tleal %d(%%edx), %%eax\n", sizeof(STACK16FRAME) ); fprintf( outfile, "\tpushl %%eax\n" ); fprintf( outfile, "\tpushl %d(%%edx)\n", STACK16OFFSET(entry_point) ); fprintf( outfile, "\tcall *%d(%%edx)\n", STACK16OFFSET(relay) ); - /* Print debug info after call */ - if ( debugging ) - { - if ( UsePIC ) - { - fprintf( outfile, "\tpushl %%ebx\n" ); - - /* Get Global Offset Table into %ebx (for PLT call) */ - fprintf( outfile, "\tcall .L__wine_call_from_16_%s.getgot3\n", name ); - fprintf( outfile, ".L__wine_call_from_16_%s.getgot3:\n", name ); - fprintf( outfile, "\tpopl %%ebx\n" ); - fprintf( outfile, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-.L__wine_call_from_16_%s.getgot3], %%ebx\n", name ); - } - - fprintf( outfile, "\tpushl %%eax\n" ); - if ( reg_func ) - fprintf( outfile, "\tleal -%d(%%ebp), %%eax\n\tpushl %%eax\n", - sizeof(CONTEXT) + STRUCTOFFSET(STACK32FRAME, ebp) ); - else - fprintf( outfile, "\tpushl $0\n" ); - - if ( UsePIC ) - fprintf( outfile, "\tcall %s\n ", asm_name("RELAY_DebugCallFrom16Ret@PLT")); - else - fprintf( outfile, "\tcall %s\n ", asm_name("RELAY_DebugCallFrom16Ret")); - - fprintf( outfile, "\tpopl %%eax\n" ); - fprintf( outfile, "\tpopl %%eax\n" ); - - if ( UsePIC ) - fprintf( outfile, "\tpopl %%ebx\n" ); - } - - if ( reg_func ) { - fprintf( outfile, "\tmovl %%esp, %%ebx\n" ); + fprintf( outfile, "\tleal -%d(%%ebp), %%ebx\n", + sizeof(CONTEXT) + STRUCTOFFSET(STACK32FRAME, ebp) ); /* Switch stack back */ fprintf( outfile, "\t.byte 0x64\n\tmovw (%d), %%ss\n", STACKOFFSET+2 ); @@ -610,7 +535,7 @@ */ static void BuildRet16Func( FILE *outfile ) { - function_header( outfile, "CallTo16_Ret" ); + function_header( outfile, "__wine_call_to_16_ret" ); /* Save %esp into %esi */ fprintf( outfile, "\tmovl %%esp,%%esi\n" ); @@ -618,12 +543,12 @@ /* Restore 32-bit segment registers */ fprintf( outfile, "\t.byte 0x2e\n\tmovl %s", asm_name("CallTo16_DataSelector") ); - fprintf( outfile, "-%s,%%edi\n", asm_name("Call16_Ret_Start") ); + fprintf( outfile, "-%s,%%edi\n", asm_name("__wine_call16_start") ); fprintf( outfile, "%s\tmovw %%di,%%ds\n", data16_prefix() ); fprintf( outfile, "%s\tmovw %%di,%%es\n", data16_prefix() ); fprintf( outfile, "\t.byte 0x2e\n\tmov %s", asm_name("CallTo16_TebSelector") ); - fprintf( outfile, "-%s,%%fs\n", asm_name("Call16_Ret_Start") ); + fprintf( outfile, "-%s,%%fs\n", asm_name("__wine_call16_start") ); fprintf( outfile, "\t.byte 0x64\n\tmov (%d),%%gs\n", STRUCTOFFSET(TEB,gs_sel) ); @@ -635,17 +560,7 @@ /* Return to caller */ fprintf( outfile, "\tlret\n" ); - - /* Function footer */ - function_footer( outfile, "CallTo16_Ret" ); - - /* Declare the return address and data selector variables */ - - fprintf( outfile, "\n\t.align %d\n", get_alignment(4) ); - fprintf( outfile, "\t.globl %s\n", asm_name("CallTo16_DataSelector") ); - fprintf( outfile, "%s:\t.long 0\n", asm_name("CallTo16_DataSelector") ); - fprintf( outfile, "\t.globl %s\n", asm_name("CallTo16_TebSelector") ); - fprintf( outfile, "%s:\t.long 0\n", asm_name("CallTo16_TebSelector") ); + function_footer( outfile, "__wine_call_to_16_ret" ); } @@ -741,15 +656,8 @@ */ static void BuildCallTo32CBClient( FILE *outfile, BOOL isEx ) { - const char *name = isEx? "CALL32_CBClientEx" : "CALL32_CBClient"; - int size = isEx? 24 : 12; + function_header( outfile, isEx ? "CALL32_CBClientEx" : "CALL32_CBClient" ); - /* Function header */ - - fprintf( outfile, "\n\t.align %d\n", get_alignment(4) ); - fprintf( outfile, "\t.globl %s\n", asm_name(name) ); - fprintf( outfile, "%s:\n", asm_name(name) ); - /* Entry code */ fprintf( outfile, "\tpushl %%ebp\n" ); @@ -758,106 +666,21 @@ fprintf( outfile, "\tpushl %%esi\n" ); fprintf( outfile, "\tpushl %%ebx\n" ); - if (UsePIC) - { - /* Get Global Offset Table into %edx */ - fprintf( outfile, "\tcall .L__wine_%s.getgot1\n", name ); - fprintf( outfile, ".L__wine_%s.getgot1:\n", name ); - fprintf( outfile, "\tpopl %%edx\n" ); - fprintf( outfile, "\taddl $_GLOBAL_OFFSET_TABLE_+[.-.L__wine_%s.getgot1], %%edx\n", name ); - } + /* Get pointer to temporary area and save the 32-bit stack pointer */ - /* Get the 16-bit stack */ + fprintf( outfile, "\tmovl 16(%%ebp), %%ebx\n" ); + fprintf( outfile, "\tleal -8(%%esp), %%eax\n" ); - fprintf( outfile, "\t.byte 0x64\n\tmovl (%d),%%ebx\n", STACKOFFSET); - - /* Convert it to a flat address */ - - fprintf( outfile, "\tshldl $16,%%ebx,%%eax\n" ); - fprintf( outfile, "\tandl $0xfff8,%%eax\n" ); - fprintf( outfile, "\tshrl $1,%%eax\n" ); - if (!UsePIC) - fprintf( outfile, "\tmovl %s(%%eax),%%esi\n", asm_name("wine_ldt_copy") ); - else - { - fprintf( outfile, "\tmovl %s(%%edx), %%esi\n", asm_name("wine_ldt_copy@GOT") ); - fprintf( outfile, "\tmovl (%%esi,%%eax), %%esi\n" ); - } - fprintf( outfile, "\tmovw %%bx,%%ax\n" ); - fprintf( outfile, "\taddl %%eax,%%esi\n" ); - - /* Allocate temporary area (simulate STACK16_PUSH) */ - - fprintf( outfile, "\tpushf\n" ); - fprintf( outfile, "\tcld\n" ); - fprintf( outfile, "\tleal -%d(%%esi), %%edi\n", size ); - fprintf( outfile, "\tmovl $%d, %%ecx\n", sizeof(STACK16FRAME) ); - fprintf( outfile, "\trep\n\tmovsb\n" ); - fprintf( outfile, "\tpopf\n" ); - - fprintf( outfile, "\t.byte 0x64\n\tsubw $%d,(%d)\n", size, STACKOFFSET ); - - fprintf( outfile, "\tpushl %%edi\n" ); /* remember address */ - - /* Set up temporary area */ - if ( !isEx ) - { - fprintf( outfile, "\tleal 4(%%edi), %%edi\n" ); - - fprintf( outfile, "\tleal -8(%%esp), %%eax\n" ); - fprintf( outfile, "\tmovl %%eax, -8(%%edi)\n" ); /* 32-bit sp */ - - fprintf( outfile, "\tmovw %%ss, %%ax\n" ); - fprintf( outfile, "\tandl $0x0000ffff, %%eax\n" ); - fprintf( outfile, "\tmovl %%eax, -4(%%edi)\n" ); /* 32-bit ss */ - - fprintf( outfile, "\taddl $%d, %%ebx\n", sizeof(STACK16FRAME)-size+4 + 4 ); - fprintf( outfile, "\tmovl %%ebx, 0(%%edi)\n" ); /* 16-bit ss:sp */ - - if (!UsePIC) - fprintf( outfile, "\tmovl %s_RetAddr, %%eax\n", asm_name(name) ); - else - { - fprintf( outfile, "\tmovl %s_RetAddr@GOT(%%edx), %%eax\n", asm_name(name) ); - fprintf( outfile, "\tmovl (%%eax), %%eax\n" ); - } - fprintf( outfile, "\tmovl %%eax, 4(%%edi)\n" ); /* overwrite return address */ - } + fprintf( outfile, "\tmovl %%eax, -8(%%ebx)\n" ); else - { - fprintf( outfile, "\taddl $%d, %%ebx\n", sizeof(STACK16FRAME)-size+4 ); - fprintf( outfile, "\tmovl %%ebx, 0(%%edi)\n" ); + fprintf( outfile, "\tmovl %%eax, 12(%%ebx)\n" ); - fprintf( outfile, "\tmovw %%ds, %%ax\n" ); - fprintf( outfile, "\tmovw %%ax, 4(%%edi)\n" ); - - fprintf( outfile, "\taddl $20, %%ebx\n" ); - fprintf( outfile, "\tmovw %%bx, 10(%%edi)\n" ); - - fprintf( outfile, "\tleal -8(%%esp), %%eax\n" ); - fprintf( outfile, "\tmovl %%eax, 12(%%edi)\n" ); - - fprintf( outfile, "\tmovw %%ss, %%ax\n" ); - fprintf( outfile, "\tandl $0x0000ffff, %%eax\n" ); - fprintf( outfile, "\tmovl %%eax, 16(%%edi)\n" ); - - if (!UsePIC) - fprintf( outfile, "\tmovl %s_RetAddr, %%eax\n", asm_name(name) ); - else - { - fprintf( outfile, "\tmovl %s_RetAddr@GOT(%%edx), %%eax\n", asm_name(name) ); - fprintf( outfile, "\tmovl (%%eax), %%eax\n" ); - } - fprintf( outfile, "\tmovl %%eax, 20(%%edi)\n" ); - } - /* Set up registers and call CBClient relay stub (simulating a far call) */ - fprintf( outfile, "\tmovl 16(%%ebp), %%esi\n" ); + fprintf( outfile, "\tmovl 20(%%ebp), %%esi\n" ); fprintf( outfile, "\tmovl (%%esi), %%esi\n" ); - fprintf( outfile, "\tmovl %%edi, %%ebx\n" ); fprintf( outfile, "\tmovl 8(%%ebp), %%eax\n" ); fprintf( outfile, "\tmovl 12(%%ebp), %%ebp\n" ); @@ -869,24 +692,10 @@ fprintf( outfile, "\tmovl 32(%%esp), %%edi\n" ); fprintf( outfile, "\tmovl %%esi, (%%edi)\n" ); - /* Cleanup temporary area (simulate STACK16_POP) */ - - fprintf( outfile, "\tpop %%esi\n" ); - - fprintf( outfile, "\tpushf\n" ); - fprintf( outfile, "\tstd\n" ); - fprintf( outfile, "\tdec %%esi\n" ); - fprintf( outfile, "\tleal %d(%%esi), %%edi\n", size ); - fprintf( outfile, "\tmovl $%d, %%ecx\n", sizeof(STACK16FRAME) ); - fprintf( outfile, "\trep\n\tmovsb\n" ); - fprintf( outfile, "\tpopf\n" ); - - fprintf( outfile, "\t.byte 0x64\n\taddw $%d,(%d)\n", size, STACKOFFSET ); - /* Return argument size to caller */ if ( isEx ) { - fprintf( outfile, "\tmovl 32(%%esp), %%ebx\n" ); + fprintf( outfile, "\tmovl 36(%%esp), %%ebx\n" ); fprintf( outfile, "\tmovl %%ebp, (%%ebx)\n" ); } @@ -897,18 +706,11 @@ fprintf( outfile, "\tpopl %%edi\n" ); fprintf( outfile, "\tpopl %%ebp\n" ); fprintf( outfile, "\tret\n" ); - function_footer( outfile, name ); -} + function_footer( outfile, isEx ? "CALL32_CBClientEx" : "CALL32_CBClient" ); -static void BuildCallTo32CBClientRet( FILE *outfile, BOOL isEx ) -{ - const char *name = isEx? "CALL32_CBClientEx_Ret" : "CALL32_CBClient_Ret"; - /* '16-bit' return stub */ - fprintf( outfile, "\n\t.globl %s\n", asm_name(name) ); - fprintf( outfile, "%s:\n", asm_name(name) ); - + function_header( outfile, isEx ? "CALL32_CBClientEx_Ret" : "CALL32_CBClient_Ret" ); if ( !isEx ) { fprintf( outfile, "\tmovzwl %%sp, %%ebx\n" ); @@ -922,12 +724,7 @@ fprintf( outfile, "\tlssl %%ss:-12(%%ebx), %%esp\n" ); } fprintf( outfile, "\tlret\n" ); - function_footer( outfile, name ); - - /* Declare the return address variable */ - - fprintf( outfile, "\n\t.globl %sAddr\n", asm_name(name) ); - fprintf( outfile, "%sAddr:\t.long 0\n", asm_name(name) ); + function_footer( outfile, isEx ? "CALL32_CBClientEx_Ret" : "CALL32_CBClient_Ret" ); } @@ -1102,13 +899,13 @@ /* Start cleanup. Restore fs register. */ - fprintf( outfile, ".globl %s\n", asm_name("DPMI_PendingEventCheck_Cleanup") ); + fprintf( outfile, "\t.globl %s\n", asm_name("DPMI_PendingEventCheck_Cleanup") ); fprintf( outfile, "%s:\n", asm_name("DPMI_PendingEventCheck_Cleanup") ); fprintf( outfile, "\tpopw %%fs\n" ); /* Return from function. */ - fprintf( outfile, ".globl %s\n", asm_name("DPMI_PendingEventCheck_Return") ); + fprintf( outfile, "\t.globl %s\n", asm_name("DPMI_PendingEventCheck_Return") ); fprintf( outfile, "%s:\n", asm_name("DPMI_PendingEventCheck_Return") ); fprintf( outfile, "\tiret\n" ); @@ -1136,9 +933,8 @@ fprintf( outfile, "%s:\n\n", asm_name("__wine_spec_thunk_text_16") ); - fprintf( outfile, "\t.globl %s\n", asm_name("Call16_Start") ); - fprintf( outfile, "%s:\n", asm_name("Call16_Start") ); - fprintf( outfile, "\t.byte 0\n\n" ); + fprintf( outfile, "\t.globl %s\n", asm_name("__wine_call16_start") ); + fprintf( outfile, "%s:\n", asm_name("__wine_call16_start") ); /* Standard CallFrom16 routine (WORD return) */ BuildCallFrom16Core( outfile, FALSE, FALSE, TRUE ); @@ -1158,38 +954,29 @@ /* Register CallTo16 routine */ BuildCallTo16Core( outfile, 1 ); + /* Standard CallTo16 return stub */ + BuildRet16Func( outfile ); + /* CBClientThunkSL routine */ BuildCallTo32CBClient( outfile, FALSE ); /* CBClientThunkSLEx routine */ BuildCallTo32CBClient( outfile, TRUE ); - fprintf( outfile, "\t.globl %s\n", asm_name("Call16_End") ); - fprintf( outfile, "%s:\n", asm_name("Call16_End") ); - function_footer( outfile, "__wine_spec_thunk_text_16" ); - - /* The whole Call16_Ret segment must lie within the .data section */ - fprintf( outfile, "\n\t.data\n" ); - fprintf( outfile, "%s:\n\n", asm_name("__wine_spec_thunk_data_16") ); - fprintf( outfile, "\t.globl %s\n", asm_name("Call16_Ret_Start") ); - fprintf( outfile, "%s:\n", asm_name("Call16_Ret_Start") ); - - /* Standard CallTo16 return stub */ - BuildRet16Func( outfile ); - - /* CBClientThunkSL return stub */ - BuildCallTo32CBClientRet( outfile, FALSE ); - - /* CBClientThunkSLEx return stub */ - BuildCallTo32CBClientRet( outfile, TRUE ); - /* Pending DPMI events check stub */ BuildPendingEventCheck( outfile ); - /* End of Call16_Ret segment */ - fprintf( outfile, "\n\t.globl %s\n", asm_name("Call16_Ret_End") ); - fprintf( outfile, "%s:\n", asm_name("Call16_Ret_End") ); - function_footer( outfile, "__wine_spec_thunk_data_16" ); + fprintf( outfile, "\t.globl %s\n", asm_name("__wine_call16_end") ); + fprintf( outfile, "%s:\n", asm_name("__wine_call16_end") ); + function_footer( outfile, "__wine_spec_thunk_text_16" ); + + /* Declare the return address and data selector variables */ + fprintf( outfile, "\n\t.data\n\t.align %d\n", get_alignment(4) ); + fprintf( outfile, "\t.globl %s\n", asm_name("CallTo16_DataSelector") ); + fprintf( outfile, "%s:\t.long 0\n", asm_name("CallTo16_DataSelector") ); + fprintf( outfile, "\t.globl %s\n", asm_name("CallTo16_TebSelector") ); + fprintf( outfile, "%s:\t.long 0\n", asm_name("CallTo16_TebSelector") ); + if (UsePIC) fprintf( outfile, "wine_ldt_copy_ptr:\t.long %s\n", asm_name("wine_ldt_copy") ); } /******************************************************************* _____ Modified: trunk/reactos/tools/winebuild/spec16.c --- trunk/reactos/tools/winebuild/spec16.c 2005-08-10 21:09:05 UTC (rev 17270) +++ trunk/reactos/tools/winebuild/spec16.c 2005-08-10 22:15:12 UTC (rev 17271) @@ -253,7 +253,7 @@ fprintf( outfile, "void" ); fprintf( outfile, " );\n" ); - fprintf( outfile, "static %s __stdcall __wine_%s_CallFrom16_%s( proc_%s_t proc, unsigned char *args%s )\n", + fprintf( outfile, "static %s __wine_%s_CallFrom16_%s( proc_%s_t proc, unsigned char *args%s )\n", ret_type, make_c_identifier(prefix), profile, profile, reg_func? ", void *context" : "" ); @@ -397,7 +397,7 @@ ORDDEF **type, **typelist; int i, nFuncs, nTypes; unsigned char *resdir_buffer, *resdata_buffer, *et_buffer, *data_buffer; - unsigned char string[256]; + char string[256]; unsigned int ne_offset, segtable_offset, impnames_offset; unsigned int entrypoint_size, callfrom_size; unsigned int code_size, code_offset; @@ -780,6 +780,7 @@ } arg_types[j / 10] |= type << (3 * (j % 10)); } + if (typelist[i]->type == TYPE_VARARGS) arg_types[j / 10] |= ARG_VARARG << (3 * (j % 10)); if (typelist[i]->flags & FLAG_REGISTER) arg_types[0] |= ARG_REGISTER; if (typelist[i]->flags & FLAG_RET16) arg_types[0] |= ARG_RET16; _____ Modified: trunk/reactos/tools/winebuild/spec32.c --- trunk/reactos/tools/winebuild/spec32.c 2005-08-10 21:09:05 UTC (rev 17270) +++ trunk/reactos/tools/winebuild/spec32.c 2005-08-10 22:15:12 UTC (rev 17271) @@ -267,12 +267,12 @@ fprintf( outfile, " \"__wine_spec_exp_ordinals:\\n\"\n" ); for (i = 0; i < spec->nb_names; i++) { - fprintf( outfile, " \"\\t" __ASM_SHORT " %d\\n\"\n", - spec->names[i]->ordinal - spec->base ); + fprintf( outfile, " \"\\t%s %d\\n\"\n", + get_asm_short_keyword(), spec->names[i]->ordinal - spec->base ); } if (spec->nb_names % 2) { - fprintf( outfile, " \"\\t" __ASM_SHORT " 0\\n\"\n" ); + fprintf( outfile, " \"\\t%s 0\\n\"\n", get_asm_short_keyword() ); } } @@ -285,14 +285,15 @@ { ORDDEF *odp = spec->ordinals[i]; if (odp && (odp->flags & FLAG_FORWARD)) - fprintf( outfile, " \"\\t" __ASM_STRING " \\\"%s\\\"\\n\"\n", odp->link_name ); + fprintf( outfile, " \"\\t%s \\\"%s\\\"\\n\"\n", get_asm_string_keyword(), odp->link_name ); } fprintf( outfile, " \"\\t.align %d\\n\"\n", get_alignment(4) ); } /* output relays */ - if (debugging) + /* we only support relay debugging on i386 */ + if (target_cpu == CPU_x86) { for (i = spec->base; i <= spec->limit; i++) { @@ -325,7 +326,7 @@ case TYPE_CDECL: fprintf( outfile, " \"\\tjmp %s\\n\"\n", asm_name(odp->link_name) ); fprintf( outfile, " \"\\tret\\n\"\n" ); - fprintf( outfile, " \"\\t" __ASM_SHORT " %d\\n\"\n", args ); + fprintf( outfile, " \"\\t%s %d\\n\"\n", get_asm_short_keyword(), args ); fprintf( outfile, " \"\\t.long %s,0x%08x\\n\"\n", asm_name(odp->link_name), mask ); break; default: _____ Modified: trunk/reactos/tools/winebuild/utils.c --- trunk/reactos/tools/winebuild/utils.c 2005-08-10 21:09:05 UTC (rev 17270) +++ trunk/reactos/tools/winebuild/utils.c 2005-08-10 22:15:12 UTC (rev 17271) @@ -387,26 +387,74 @@ const char *asm_name( const char *sym ) { static char buffer[256]; - sprintf( buffer, __ASM_NAME("%s"), sym ); - return buffer; + + switch (target_platform) + { + case PLATFORM_APPLE: + case PLATFORM_WINDOWS: + buffer[0] = '_'; + strcpy( buffer + 1, sym ); + return buffer; + default: + return sym; + } } /* return an assembly function declaration for a C function name */ const char *func_declaration( const char *func ) { static char buffer[256]; - sprintf( buffer, __ASM_FUNC("%s"), func ); + + switch (target_platform) + { + case PLATFORM_APPLE: + return ""; + case PLATFORM_WINDOWS: + sprintf( buffer, ".def _%s; .scl 2; .type 32; .endef", func ); + break; + case PLATFORM_SVR4: + sprintf( buffer, ".type %s,2", func ); + break; + default: + sprintf( buffer, ".type %s,@function", func ); + break; + } return buffer; } /* return a size declaration for an assembly function */ const char *func_size( const char *func ) { -#ifdef HAVE_ASM_DOT_SIZE static char buffer[256]; - sprintf( buffer, ".size " __ASM_NAME("%s") ", .-" __ASM_NAME("%s"), func, func ); - return buffer; -#else - return ""; -#endif + + switch (target_platform) + { + case PLATFORM_APPLE: + case PLATFORM_WINDOWS: + return ""; + default: + sprintf( buffer, ".size %s, .-%s", func, func ); + return buffer; + } } + +const char *get_asm_string_keyword(void) +{ + switch (target_platform) + { + case PLATFORM_APPLE: + case PLATFORM_SVR4: + return ".asciz"; + default: + return ".string"; + } +} + +const char *get_asm_short_keyword(void) +{ + switch (target_platform) + { + case PLATFORM_SVR4: return ".half"; + default: return ".short"; + } +} _____ Modified: trunk/reactos/tools/winebuild/winebuild.man.in --- trunk/reactos/tools/winebuild/winebuild.man.in 2005-08-10 21:09:05 UTC (rev 17270) +++ trunk/reactos/tools/winebuild/winebuild.man.in 2005-08-10 22:15:12 UTC (rev 17271) @@ -191,6 +191,11 @@ Optionally a major and minor subsystem version can also be specified; the default subsystem version is 4.0. .TP +.BI --target= cpu-manufacturer[-kernel]-os +Specify the target CPU and platform on which the generated code will +be built. The target specification is in the standard autoconf format +as returned by config.sub. +.TP .B \--version Display the program version and exit. .TP
19 years, 4 months
1
0
0
0
[ea] 17270: Minor change in two strings.
by ea@svn.reactos.com
Minor change in two strings. Modified: trunk/reactos/subsys/system/sm/En.rc Modified: trunk/reactos/subsys/system/sm/sm.rc _____ Modified: trunk/reactos/subsys/system/sm/En.rc --- trunk/reactos/subsys/system/sm/En.rc 2005-08-10 20:58:29 UTC (rev 17269) +++ trunk/reactos/subsys/system/sm/En.rc 2005-08-10 21:09:05 UTC (rev 17270) @@ -46,7 +46,7 @@ IDS_Not_Imp, "not implemented\n" -IDS_Mangers, "ReactOS/Win32 Session Manager Control Tool\n\n" +IDS_Mangers, "ReactOS/Win32 - Session Manager Control Tool\n\n" IDS_USING, "Usage:\n\ \tsm\n\ _____ Modified: trunk/reactos/subsys/system/sm/sm.rc --- trunk/reactos/subsys/system/sm/sm.rc 2005-08-10 20:58:29 UTC (rev 17269) +++ trunk/reactos/subsys/system/sm/sm.rc 2005-08-10 21:09:05 UTC (rev 17270) @@ -1,5 +1,5 @@ #include <windows.h> -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS/Win32 Session Manager Control Tool\0" +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS/Win32 - Session Manager Control Tool\0" #define REACTOS_STR_INTERNAL_NAME "sm\0" #define REACTOS_STR_ORIGINAL_FILENAME "sm.exe\0" #include <reactos/version.rc>
19 years, 4 months
1
0
0
0
[sedwards] 17269: enable building shell32_test. some header fixes
by sedwards@svn.reactos.com
enable building shell32_test. some header fixes Deleted: trunk/reactos/include/wine/shtypes.h Modified: trunk/reactos/regtests/winetests/directory.xml Modified: trunk/reactos/w32api/include/shellapi.h Modified: trunk/reactos/w32api/include/shlobj.h Modified: trunk/reactos/w32api/include/shtypes.h _____ Deleted: trunk/reactos/include/wine/shtypes.h --- trunk/reactos/include/wine/shtypes.h 2005-08-10 20:35:15 UTC (rev 17268) +++ trunk/reactos/include/wine/shtypes.h 2005-08-10 20:58:29 UTC (rev 17269) @@ -1,22 +0,0 @@ -#include <rpc.h> -#include <rpcndr.h> - -#include_next <shtypes.h> - -#ifndef __WIDL_SHTYPES_H -#define __WIDL_SHTYPES_H -#ifdef __cplusplus -extern "C" { -#endif -#include <wtypes.h> - -typedef enum tagSTRRET_TYPE { - STRRET_WSTR = 0, - STRRET_OFFSET = 1, - STRRET_CSTR = 2 -} STRRET_TYPE; - -#ifdef __cplusplus -} -#endif -#endif /* __WIDL_SHTYPES_H */ _____ Modified: trunk/reactos/regtests/winetests/directory.xml --- trunk/reactos/regtests/winetests/directory.xml 2005-08-10 20:35:15 UTC (rev 17268) +++ trunk/reactos/regtests/winetests/directory.xml 2005-08-10 20:58:29 UTC (rev 17269) @@ -23,6 +23,9 @@ <directory name="setupapi"> <xi:include href="setupapi/setupapi.xml" /> </directory> +<directory name="shell32"> + <xi:include href="shell32/shell32.xml" /> +</directory> <directory name="shlwapi"> <xi:include href="shlwapi/shlwapi.xml" /> </directory> _____ Modified: trunk/reactos/w32api/include/shellapi.h --- trunk/reactos/w32api/include/shellapi.h 2005-08-10 20:35:15 UTC (rev 17268) +++ trunk/reactos/w32api/include/shellapi.h 2005-08-10 20:58:29 UTC (rev 17269) @@ -29,6 +29,7 @@ #define SEE_MASK_UNICODE 0x10000 #define SEE_MASK_ASYNCOK 0x100000 #define SEE_MASK_HMONITOR 0x200000 +#define SEE_MASK_NOZONECHECKS 0x00800000 #define ABM_NEW 0 #define ABM_REMOVE 1 #define ABM_QUERYPOS 2 _____ Modified: trunk/reactos/w32api/include/shlobj.h --- trunk/reactos/w32api/include/shlobj.h 2005-08-10 20:35:15 UTC (rev 17268) +++ trunk/reactos/w32api/include/shlobj.h 2005-08-10 20:58:29 UTC (rev 17269) @@ -101,6 +101,7 @@ #define SFGAO_HASPROPSHEET 0x00000040L #define SFGAO_DROPTARGET 0x00000100L #define SFGAO_CAPABILITYMASK 0x00000177L +#define SFGAO_ISSLOW 0x00004000L #define SFGAO_GHOSTED 0x00008000L #define SFGAO_LINK 0x00010000L #define SFGAO_SHARE 0x00020000L @@ -143,63 +144,72 @@ #define REGSTR_PATH_EXPLORER TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer") #endif #define REGSTR_PATH_SPECIAL_FOLDERS REGSTR_PATH_EXPLORER TEXT("\\Shell Folders") -#define CSIDL_DESKTOP 0 -#define CSIDL_INTERNET 1 -#define CSIDL_PROGRAMS 2 -#define CSIDL_CONTROLS 3 -#define CSIDL_PRINTERS 4 -#define CSIDL_PERSONAL 5 -#define CSIDL_FAVORITES 6 -#define CSIDL_STARTUP 7 -#define CSIDL_RECENT 8 -#define CSIDL_SENDTO 9 -#define CSIDL_BITBUCKET 10 -#define CSIDL_STARTMENU 11 -#define CSIDL_DESKTOPDIRECTORY 16 -#define CSIDL_DRIVES 17 -#define CSIDL_NETWORK 18 -#define CSIDL_NETHOOD 19 -#define CSIDL_FONTS 20 -#define CSIDL_TEMPLATES 21 -#define CSIDL_COMMON_STARTMENU 22 -#define CSIDL_COMMON_PROGRAMS 23 -#define CSIDL_COMMON_STARTUP 24 -#define CSIDL_COMMON_DESKTOPDIRECTORY 25 -#define CSIDL_APPDATA 26 -#define CSIDL_PRINTHOOD 27 -#define CSIDL_LOCAL_APPDATA 28 -#define CSIDL_ALTSTARTUP 29 -#define CSIDL_COMMON_ALTSTARTUP 30 -#define CSIDL_COMMON_FAVORITES 31 -#define CSIDL_INTERNET_CACHE 32 -#define CSIDL_COOKIES 33 -#define CSIDL_HISTORY 34 -#define CSIDL_COMMON_APPDATA 35 -#define CSIDL_WINDOWS 36 -#define CSIDL_SYSTEM 37 -#define CSIDL_PROGRAM_FILES 38 -#define CSIDL_MYPICTURES 39 -#define CSIDL_PROFILE 40 -#define CSIDL_SYSTEMX86 41 -#define CSIDL_PROGRAM_FILESX86 42 -#define CSIDL_PROGRAM_FILES_COMMON 43 -#define CSIDL_PROGRAM_FILES_COMMONX86 44 -#define CSIDL_COMMON_TEMPLATES 45 -#define CSIDL_COMMON_DOCUMENTS 46 -#define CSIDL_COMMON_ADMINTOOLS 47 -#define CSIDL_ADMINTOOLS 48 -#define CSIDL_CONNECTIONS 49 -#define CSIDL_COMMON_MUSIC 53 -#define CSIDL_COMMON_PICTURES 54 -#define CSIDL_COMMON_VIDEO 55 -#define CSIDL_RESOURCES 56 -#define CSIDL_RESOURCES_LOCALIZED 57 -#define CSIDL_COMMON_OEM_LINKS 58 -#define CSIDL_CDBURN_AREA 59 -#define CSIDL_COMPUTERSNEARME 61 + +#define CSIDL_DESKTOP 0x0000 +#define CSIDL_INTERNET 0x0001 +#define CSIDL_PROGRAMS 0x0002 +#define CSIDL_CONTROLS 0x0003 +#define CSIDL_PRINTERS 0x0004 +#define CSIDL_PERSONAL 0x0005 +#define CSIDL_FAVORITES 0x0006 +#define CSIDL_STARTUP 0x0007 +#define CSIDL_RECENT 0x0008 +#define CSIDL_SENDTO 0x0009 +#define CSIDL_BITBUCKET 0x000a +#define CSIDL_STARTMENU 0x000b +#define CSIDL_MYDOCUMENTS 0x000c +#define CSIDL_MYMUSIC 0x000d +#define CSIDL_MYVIDEO 0x000e +#define CSIDL_DESKTOPDIRECTORY 0x0010 +#define CSIDL_DRIVES 0x0011 +#define CSIDL_NETWORK 0x0012 +#define CSIDL_NETHOOD 0x0013 +#define CSIDL_FONTS 0x0014 +#define CSIDL_TEMPLATES 0x0015 +#define CSIDL_COMMON_STARTMENU 0x0016 +#define CSIDL_COMMON_PROGRAMS 0X0017 +#define CSIDL_COMMON_STARTUP 0x0018 +#define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019 +#define CSIDL_APPDATA 0x001a +#define CSIDL_PRINTHOOD 0x001b +#define CSIDL_LOCAL_APPDATA 0x001c +#define CSIDL_ALTSTARTUP 0x001d +#define CSIDL_COMMON_ALTSTARTUP 0x001e +#define CSIDL_COMMON_FAVORITES 0x001f +#define CSIDL_INTERNET_CACHE 0x0020 +#define CSIDL_COOKIES 0x0021 +#define CSIDL_HISTORY 0x0022 +#define CSIDL_COMMON_APPDATA 0x0023 +#define CSIDL_WINDOWS 0x0024 +#define CSIDL_SYSTEM 0x0025 +#define CSIDL_PROGRAM_FILES 0x0026 +#define CSIDL_MYPICTURES 0x0027 +#define CSIDL_PROFILE 0x0028 +#define CSIDL_SYSTEMX86 0x0029 +#define CSIDL_PROGRAM_FILESX86 0x002a +#define CSIDL_PROGRAM_FILES_COMMON 0x002b +#define CSIDL_PROGRAM_FILES_COMMONX86 0x002c +#define CSIDL_COMMON_TEMPLATES 0x002d +#define CSIDL_COMMON_DOCUMENTS 0x002e +#define CSIDL_COMMON_ADMINTOOLS 0x002f +#define CSIDL_ADMINTOOLS 0x0030 +#define CSIDL_CONNECTIONS 0x0031 +#define CSIDL_COMMON_MUSIC 0x0035 +#define CSIDL_COMMON_PICTURES 0x0036 +#define CSIDL_COMMON_VIDEO 0x0037 +#define CSIDL_RESOURCES 0x0038 +#define CSIDL_RESOURCES_LOCALIZED 0x0039 +#define CSIDL_COMMON_OEM_LINKS 0x003a +#define CSIDL_CDBURN_AREA 0x003b +#define CSIDL_COMPUTERSNEARME 0x003d +#define CSIDL_PROFILES 0x003e +#define CSIDL_FOLDER_MASK 0x00ff +#define CSIDL_FLAG_PER_USER_INIT 0x0800 +#define CSIDL_FLAG_NO_ALIAS 0x1000 #define CSIDL_FLAG_DONT_VERIFY 0x4000 #define CSIDL_FLAG_CREATE 0x8000 -#define CSIDL_FLAG_MASK 0xFF00 +#define CSIDL_FLAG_MASK 0xff00 + #define CFSTR_SHELLIDLIST TEXT("Shell IDList Array") #define CFSTR_SHELLIDLISTOFFSET TEXT("Shell Object Offsets") #define CFSTR_NETRESOURCES TEXT("Net Resource") @@ -507,8 +517,9 @@ SLR_INVOKE_MSI=128 } SLR_FLAGS; typedef enum { - SLGP_SHORTPATH=1, - SLGP_UNCPRIORITY + SLGP_SHORTPATH=0x1, + SLGP_UNCPRIORITY=0x2, + SLGP_RAWPATH=0x4 } SLGP_FLAGS; typedef PBYTE LPVIEWSETTINGS; typedef enum { _____ Modified: trunk/reactos/w32api/include/shtypes.h --- trunk/reactos/w32api/include/shtypes.h 2005-08-10 20:35:15 UTC (rev 17268) +++ trunk/reactos/w32api/include/shtypes.h 2005-08-10 20:58:29 UTC (rev 17269) @@ -33,6 +33,12 @@ STRRET str; } SHELLDETAILS, *LPSHELLDETAILS; +typedef enum tagSTRRET_TYPE { + STRRET_WSTR = 0, + STRRET_OFFSET = 1, + STRRET_CSTR = 2 +} STRRET_TYPE; + #pragma pack(pop) #ifdef __cplusplus }
19 years, 4 months
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
67
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
66
67
Results per page:
10
25
50
100
200