path of the application
-
I am doing an application using ATL COM application wizard.I want to get the path name of the current application .How can i get it. Thanks.
radhika28 wrote:
I want to get the path name of the current application
Doesn't
GetModuleFileName
using_module.hInst
help ?Prasad Notifier using ATL | Operator new[],delete[][^]
-
radhika28 wrote:
I want to get the path name of the current application
Doesn't
GetModuleFileName
using_module.hInst
help ?Prasad Notifier using ATL | Operator new[],delete[][^]
ya the above will retrive the path from exe file.But i want to retrive the path without using executable.Is it possible? Thanks.
-
I am doing an application using ATL COM application wizard.I want to get the path name of the current application .How can i get it. Thanks.
-
ya the above will retrive the path from exe file.But i want to retrive the path without using executable.Is it possible? Thanks.
Do you mean folder path containing exe ? In that case why dont you trim exe name ?
Prasad Notifier using ATL | Operator new[],delete[][^]
-
Do you mean folder path containing exe ? In that case why dont you trim exe name ?
Prasad Notifier using ATL | Operator new[],delete[][^]
-
GetCommandLine
also contains the application path.~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
This function also retrive the path of the executable file.I want to retrive the path of the current application because i gave the executable path different.Is there any function that retrives the path of the application with out using the path of executable. Thanks
-
ya the above will retrive the path from exe file.But i want to retrive the path without using executable.Is it possible? Thanks.
radhika28 wrote:
the above will retrive the path from exe file.But i want to retrive the path without using executable.
So use the application's handle instead of
NULL
as the first argument.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
In my ATLCOM application i am giving the executable path as C:\windows\explorer.exe.But my application is in D drive.How to retrive the path of the my application in D drive i.e D:\..... Thanks.
Have you tried what I said earlier ? It will give path of dll. Provided you pass module instance to it. If you pass NULL as first parameter it will give exe path. From
MSDN
:- Parameters_hModule_
[in] Handle to the module whose file name is being requested. If this parameter is NULL, GetModuleFileName returns the path for the file containing the current process.Prasad Notifier using ATL | Operator new[],delete[][^]
-
radhika28 wrote:
the above will retrive the path from exe file.But i want to retrive the path without using executable.
So use the application's handle instead of
NULL
as the first argument.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
DavidCrow wrote:
application's handle instead of NULL as the first argument
She doesn't seem to read replies carefully. I'd mention this as first reply.
Prasad Notifier using ATL | Operator new[],delete[][^]