and in some cases, return an adequate value. In some places however, I add an ASSERT(FALSE); before keeping the while (TRUE); in critical regions.
(Only x86, as well as in r58110). More ASSERTS (in debug mode) or BSODs may appear, instead of having hung threads.
Part 1-bis/2
svn path=/trunk/; revision=58111
Implement DC_hSelectFont, use it from NtGdiSelectFont and GdiFlushUserBatch. Make sure plfnt is != NULL before dereferencing it in "TEXTOBJ_LockText"
svn path=/trunk/; revision=58109
- Start to implement NtUserConsoleControl to allow the console server define Console Window Class atom.
- In UserInitialize, initialize the current thread by a call to UserCreateThreadInfo.
- In UserCreateThreadInfo, set the TIF_CSRSSTHREAD flag for threads created by CSRSS.
- In NtUserQueryWindow, when querying the process/thread ID associated to a given window, check whether the window was created by CSRSS and if so, if this is a Console window, get the process/thread ID of the associated console process (console leader process), instead of the CID of CSRSS.
[CONSRV]
- Introduce the concept of console leader process (to be used as the process owning the console window).
- Introduce extra console window information to store the PID and TID of the console leader process via new internal flags to be used by GetWindowLong.
- Effectively set the console window console leader CID at its creation.
- Improve CsrInitConsole to set a console leader process to the console being created.
This fixes http://jira.reactos.org/browse/CORE-122 in this branch.
[CONSRV-WIN32K]
Fix various code misspellings.
svn path=/branches/ros-csrss/; revision=58107
Remove a temporary DPRINT1.
[CSRSRV]
- Shut down debug output.
- Fix some misspellings.
- Fix a bug in CsrMoveSatisfiedWaits ("satisfied" waits are waits where WaitFunction was put to NULL during a previous call to CsrNotifyWait, but still not dereferenced, and which can be dereferenced by a call to CsrDereferenceWait).
svn path=/branches/ros-csrss/; revision=58103
- Fix console apps initialization.
- Add some debug output (NOTE TO MYSELF: remove them when all things work).
- Rewrite ConsoleNewProcess.
- Reorganize SrvAllocConsole and create ConsoleConnect based on SrvAllocConsole.
- Create ConsoleDisconnect which undoes what ConsoleConnect and ConsoleNewProcess did.
- Rework a little bit CsrInitConsole.
Now the console app. initialization algorithm is the following:
1- A process is created, its type (GUI or CUI) is determined (kernel32 and basesrv).
2- ConsoleNewProcess is called (consrv) and makes this new process inherit the console handles table from its parent
(NOTE: this is done for all CUI processes, because at this point, we still don't know whether we must inherit
the handles from the parent or not).
3- (back in kernel32) In BasepInitConsole, we determine whether or not we must create a new console window or use
the parent's one or not using one at all. We (as a client) connect to the console server (consrv) (via CsrClientConnectToServer)
which in turn (via CSRSS mechanism) calls ConsoleConnect. For GUI processes we do nothing. For CUI processes, we initialize
a new console based on properties set in BasepInitConsole.
4- When a process dies, ConsoleDisconnect is called and whether it is a GUI or CUI process, we revert the actions done previously.
Part 2/2
TODO: - Debug the CSR waits.
- Work on the console properties property-sheet.
- See what can be done on http://jira.reactos.org/browse/CORE-122
svn path=/branches/ros-csrss/; revision=58098
- Fix console apps initialization.
- Introduce a helper function InitConsoleCtrlHandling for initializing console control handling.
- We now initialize the new created console when connecting the client (kernel32) to the server (consrv) by calling CsrClientConnectToServer with real parameters (not dummy ones).
- Add/activate some debug prints (will be removed when all things work).
Part 1/2
svn path=/branches/ros-csrss/; revision=58096
SamrGetAliasMembership:
- Change requrred access right from DOMIN_LOOKUP to DOMAIN_GET_ALIAS_MEMBERSHIP.
- Handle the case properly where a user is not a member of any alias.
- Retrieve an alias members RID correctly.
svn path=/trunk/; revision=58094
Fix untitled Run dialog in some languages. I wonder why it was as it since ages, in some languages but not in anothers.
svn path=/trunk/; revision=58092
- Revert lstrcpynW --> wcsncpy changes from r57471 back to lstrcpynW because this function automatically NULL-terminate strings
(but I wonder if there is a replacement of lstrcpynW which has all its functionalities, in the CRT). This fixes address loading
after editing it in the address bar. Caught by Edijus ;)
- Unicodize a little bit more regedit.
svn path=/trunk/; revision=58090
- In NtGdiGetRandomRgn use the region pointers directly, instead of getting their handles. These regions might not even have a handle.
- Fix last error code
svn path=/trunk/; revision=58089
- Use REG_OPTION_NON_VOLATILE instead of 0 in RegCreateKeyEx.
- Do not rename keys when they have the same name, case-insensitive (as Windows does), fix for r58079 / CORE-6205.
svn path=/trunk/; revision=58087
Exchange fields individually in PDEVOBJ_vSwitchPdev() instead of duplicating a full PDEV structure on the stack. This saves a lot of stack space.
svn path=/trunk/; revision=58081
- Check if the new name equals the old name. In that case don't rename key.
- Fixes regedit accidentaly deleting keys when a key is clicked and the rename field appears
CORE-6205 #resolve #comment finally regedit is usable
svn path=/trunk/; revision=58079
- Add some annotations
- Fix some 64bit issues
- Fix a typo
- reduce ENUM_RECT_LIMIT to 32, which is more than enough and doesn't waste as much stack space
- remove some unused macros
svn path=/trunk/; revision=58076
- Be sure that we reply to the dying client when he dies.
- "Improve" a debug output (display the client process).
- Use existing helper functions for incrementing reference counts for threads and processes.
svn path=/branches/ros-csrss/; revision=58075
Do NOT confuse a handle and a pointer to a handle !! In this case we need a handle.
Caught in the following situation :
1- Launch a process A which initializes a console A (say, cmd.exe).
2- Launch a process B which also initializes a console B (for instance, in the first cmd.exe, do: start cmd.exe)
3- Click on the "Close" button (the "Cross" button in the right upper side) of the windows of the console A.
4- Notice that the console B closes but the process B remains alive, whereas the console A remains open but the process A is killed...
(contrary to what you expected, closing the console A and the process A)
(when clicking on the "Close" button, the Console Server launches a remote thread in the context of the target process, and it appeared in the described situation
that it was the wrong process, because of bad parameter passing to the sub-function CsrLockProcessByClientId called when creating the remote thread).
svn path=/branches/ros-csrss/; revision=58073
- Enable the call to NetUserAdd.
This enables us to create new user accounts. A lot of stuff is still missing, so don't be surprised if something unexpected happens. It will be fixed soon.
Happy new Year!
svn path=/trunk/; revision=58072
Pass a PUNICODE_STRING instead of a LPWSTR (and unused BufferSize) to FindMatchingCreateItem(), make use of the Length parameter instead of trusting on NULL termination when searching for path separators.
svn path=/trunk/; revision=58065
I replaced by error the mask 0x10000003 by 0x3, which had as an effect to match handles of value 0xffffffff (invalid_handle_value). Fichtre !
svn path=/branches/ros-csrss/; revision=58064
- Code reorganization.
- In particular, move IsConsoleHandle macro to a place which it can be used by both kernel32 and consrv.
svn path=/branches/ros-csrss/; revision=58063