Jump to content
YOUR-AD-HERE
HOSTING
TOOLS

Locked Alternativa a sMyPath [Ported C++]


Expermicid

Recommended Posts

Nuevamente ante una necesidad, me vi "obligado" xD a hacer un code para obtener la ruta del exe que se ejecutaba.

 

Y lo consegui con la API GetModuleFileNameA que despues me acorde del code que hizo M3 en vb6 con esta API y que luego Metal lo traducio a Delphi.

 

Asi que se lo dejo en C++ :)

 

[lenguaje=cpp]#include

 

void main() {

char path[MAX_PATH];

DWORD size = GetModuleFileNameA(NULL, path, MAX_PATH);

if (size)

std::cout << path << std::endl;

getchar();

}[/lenguaje]

 

This is the hidden content, please

 

Saludos

Edited by Expermicid
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.