1. it is hacked, this small hack need be rewriten later.
But lest we got back same compatible we had with our ddraw.dll
in windows.
svn path=/trunk/; revision=23246
it will save us the time to write same code twice. and it is extream
easy to adding HEL api. U can look at ddk and sdk how Dd* api works
and write then proper HEL for it.
1. I have break the HEL version of set display for we need it follow DdSetMode
and no code have been rewriten for it yet.
svn path=/trunk/; revision=23245
- Implemented a bit more security calls in PspCreateProcess as seen in WI II. We now create an AccessState.
- Also write the PID in the ObjectTable.
svn path=/trunk/; revision=23236
- Implement PspWriteTebImpersonationInfo for setting the impersonation locale and impersonation status in the TEB (since User-mode needs to read this value and we don't want to NtQueryInformationThread for it each time to read the ETHERAD flag).
- Complete the implementation of PspSetPrimaryToken to recalculate a process's access rights to itself based on a new primary token.
- Reorganize ps.h header like ob.h and io.h, implement Tracing support but not the tracing itself yet.
- Get rid of some deprecated cruft.
svn path=/trunk/; revision=23233
- Added Process and Thread locking inlined functions for Ps Security functions.
- Thread safety is your friend! Huge rework of almost all the functions in ps/security.c to use the process/thread pushlocks and use interlocked operations when dealing with the ActiveImpersonationInfo thread flag.
- Added PAGED_CODE().
- Added checks for Processes with Jobs for the day that will happen.
- PsAssignImpersoonationToken with a NULL token handle means simply to revert to self.
- Don't ignore the HandleAttributes in NtOpenProcessTokenEx.
- Use SeTokenType to make sure the token passed is an impersonation token.
- Remove some fixed bugs in krnlfun.c, add more TODOs.
svn path=/trunk/; revision=23231
- PspAssignPrimaryToken was good enough for actually *assigning* the token, but when NtSetInfoProcess is called with ProcessPrimaryToken, we want to do a lot more then just randomly assigning it. Added PspSetPrimaryToken which first verifies if the token being assigned is a child token and if not, checks for SeAssignPrimaryTokenPrivilege. Also added a fixme for more code that's needed, to actually re-calculate the process's granted access towards itself. Also added thread-safety.
svn path=/trunk/; revision=23226
-Win32k and User32
- Menu.c: Made set menu items selective masking. Setting masks fixed the garbage going into the item structure. Now right justify menu bar works. There are some more cosmetic issues left to do. I have those ready next week or so. Running wine menu test fail due to exception in kernel32 IsBadStringPtrA&W isbad.c. Funny? Does PSEH work in user mode? The string test is needed. Misc fixed, some restructuring and Wine ports. Please let me know if it breaks something.
svn path=/trunk/; revision=23221
- Implement NtSuspend/ResumeProcess with PsSuspend/ResumeProcess.
- Improve the previous code to use rundown protection and be thread-safe.
svn path=/trunk/; revision=23198
- Remove a bunch of deprecated crap from ps.h
- Get rid of PsLockProcess, PsUnlockProcess. Use the process pushlock instead.
- When assigning the job, only acquiring rundown protection is enough.
- Use interlocked intrinsics for setting the ExceptionPort instead of locking the entire process object.
- Disable locking in ProcessSessionInformation for NtSetInformationProcess. The whole API seems wrong anyway, on my XP machine calling it does not change the session or change any token data. To verify later...
svn path=/trunk/; revision=23197
The graphics, mouse and keyboard are virtually done. Mouse wheel works. Still some bugs in the handling of binary raster operation codes, but less than before. Fixed polyline. Fixed all cursor issues. Fully supports text output. Fixed a resource leak where all clipping region were slowly leaked. Now closes cleanly on server disconnect
Moving on to more fun things!
Many thanks to filip & WaxDragon for the code of the previous Win32 port, it was misleading at times but very useful overall!
svn path=/trunk/; revision=23196
[AUDIT]
- Most of the functions are documented at length in Windows Internals II and at a more high-level fashion in Windows Internals 4 and were based on that information. Undocumented routines were based of the operations done in the documented ones (for example, freeing buffers that we know were allocated, etc).
svn path=/trunk/; revision=23195
- Change FAST_MUTEX PsActiveProcessMutex to KGUARDED_MUTEX.
- Define PS Flags and use them, isntead of magic numbers. (For magic mushrooms, you'll have to wait a while, these aren't implemented yet).
svn path=/trunk/; revision=23194