Article View: borland.public.cppbuilder.nativeapi
Article #1565Weird problem with WNetAddConnection2()
From: Bob Reeves
Date: Sun, 15 Jul 2007 16:57
Date: Sun, 15 Jul 2007 16:57
41 lines
2927 bytes
2927 bytes
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. -- Bob
Technical Details
Message-ID:
<469a536d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.arglkargh.de!feeder.erje.net!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,254af1c09c7e7947,start X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Bob Reeves" <bob@somethinxtra.com> From: "Bob Reeves" <bob@somethinxtra.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Weird problem with WNetAddConnection2() Date: Sun, 15 Jul 2007 11:57:08 -0500 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 70.184.21.245 Message-ID: <469a536d@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1184519021 70.184.21.245 (15 Jul 2007 10:03:41 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.arglkargh.de!feeder.erje.net!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail