Registered: January 26, 2011 | Posts: 12 |
| Posted: | | | | As a user can manage several databases, I'd like to be able to get the Name of the opened database... Please, can you tell me how can I get it? I've seen the event EVENTID_DatabaseOpened but it is only triggered when the user changes his current DB.. when the application is launched, this event is not lauched (or my plugin is not yet started to catch it... ) Is there a property I can get from a specific function to get it? |
|
Registered: March 13, 2007 | Reputation: | Posts: 2,005 |
| Posted: | | | | Besides the event (which you say doesn't fire at application launch) I also didn't see a function. As a workaround you could use IDVDInfo::GetCoverImageFilename() which returns the cover file path to the cover image. And as the "Image" folder for covers is a subfolder of the database folder, you could retrieve the database this way. By the way, you should ask plugin development questions in the Plugin Development subforum. | | |
|
|
Registered: January 26, 2011 | Posts: 12 |
| Posted: | | | | Thank you for the answer! Long time I haven't played with the plugins.. I haven't choose the good forum Sorry... Your idea is good! BTW, I have coded this which fits the need: function GetCurrentDatabase: string; var reg: tregistry; begin reg := TRegistry.Create; try reg.RootKey:=HKEY_CURRENT_USER; reg.OpenKeyReadOnly('Software\Invelos Software\DVD Profiler'); Result := reg.ReadString('CurrentDatabase'); finally reg.Free; end; end;As I don't see any way to move myself my topic to the good forum section, if a moderator wants to move it, do not hesitate | | | Last edited: by Whiler |
|