🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1570

Re: Weird problem with WNetAddConnection2()

#1570
From: Colin B Maharaj
Date: Mon, 16 Jul 2007 12:08
47 lines
3462 bytes
1. Check you network cable - maybe all the pins are not terminated.
2. Check firewall settings. Disable firewall momentarily and check.
3. Not sure if this makes a difference but ensure you do not have blank 
passwords on the machines.
4. And do the GetLastError if all fails.


Bob Reeves wrote:
> Not sure if anyone can help but I have ran into a weird problem with
> WNetAddConnection2(), one of those "it should work but it doesn't"
> problems... First off, the code is working fine in 14 locations with the
> same computer/network setup. I would post the actual code but don't think it
> would help because it is working in more places than it isn't.
> 
> A little background...
> 
> 3 computers tied together, two running Windows 2000 one running NT 4.0,
> simple LAN using NetBEUI. The two windows 2000 computers connect to a drive
> on the NT computer via WNetAddConnection2() (logging in as Guest) in the
> application(s) software. The code is identical in both applications. The
> Guest account on the NT machine has Admin status...
> 
> In one location one of the Windows 2000 computers refuses to connect,
> WNetAddConnection2() fails. Lets just call the two Win2000 computers Comp1
> and Comp2 for the following...
> 
> Comp1 connects to the NT computer fine.
> Comp2 refuses to connect even if Comp1 isn't on.
> Replace Comp2 with another Computer and it works.
> Take Comp2 to a different site and it works.
> Can access the NT computers drive from Comp2 through My Network.
> Can access Comp2 from the NT computer through Network Neighborhood.
> 
> It seem like that particular windows 2000 computer doesn't like that
> particular NT computer because through all the switching and swapping
> everything works except when these two computers are tied together.
> 
> Please understand this isn't a simple network problem we have spent two
> solid days on the phone chasing down all the normal stuff plus the guy on
> the other end has made many trips to another site swapping computers. Also a
> permanent computer swap isn't possible for reasons outside my control. I
> have an exact copy of the system here in my office and it works great, if I
> could make this one fail I would know what is wrong with the other.
> 
> Any Ideas ? If I can't come up with a solution before next Tuesday I will
> have to make a 900 mile round trip to try and fix it.
> 
Technical Details
Message-ID: <469b5fb1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <469a536d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,254af1c09c7e7947
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 16 Jul 2007 08:08:18 -0400
From: Colin B Maharaj <noreply@myhost.com>
User-Agent: Thunderbird 1.5.0.12 (Windows/20070509)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Weird problem with WNetAddConnection2()
References: <469a536d@newsgroups.borland.com>
In-Reply-To: <469a536d@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 000757-1, 07/16/2007), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 201.238.92.106
Message-ID: <469b5fb1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1184587697 201.238.92.106 (16 Jul 2007 05:08:17 -0700)
Lines: 47
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail