Help WNetGetUniversalName ... in vba
Can anyone tell me why this doesn't work ?
Option Explicit
Declare Function WNetGetUniversalName Lib "mpr"
Alias "WNetGetUniversalNameA" (ByVal lpLocalPath As
String, ByVal dwInfoLevel As Long, lpBuffer As UUU,
lpBufferSize As Long) As Long
Type UUU
UU As String
End Type
Public Sub AA()
Dim CC As UUU
Dim TT As Long
Dim kk As Long
kk = WNetGetUniversalName("H:\", 1, CC, TT)
If TT 0 Then
MsgBox TT
MsgBox CC.UU
End If
kk = WNetGetUniversalName("H:\", 2, CC, TT)
If TT 0 Then
MsgBox TT
MsgBox CC.UU
End If
End Sub
the problem is that CC always "stay" empty
H: is a share in a server...
what i want to know is the name of the server and share...
Thanks in advance
Joćo Rodrigues
|