Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

WnetGetConnection2 and Win95.

Posted on 1997-12-31
13
Medium Priority
?
442 Views
Last Modified: 2011-10-03
I've been using WnetGetConnection2 under NT to map remote shares over tcp\ip, \\The Computers IP\My Share. This works great under NT but when trying it under Win95 I always get the bad net name error. I've even tried mapping the ip to a computer name in lmhosts.sam but I get the same error. I was recently told that win95 can't map remote drives\shares over tcp\ip and that it can only map local drives. I find this hard to beleive. Can anyone help me out here?
0
Comment
Question by:evel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
13 Comments
 
LVL 8

Expert Comment

by:mrmick
ID: 1448504
Do you mean WnetAddConnection2 ?
0
 
LVL 8

Accepted Solution

by:
mrmick earned 100 total points
ID: 1448505
Using WnetAddConnection2, you can  map remote shares over tcp\ip.

Check out Microsoft Knowledge Base
Article ID: Q173011
Title: "HOWTO: Add and Remove Network Connections"
http://premium.microsoft.com/support/kb/articles/q173/0/11.asp

In the example use
NetR.lpRemoteName = "\\xxx.xxx.xxx.xxx"

0
 
LVL 8

Expert Comment

by:mrmick
ID: 1448506
whoops, disregard the last two lines of the above answer.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:evel
ID: 1448507
yep sorry AddConnection is what I ment. I know how to use it and it works great under NT.  But when using the same code that wroks in NT I get bad net name error under win95. Is win95 able to map remote shares over tcp\ip using \\xxx.xxx.xxx.xxx\share? I get bad net name when using \\xxx.xxx.xxx.xxx\share with the run command as well. I know the ip is up and working because I can connect to it with my other machine no prob.
0
 
LVL 8

Expert Comment

by:mrmick
ID: 1448508
Can you connect to it using any other machine using WNetAddConnection2?
0
 

Author Comment

by:evel
ID: 1448509
I can connect using any machine under NT. Won't connect under any machine running win95.
0
 
LVL 8

Expert Comment

by:mrmick
ID: 1448510
I suggest you go ahead and copy the Microsoft sample project and give it a try.  I helped someone else get this working and they reported that it worked fine.
0
 

Author Comment

by:evel
ID: 1448511
the code i'm using is from "HOWTO: Add and Remove Network Connections" and it works under NT but not win95. Are you able to connect to remote shares with tcp\ip under win95?
0
 
LVL 8

Expert Comment

by:mrmick
ID: 1448512
No, I don't have a remote network to test with.  The person I helped in a previous question was making the connection.
0
 

Author Comment

by:evel
ID: 1448513
Try connecting to me \\206.171.172.192\test l:tester p:tester
0
 
LVL 8

Expert Comment

by:mrmick
ID: 1448514
Ok, give me a couple of minutes.
0
 

Author Comment

by:evel
ID: 1448515
thanks. If you don't have wnetaddconnection setup just stick \\206.171.172.192\test in run and see if it connects.
0
 
LVL 8

Expert Comment

by:mrmick
ID: 1448516
I had it set up, doesn't work for me either.  It also doesn’t work on my server running NT with a direct connect (frame relay).

Are you sure the resource path is correct?

My email address is: mick@owen.wa.com
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question