SHGetSpecialFolderLocation

C# Signature:

[DllImport("shell32.dll", SetLastError = true)]
static extern int SHGetSpecialFolderLocation(IntPtr hwndOwner, CSIDL nFolder,
   ref IntPtr ppidl);

VB.NET Signature:

<DllImport("shell32.dll", SetLastError:= True)>
Public Function SHGetSpecialFolderLocation(hOwner As IntPtr, _
                  <MarshalAs(UnmanagedType.I4)>nFolder As CSIDL, _
                  <MarshalAs(UnmanagedType.Struct)>ByRef ppidl As ITEMIDLIST) As Integer
End Function

VB Signature:

Public Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" _
        (ByVal prmlngHwndOwner As Long, _
         ByVal prmlngFolderID As CSIDL, _
         prmtypItemIDList As ITEMIDLIST) As Long

Alternative Managed API:

'In Visual Basic.Net 

    Dim fileP As String
    fileP = My.Computer.FileSystem.SpecialDirectories.MyDocuments

    MsgBox(fileP.ToString)

Alternative Managed API:

Alternative Managed API:

Alternative Managed API:

Alternative Managed API:

Alternative Managed API:

Última actualización