how to get vlc.exe path

This forum is about all development around libVLC.
ahmad_aljallad
Blank Cone
Blank Cone
Posts: 56
Joined: 04 Nov 2008 13:32

how to get vlc.exe path

Postby ahmad_aljallad » 15 Feb 2009 09:32

Dear all

How i can get the application path using the code in vlc
What is asking if i start vlc.exe i need the application?
To get the path for vlc.exe on the H.D.D.

Thanks

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: how to get vlc.exe path

Postby Rémi Denis-Courmont » 15 Feb 2009 13:13

HKLM/Software/VideoLAN/VLC/InstallDir
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ahmad_aljallad
Blank Cone
Blank Cone
Posts: 56
Joined: 04 Nov 2008 13:32

Re: how to get vlc.exe path

Postby ahmad_aljallad » 15 Feb 2009 13:44

Any how this problem solved the solution if anybody need it is

Code: Select all

using std::string; char szAppPath[MAX_PATH] = ""; string strAppDirectory; ::GetModuleFileName(NULL, szAppPath, sizeof(szAppPath) - 1);
this for getting the application file path

Code: Select all

strAppDirectory = szAppPath; strAppDirectory = strAppDirectory.substr(0, strAppDirectory.rfind("\\")); strAppDirectory =strAppDirectory+"\\vlc-Documents\\vlc16x16.png";
this for extracting directory

Code: Select all

const char *p; p=strAppDirectory.c_str();
this for converting from string to char so you can assign it
To Qicon function if you need to change vlc icons.

=========================================================================
putting all to geter

Code: Select all

using std::string; char szAppPath[MAX_PATH] = ""; string strAppDirectory; ::GetModuleFileName(NULL, szAppPath, sizeof(szAppPath) - 1); // Extract directory strAppDirectory = szAppPath; strAppDirectory = strAppDirectory.substr(0, strAppDirectory.rfind("\\")); strAppDirectory =strAppDirectory+"\\vlc-Documents\\vlc16x16.png"; //test======================= // string l="Pranav"; const char *p; p=strAppDirectory.c_str();


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests