Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/10/2006, 15:18
Avatar de marcos1979
marcos1979
 
Fecha de Ingreso: abril-2004
Ubicación: 62º 06' 18" O / 33º 07' 47" S
Mensajes: 331
Antigüedad: 20 años, 1 mes
Puntos: 1
Extraido de la web de "el Guille" http://www.elguille.info/

De nombre corto a largo:
Código:
Private Declare Function GetLongPathName Lib "kernel32" Alias "GetLongPathNameA" _
    (ByVal lpszShortPath As String, ByVal lpszLongPath As String, _
    ByVal cchBuffer As Long) As Long

    Dim sBuf As String * 260
    Dim i As Long
    i = GetLongPathName(Text2, sBuf, Len(sBuf))
    Text1 = Left$(sBuf, i)
De nombre largo a corto:
Código:
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" _
    (ByVal lpszLongPath As String, ByVal lpszShortPath As String, _
    ByVal cchBuffer As Long) As Long

    Dim sBuf As String * 260
    Dim i As Long
    i = GetShortPathName(Text1, sBuf, Len(sBuf))
    Text2 = Left$(sBuf, i)
Un saludo
__________________
Marcos

El dinero no da la felicidad... démelo y sea feliz!!!