Jump to content

Featured Replies

Posted
In a WIN32 program, how exactly do I get the name of the executable? I googled it, but all the code seems to reference objects I can't access and headers that I don't have...
  • Author
I googled it, but all the code seems to reference objects I can't access and headers that I don't have...
.

Well, the hInstance should work.

Oh, and GetModuleFileName gets the full path.

char LOLOL[256];

HMODULE HME = GetModuleHandle(NULL);

DWORD HEM = GetModuleFileName(HME, LOLOL, sizeof(LOLOL));

 

i think

well, if language doesnt matter:

 

Dim a As Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly

Dim strNameSpace As String = a.GetName.Name.ToString

 

.net rules k?

Guest
This topic is now closed to further replies.