Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win32: Howto get the applications name?

Status
Not open for further replies.

Skute

Programmer
Joined
Jul 21, 2003
Messages
272
Location
GB
Hi, i want a sure fire way of getting the current applications FULL path (including filename).

I know i can use GetCurrentDirectory() and then add on the name of my application, but what if a user renames the .exe?

Thanks.
 
GetModuleFileName(
NULL, //instead of null you can use hInstance,
//or GetModuleHandle(0)
path,
nSize
);


Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
thanks Ion!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top