Uso de GetShortPathName
Publicado por Carlos (8 intervenciones) el 24/05/2003 07:00:57
hola si alguien sabe el uso de GetShortPathName fabor responder
Valora esta pregunta


0



DWORD GetShortPathName( LPCSTR lpszLongPath, LPSTR lpszShortPath,DWORD cchShortPath
);#include <windows.h>
#include <stdio.h>
int main() {
char longPath[MAX_PATH] = "C:\\Users\\ExampleUser\\Documents\\VeryLongFileName.txt";
char shortPath[MAX_PATH];
DWORD result = GetShortPathName(longPath, shortPath, sizeof(shortPath));
if (result > 0) {
printf("Ruta corta: %s\n", shortPath);
} else {
printf("Error al obtener la ruta corta. Código de error: %lu\n", GetLastError());
}return 0;
}
