Al di là del fatto che la corretta dichiarazione sarebbe questa
e questo il corretto modo di richiamarlacodice:Private Declare Auto Function GetVolumePathName Lib "Kernel32.dll" (ByVal lpszFileName As String, ByVal lpszVolumePathName As Text.StringBuilder, ByVal cchBufferLength As Integer) As Integer
. In ogni caso la GetVolumePathName non va bene per quello che devi fare, credo che potrebbe andare bene invece la WNetGetConnection.codice:Dim buffer As New Text.StringBuilder(255) If Not GetVolumePathName("z:\", buffer, buffer.Capacity) Then Console.WriteLine(buffer.ToString()) End If

Rispondi quotando