10:06:05: Can't create registry key 'HKCR\.cbp' (error 5: access denied)
10:06:05: Can't open registry key 'HKCR\.cbp' (error 2: file not found)
10:06:05: Can't set value of 'HKCR\.cbp' (error 2: file not found)
Code10:06:05: Can't create registry key 'HKCR\.cbp' (error 5: access denied)
10:06:05: Can't open registry key 'HKCR\.cbp' (error 2: file not found)
10:06:05: Can't set value of 'HKCR\.cbp' (error 2: file not found)
1) who added the DDE stuff to the associations.cpp -> as mentioned in another post, this is "probably" NOT needed, the command entry is sufficient, and this is the cause of the "double click on a cbp file" bug.
would you be so kind and add SHFolder(before Shell32) to the link libraries of the sdk target for your builds - then Codeblocks could be used on W98 again.Yiannis, is this something that always can be added ? Or does it create conflicts on the non win98 builds ? If it can always be added, then we have a build that also works for win98/95, otherwise we need a special build/target for those 2 platforms.
Do you think we really need it Yiannis, that DDE ? I checked some other software (adobe, firefox, skype, ..), they all seem to stick to just the command stuff.If you have a solution that can do without DDE then please step forward.
I can manually start several Firefox'es by clicking on the program icon of firefox. So it's not that only one instance can exist. Wonder how they do that ?I don't know what firefox uses, but creating a named mutex is another common technique to allow only one running instance.
Have done some searching in the meantime.
At my system : .html --> FireFoxHtml -> only command
When I click several .html files in explorer thay all open up in the same firefox (in sereperate tabs).
I can manually start several Firefox'es by clicking on the program icon of firefox. So it's not that only one instance can exist. Wonder how they do that ? Any experts around here ?
I can manually start several Firefox'es by clicking on the program icon of firefox. So it's not that only one instance can exist. Wonder how they do that ?I don't know what firefox uses, but creating a named mutex is another common technique to allow only one running instance.
I don't know what firefox uses, but creating a named mutex is another common technique to allow only one running instance.This is exactly what Code::Blocks does (wxSingleInstanceChecker does just that).
The problem with multiple instances is that we need a bulletproof way to hand the commandline from a new instance to the already running instance.I didn't expected this post to turn in such a big discussion, but I understand the problem by now. I would like to add the following: Some time ago I had a similar problem: Inform another instance of an application and be cross-platform (at least win/linux) compatible. I solved it by using the settings file. I put a flag "another_instance" and an address to post messages to into the settings file on startup. On application exit both are reset to zero. Thus another instance first checks the "another_instance" flag and sends a message to the address (shared memory in that case) if appropriate. Of course there are unresolved issues as well: If the application crashes the "another_instance" is not reset and things. Also, the main application was required to cyclic check the shared memory (which was OK for my purpose anyway). However: That time it was the "simplest" way I could think of and the application had only "tool-character"...
DDE is a fat, clumsy pig (like most MS technologies), [...]Right, :lol: :lol: :lol:.
I solved it by using the settings file. I put a flag "another_instance" and an address to post messages to into the settings file on startup.This is almost certain to fail one day. It might appear to work for a while, but one day, it will fail. And the bad thing is when it happens, you will not know why, because you forgot about it a long time ago...
This is almost certain to fail one day. [...]True, but it works in a multi-user/multi-OS environment... :wink: But honestly: I agree (as I said). I've added this post because it might be the source for another (better) idea... just collecting ideas and it's pros/cons here...
The problem with multiple instances is that we need a bulletproof way to hand the commandline from a new instance to the already running instance. Unluckily, this is not precisely trivial to implement cross-platform.When I start firefox with the option -url "my.html" or firefox -url "www.codeblocks.org" it also hands it over to the already running instance. But maybe there's different code for that according to the operating system. So not portable then. (maybe for us : ifdef wxWIN, have seen it in other cb sources also).
except for the occasional "cannot find file" error.Thomas, you're lucky, at my system it is NOT occasional, it's always. :-(
...i had this too and posted a procedure how to get rid of already ...Quoteexcept for the occasional "cannot find file" error.... at my system it is NOT occasional, it's always...
I remember seeing that "Couldn't find file" message sometimes and solved it by adding double quotes around the %1 in the registry. Dunno if it's the same problem you're discussing and that solution will do in your case.Hmm... mine already has double quotes...
i had this too and posted a procedure how to get rid of already ...That gets rid of the error message, but it defeats DDE. At least for me, DDE does not work at all without the reg keys.
it's a workaround until someone (you) could fix this bug :lol:i had this too and posted a procedure how to get rid of already ...That gets rid of the error message, but it defeats DDE. At least for me, DDE does not work at all without the reg keys.
ifexec. Set the default value of this subkey to the DDE command to be used if DDE conversation cannot be initiated. When initiation fails, the application specified by the default value of the verb's command subkey is launched (SO IS IT THIS ???????). If an ifexec key exists, its default value will then be used as the DDE command. If there is no ifexec subkey, the default value of the ddeexec key is used again as the DDE command(OR IS IT THIS ?????).
... continueing my search ...it also depends, if you have the DDE server in CB enabled or not