<DllImport("shell32.dll")> _
Public Shared Function SHBrowseForFolder(ByRef lpbi As BROWSEINFO) As Integer
End Function
<DllImport("shell32.dll")> _
Public Shared Function SHGetPathFromIDList(ByVal pidList As Integer, ByVal lpBuffer As String) As Integer
End Function
<DllImport("shell32.dll")> _
Public Shared Function SHGetSpecialFolderLocation(ByVal hWndOwner As Integer, ByVal nFolder As Integer, ByRef ListId As Integer) As Integer
End Function
Public Declare Function SHBrowseForFolder Lib "shell32" (ByRef lpbi As BROWSEINFO) As Integer
Public Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Integer, ByVal lpBuffer As String) As Integer
Public Declare Function SHGetSpecialFolderLocation Lib "shell32" (ByVal hWndOwner As Integer, ByVal nFolder As Integer, ByRef ListId As Integer) As Integer
In the above example, the second function 'SHGetPathFromIDList' failed to execute correctly when using the "DllImport" style of declaration.

New Topic/Question
Reply




MultiQuote



|