User forums > General (but related to Code::Blocks)
Multiple Instances
grv575:
OK first try to clear out all references to file types.
delete HLCR\*.h,*.c,*.cpp
delete HKLM\software\classes\*.h,*.c,*.cpp
then delete all stuff in folder options->file types that remain
Click on a .cpp or .c in explorer and open with codeblocks, allow it to set itself as the default for these types (I got a messagebox asking).
Now the way the DDE server works is this: *THE LAST* codeblocks that was opened (if you are using multiple CB instances) get registered as the DDE server. So you have to be consistent. Either always use windows explorer to open files in CB and don't start another instance if you plan on opening the same already open files using explorer.
See the problem is that you can open a couple cpp or c files. It launches a CB instance. Then you launch another CB instance, working on something else. Now this new instance get the DDE server and if you try to open again files that are open in the first instance using windows explorer, then they will open in the second instance as well (since it now has the DDE server).
A fix for this behavior, hopefully giving better results, would be to change the single instance code. 1) always use a mutex to check for existing running CB instances (even if they unchecked the checkbox to disable multiple instances). 2) If the user allows multiple instances in the settings, then allow another CB to start _BUT_ do not startup the DDE plugin again. Let the first CB instance always get be in charge of opening files from explorer. Then you won't run into the problems above.
thomas:
--- Quote from: grv575 on September 15, 2005, 11:30:26 pm ---delete HLCR\*.h,*.c,*.cpp
delete HKLM\software\classes\*.h,*.c,*.cpp
then delete all stuff in folder options->file types that remain
Click on a .cpp or .c in explorer and open with codeblocks, allow it to set itself as the default for these types (I got a messagebox asking).
--- End quote ---
Did all that with the same result again.
thomas:
What about using ptypes (http://www.melikyan.com/ptypes/index.html)?
It is zblib licensed and offers cross-platform named pipes: http://www.melikyan.com/ptypes/doc/streams.namedpipe.html
A named pipe should work just fine, and it needs no obscure server processes. :)
Navigation
[0] Message Index
[*] Previous page
Go to full version