Aeolis Posted March 9, 2015 Share Posted March 9, 2015 Hello folks, I have done some search around the forum and could not find a clue for this question. So, I kind ask you to point me, if possible, the right direction so I can solve this question. I want to know if it's possible that when a second instance of the process A is run it's able to open a child process under the first instance of the process A. In other words, I would like to know if it is possible to transfer the children processes from a process A' (second instance of process A) to a process A (first instance of process A)? Point A: |->Process A.exe (first instance) |----->Child1.exe |----->Child2.exe |----->Child3.exe Point B: |->Process A.exe (second instance) - finds out that there is another instance running and instead of running a Child4.exe under himself it forces Child4.exe into Process A.exe (first instance) and exits. This way Process A.exe (first instance) would be like Point C. Point C: |->Process A.exe (first instance) |----->Child1.exe |----->Child2.exe |----->Child3.exe |----->Child4.exe Thank you for your attention. Best regards, Aeolis Link to comment Share on other sites More sharing options...
orbs Posted March 10, 2015 Share Posted March 10, 2015 if you really insist, have a look at: _WinAPI_SetParent but it may be better to understand why you prefer this behaviour, and consider if there are alternative methods to achieve the same goal? Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
TheSaint Posted March 10, 2015 Share Posted March 10, 2015 Like orbs, I think it better for you describe things in real world terms, rather than elusive to understanding method you have used. For instance, what is Process A, and what is it doing? What are child 1 etc and what do they do? Some code would be extremely helpful too, as we tend to be hands on here, and help you to help yourself. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now