in reply to Network Neighborhood and LWP::UserAgent list directory

I agree with $code or die, use the Win32::NetResource module. It should work with or without ADSI.

Example copied from the Win32::NetResource doc:

# This example displays all the share points in the entire # visible part of the network. # use strict; use Win32::NetResource qw(:DEFAULT GetSharedResources GetError); my $resources = []; unless(GetSharedResources($resources, RESOURCETYPE_ANY)) { my $err = undef; GetError($err); warn Win32::FormatMessage($err); } foreach my $href (@$resources) { next if ($$href{DisplayType} != RESOURCEDISPLAYTYPE_SHARE); print "-----\n"; foreach( keys %$href){ print "$_: $href->{$_}\n"; } }

Replies are listed 'Best First'.
Re: Re: Network Neighborhood and LWP::UserAgent list directory
by rrwo (Friar) on Aug 31, 2001 at 08:50 UTC

    I've had problems using Win32::NetResource with ActivePerl 5.6.1. Using the module gives compilation errors.

    (To be honest I've never bothered filing a bug report or looking for an upgraded module. I assume there's a fix.)