Hi There,
I'm trying to get a listing of shares from a server. The server is a
linux box running samba and LDAP for directory services (just for
background info!)
I have some code which I copied out of the MSDN library which is
supposed to get a list of available shares from a windows server.
However when I try to access the server with this code, I get the
following error > Error 429 'Cannot create ActiveX component'. If I try
to access another client machine on the network (running WinXP) it
works, it also works if I reference my local computer name (WinXP).
Can someone shed some light on why this might be happening and if they
know a work around? I 'think' it might have something to do with the
Lanmanserver part of the code, but I don't quiet understand why...
Thanks for your help,
Andrew
Dim fs As IADsFileService
Dim share As IADsFileShare
Dim strMachine As String
strMachine = "server"
fs = GetObject("WinNT://" & strMachine & "/LanmanServer")
if (fs.class = "FileService") Then
For Each share In fs
msgbox(share.name)
Next share
End If
fs = Nothing
share = Nothing