Always call the win32 process callout from PsConvertToGuiThread and handle the case where we alrady have an allocated win32 process there. (The original win32k sometimes allocates a win32 process, but doesn't initialize it, so it needs to be called again to do so)
svn path=/trunk/; revision=61072
- call ShellDDEInit, FileIconInit and WinList_Init while initializing
- Calling ShellDDEInit fixes cases like pressing Explore in a folder context menu from a file open dialog (before this it just hanged)
- We also need to call FileIconInit in order to initialize the shell icons properly. Before this Shell_GetImageLists called FileIconInit in case it was not called
- Calling WinList_Init should make CLSID_ShellWindows work but it fails for now. CLSID_ShellWindows is needed in cases like opening a second time My computer from desktop should activates the existing My computer window and it is also needed for SHOpenFolderAndSelectItems in order to work
svn path=/trunk/; revision=61064
Properly implement MmGetSessionById, MmAttachSession, MmDetachSession and MmQuitNextSession. Implement more session cleanup code and make sure a session is not killed while a process is attached to it. There used to be a bug, where removing a process from the session list caused pool corruption, which was because we called MiSessionRemoveProcess twice: once from PspExitThread, when the last thread exited and another time from PspDeleteProcess, when the reaper thread deleted the process object. This was, because the flag that said the process was in a session was not cleared properly. This is now fixed and inserting and removing processes into the session's list works fine. Also protect it properly with a spinlock.
svn path=/trunk/; revision=61061
Keyboard layout files have special requirements to the section layout of the dell. That is because MS win32k devs didn't write proper code and that is why the original win32k first parses all sections, looks for the .data section, checks if everything is valid and then truncates a pointer in a table to 16 bit and uses this as an offset into the section. Of course that does ONLY work, if the section is the first section AND that pointer happens to be less than 64k off from the start of the section AND the image base is 64k aligned. To achieve this, add a new module type kbdlayout that does all the neccessary things. On MSVC we merge the sections with a linker command, on GCC we use a custom linker script.
svn path=/trunk/; revision=61053
Implement ExpWin32SessionCallout, which attaches to the session that the object (desktop or window station) belongs to before invoking any callbacks. The session side of support for this is currently hardcoded to support only a single session. To make this properly work, all callbacks that go through this function have the same function pointer type now, fix this in win32k accordingly.
svn path=/trunk/; revision=61052
Implement RtlpCloseHandleCallback, closing the handle table, and use it as callback for ExSweepHandleTable in RtlpDestroyAtomHandleTable. Without a callback ExSweepHandleTable simply crashes, so obviously we never clean up any atom tables, possibly because the window station is never closed.
svn path=/trunk/; revision=61039
Implement ObSetHandleAttributes. Rename the ObIsKernelHandle macro to ObpIsKernelHandle to avoid ambiguities (ObIsKernelHandle is a public Vista+ API). Check for NtCurrentProcess and NtCurrentThread in ObpIsKernelHandle, since those are always non-kernel handles.
svn path=/trunk/; revision=61037
LogfInitializeExisting: Do not try to write to a file that has been opened as a backup file. It has been opened read-only.
svn path=/trunk/; revision=61026
Rewrite the code for generating def files. Remove useless switches. Seperate code for GCC and MSVC for easier maintainability. Make use of the new dlltool feature implemented by Kai Tietz, that allows to specify the name of an import/export. It is now possible to both export stdcall and fastcall decorated symbols as well as import from them.
svn path=/trunk/; revision=61024
- fixes vmware audio driver hangs
- needs more work
- patch by David Quintana
CORE-7488 #resolve #comment thanks for the patch
svn path=/trunk/; revision=61017
[VIDEOPRT] Implement some registry support routines to create new style (XP+) registry keys. Handle IOCTL_VIDEO_INIT_WIN32K_CALLBACKS in videoprt, reorganize the code to dispatch ioctls. Simplify failure path in IntVideoPortFindAdapter
svn path=/trunk/; revision=61013
Add all function stubs. (win32k from windows 2k3 is nasty and indexes the function table directly instead of looking up the entries...)
svn path=/trunk/; revision=61012
Fix RtlWriteRegistryValue, it closed the handle passed to it instead of checking for RTL_REGISTRY_HANDLE flag.
[NTOSKRNL]
Fix PnpRootCreateDevice, which was relying on the broken RtlWriteRegistryValue by aborting, when it *succeeded* to create a registry key, instead of when it failed.
Also use kernel handles and ObCloseHandle.
svn path=/trunk/; revision=61011