cpp
wchar_t LibFileName[512]; GetModuleFileNameW( hMe, LibFileName, 512 );
Con este ejemplo yo puedo obtener la direccion completa de mi aplicacion pero ahoa como le extraigo el nombre de la aplicacion?
Escrito 11 julio 2011 - 11:26
wchar_t LibFileName[512]; GetModuleFileNameW( hMe, LibFileName, 512 );
Escrito 12 julio 2011 - 12:05
wchar_t FullFileName[MAX_PATH]; GetModuleFileNameW(0, FullFileName, MAX_PATH); wchar_t *FileName = wcsrchr(FullFileName, L'\\') + 1;
Escrito 12 julio 2011 - 12:29
DirCur = "D:\Programas\JDownloader\downloads\The hard times of RJ Berger\File.avi"; ExtractfileName(DirCur , Dir); Dir = "D:\Programas\JDownloader\downloads\The hard times of RJ Berger\"
Escrito 12 julio 2011 - 07:00
inline string GetPathFromFilename( const string& filename ) { return filename.substr( 0, filename.rfind("\\")+1 ); }
Escrito 12 julio 2011 - 07:02
wchar_t Path[MAX_PATH]; GetModuleFileNameW(0, Path, MAX_PATH); *(wcsrchr(Path, L'\\')) = 0;
Escrito 12 julio 2011 - 09:09
Escrito 12 julio 2011 - 11:36
Gracias maestros ambos metodos funcionan a la perfeccion.
Escrito 12 julio 2011 - 01:08