Retrieving the current filename from another application

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
briantokyo
Blank Cone
Blank Cone
Posts: 13
Joined: 21 Feb 2008 04:34

Retrieving the current filename from another application

Postby briantokyo » 24 Mar 2008 20:08

How could I accurately retrieve the current media being played in VLC? The DLL seems to provide this info only for an app using it to play on its own, but not for an external application trying to find the current media being played in the VLC player itself.

So far I've come up with 3 ways to do this, but none is perfect.

1 - Retrieving the tray icon (must be enabled) hint. This is really bad because there is a limit in the number of characters, and usually it will be too short. (the hint contains the path+filename)
2 - Retrieving all the file/device handles in use by the VLC process and parse through the items to check for common video extensions. Sometimes it will open handles to all the files in a single directory so you can't accurately tell which one is being used.
3 - Retrieve the text in the statusbar panel on the bottom of the GUI

#2 and #3 have an extra problem, if the player is in full screen or using another gui/interface, they will fail.

Wish there was an option to add the filename in the window captionbar, like most other players do, then it would be very easy.

Any ideas?

briantokyo
Blank Cone
Blank Cone
Posts: 13
Joined: 21 Feb 2008 04:34

Re: Retrieving the current filename from another application

Postby briantokyo » 29 Mar 2008 06:16

Can also retrieve the commandline but that only works for the first file.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 51 guests