Page 1 of 1

Code request!

Posted: Wed Apr 29, 2009 6:16 pm
by srod
Hi,

anyone got any code lying around for associating a default program with a file extension and wouldn't mind sharing? You know, double click a document file and the associated program automatically fires up etc.

I can see the registry entries which need adding, but just wondered if anyone already has some code lying around which could save me the bother? (Lazy b*stard that I am sometimes!) :)

Thanks in advance.

Posted: Wed Apr 29, 2009 6:25 pm
by ts-soft
see here

It's in german but not commented, so you don't have problem with the language :wink:

greetings

Thomas

Posted: Wed Apr 29, 2009 6:27 pm
by netmaestro

Posted: Wed Apr 29, 2009 6:33 pm
by netmaestro
@ts-soft: That's a good well-written include and most useful, thanks for sharing it 8)

Posted: Wed Apr 29, 2009 6:41 pm
by ts-soft
netmaestro wrote:@ts-soft: That's a good well-written include and most useful, thanks for sharing it 8)
It is not from me and based on a includefile from GPI

Some constants should changed for vista compatibility. #KEY_ALL_ACCESS
is not required for reading, better use #KEY_READ

Posted: Wed Apr 29, 2009 6:43 pm
by netmaestro
Good to know that, thanks. GPI is sorely missed, as is El_Choni :(

Posted: Wed Apr 29, 2009 8:47 pm
by srod
Thanks Thomas. That adds more entries to the registry than I was going to add (having looked on MSDN), but it all looks straight forward enough.

Thanks again. 8)
Good to know that, thanks. GPI is sorely missed, as is El_Choni
I see El-Choni browsing these forums on occasion. Don't think he hangs around for long though! :)