I tried to port the fork API in Linux to Windows (Windows 7 and Windows 8) using the native API RtlCloneUserProcess as discussed in the following link.
With the RtlCloneUserProcess function, child process is created, but didn’t get the console handle, stdin, stdout etc. The solution is to inform the CSR /win32 subsystem about the new process. But I could not able to do that. Please help me to re link the child process to the CSR.
In the link it is given that “For the console, you do need to re-establish a link to csrss, but the setup is only done in ntdll if the CsrPort handle is NULL. This isn't the case in the forked process which of course, has the parent processes handle value. Nowhere in ntdll sets it to back to NULL so there's no chance of getting that to work unless you d/l the ntdll symbols, find where the handle is, and NULL it out yourself.”
Also on further analysis on the CRS, it is understood that CSRSS is responsible for Win32 console handling. The link, http://translate.google.co.in/translate?hl=en&sl=ru&u=http://www.wasm.ru/forum/viewtopic.php%3Fid%3D42246&prev=/search%3Fq%3DCsrClientCallServer%26hl%3Den%26tbo%3Dd%26biw%3D991%26bih%3D598&sa=X&ei=e17FUNP7NMrtrQeA7IFo&ved=0CGAQ7gEwBg , gave some idea to manually notify the CSR about the new process, but I could not able to do that in windows 7.
The CsrClientCallServer function returns a negative value and the data buffer to the api CsrClientCallServer got corrupted after the call.
How can an item be added to context menu that pops up when highlighting a part of text in any program and right clicking ? And a code should be associated with that which processes the piece of text highlighted. The item should be added to every programs context menu when text can be selected;ex Internet Explorer , Firefox , notepad, etc...
I have some general methods in my mind from my studies revolving around windows internals. But no specifics.
What is the best way to do it ? can this be done by writing code in kernel mode ? how ? is it necessary ? what are other methods which involve user mode programming ?
You cannot add items to every context menu on the system; not all of them are dynamic. You can add to Windows Explorer and (probably) IE by writing extensions or via other published interfaces. Try a Google search for samples and articles on the subjects.
One of these days I'm going to think of a really clever signature.
You cannot add items to every context menu on the system
Even by coding in assembly level ?
Can a program be written that when it runs overrides the default belavior of the system ? When selecting and right clicking any piece of text , our custom context menu appears in place of the default ? I mean overriding this behavior on the system-wide level.No matter in IE or any other programs as long as a text selection is concerned.
Last Visit: 31-Dec-99 18:00 Last Update: 28-Oct-16 9:44