Board index » cppbuilder » VCL component for registering file types.
Jason Cipriani
![]() CBuilder Developer |
Jason Cipriani
![]() CBuilder Developer |
VCL component for registering file types.2008-02-29 09:16:41 AM cppbuilder52 Is there a VCL component, or something else in Borland's component library, that simplifies dealing with data in HKEY_CLASSES_ROOT -- specifically: registering file types and also querying info about existing file type associations? Thanks, Jason |
Remy Lebeau (TeamB)
![]() CBuilder Developer |
2008-03-01 10:15:52 AM
Re:VCL component for registering file types.
"Jason Cipriani" < XXXX@XXXXX.COM >wrote in message
QuoteIs there a VCL component ... that simplifies dealing with data in reg.lebeausoftware.org Quoteor something else in Borland's component library The Win32 API has an IQueryAssociations interface for querying (but not assigning) the more common settings, but does not provide access to many of the more advanced settings. Gambit |
David Ayre
![]() CBuilder Developer |
2008-03-01 11:24:08 PM
Re:VCL component for registering file types.QuoteI have developed a free component for exactly that purpose: If so, how would I go about it? Thanks, David {smallsort} |
Jason Cipriani
![]() CBuilder Developer |
2008-03-02 07:13:22 AM
Re:VCL component for registering file types.
Remy wrote:
Quote>I have developed a free component for exactly that purpose: 1) When you use the Add() that takes a TExtInfo*, is this right: TExtInfo *xi = new TExtInfo(".test1", Application->ExeName, "Test 1", 0); RX->Add(xi); RX->Register(); That seems to work OK (RX is the TRegExtension) -- except if I delete xi, then an access violation occurs in TExtCommands::Clear when my program exits. Looking at TExtCommand::Clear(), it appears that I should not delete xi since Clear() deletes all the TExtInfo's I've Add()ed. Is this a general behavior of "collections" -- if you add an item it takes "ownership" of it, then if you Clear() the collection it deletes all your objects? Mostly I'm just wondering; for when I write components in the future, to stick to normal expected behaviors. 2) The docs for "TExtInfo::Extension" property say it adds a leading dot if you don't put one in. On the other hand, specifying an extension to TRegExtension::Add or the TExtInfo constructor does not seem to add a leading dot if one is missing. Just to let you know. "David Ayre" < XXXX@XXXXX.COM >wrote in message QuoteIs it possible to use this component in BDS2006? Thanks, Jason |
David Ayre
![]() CBuilder Developer |
2008-03-03 05:35:52 PM
Re:VCL component for registering file types.Quote>Is it possible to use this component in BDS2006? Thanks, David |
Remy Lebeau (TeamB)
![]() CBuilder Developer |
2008-03-04 02:08:00 AM
Re:VCL component for registering file types.
"Jason Cipriani" < XXXX@XXXXX.COM >wrote in message
Quote1) When you use the Add() that takes a TExtInfo*, is this right: RX->Add(".test1", Application->ExeName, "Test 1", 0); Quoteif I delete xi Quotethen an access violation occurs in TExtCommands::Clear when my program QuoteLooking at TExtCommand::Clear(), it appears that I should not delete xi QuoteIs this a general behavior of "collections" -- if you add an item it takes Quote2) The docs for "TExtInfo::Extension" property say it adds a leading dot though. So, in the meantime, just make sure to always include a leading dot in your extension string values. QuoteOn the other hand, specifying an extension to TRegExtension::Add or the Gambit |
Remy Lebeau (TeamB)
![]() CBuilder Developer |
2008-03-04 02:09:43 AM
Re:VCL component for registering file types.
"David Ayre" < XXXX@XXXXX.COM >wrote in message
QuoteI can build it but I'm not sure how to install it. Could you advise, Gambit |
David Ayre
![]() CBuilder Developer |
2008-03-04 04:24:43 PM
Re:VCL component for registering file types.QuoteThe same way you install any other component - load the BPK project into the one of the trials of old age. Cheers, David |
Jason Cipriani
![]() CBuilder Developer |
2008-03-05 09:08:43 AM
Re:VCL component for registering file types.
You should be able to load the project, then right-click on the BPL file in
the project manager and "install". Alternatively, if you normally keep your package BPL, BPI, LIB, and header files in some other location, just build it, don't install it, then copy the BPL, BPI, and LIB files from the project directory to wherever you want them, and copy RegExtensions.h to an appropriate location, too. Then you can install the package by choosing "Install Packages" from the "Component" menu and browsing to the files. Jason "David Ayre" < XXXX@XXXXX.COM >wrote in message Quote
|
Jason Cipriani
![]() CBuilder Developer |
2008-03-05 09:09:22 AM
Re:VCL component for registering file types.
Thanks!
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message Quote
|