el Guille, la Web del Visual Basic, C#, .NET y más...

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:

 


Haz tu donativo a este sitio con PayPal
 

Busca en este sitio con Google
 
Google

La fecha/hora en el servidor es: 29/03/2024 0:40:58

La fecha actual GMT (UTC) es: 

©Guillermo 'guille' Som, 1996-2024