Ir al índice principal
el Guille, la Web del Visual Basic, C#, .NET y más...
  Lo+ - WinFX - .NET - ADO.NET - ASP.NET - Cómo... - Colabora - VB6 - HTML - Vista - Links - Foros  

Buscar en Google y en elGuille.info:
Google
 

GetLongPathName

 
Publicado el 30/Nov/2007
Actualizado el 30/Nov/2007
Autor: Guillermo 'guille' Som

GetLongPathName. Esta función la podemos usar para convertir un nombre corto (tipo MS-DOS 8.3) en uno largo.




 

GetLongPathName

Esta función la podemos usar para convertir un nombre corto (tipo MS-DOS 8.3) en uno largo.

Ejemplos para VB6 y Visual Basic .NET y C#

 

Declaración en el API de Windows:

DWORD GetLongPathName(
  LPCTSTR lpszShortPath,  // Pointer to a null-terminated path to be converted
  LPTSTR lpszLongPath,    // Pointer to the buffer to receive the long path.
                          // You can use the same buffer you used for the lpszShortPath parameter
  DWORD cchBuffer         // Specifies the size of the buffer, in characters
);

 

Declaración para VB6:

Private Declare Function GetLongPathName Lib "kernel32" Alias "GetLongPathNameA" _
        (ByVal lpszShortPath As String, _
        ByVal lpszLongPath As String, _
        ByVal cchBuffer As Long) As Long

 

Declaración   para VB .NET:

<System.Runtime.InteropServices.DllImport("kernel32.dll")> _
Private Shared Function GetLongPathName( _
        ByVal lpszShortPath As String, _
        ByVal lpszLongPath As System.Text.StringBuilder, _
        ByVal cchBuffer As Integer) As Integer
End Function

 

Declaración   para C#:

[System.Runtime.InteropServices.DllImport("kernel32.dll")] 
private extern static int GetLongPathName( 
        string lpszShortPath, 
        System.Text.StringBuilder lpszLongPath, 
        int cchBuffer);

 


Código de ejemplo y temas relacionados:



Contribuye con el Guille
Aporta tu granito de arena y ayuda a mantener el sitio del Guille...


Cosas que te pueden interesar



Mentor de
Solid Quality mentors
Most Valuable Professional
MVP de Visual Basic desde 1997



Orador internacional de Ineta
Orador de Ineta Latam

ir al índice del Guille

Valid XHTML 1.0 Transitional


Escribir un mensaje al Guille (mensaje EN elGuille.info)
Has entrado usando el host: www.elguille.info
Puedes verlo también en: http://www.mundoprogramacion.com/net/api/getlongpathname.aspx