LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"