WnetGetConnection2 and Win95.

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?
evelAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrmickCommented:
Do you mean WnetAddConnection2 ?
0
mrmickCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mrmickCommented:
whoops, disregard the last two lines of the above answer.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

evelAuthor Commented:
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
mrmickCommented:
Can you connect to it using any other machine using WNetAddConnection2?
0
evelAuthor Commented:
I can connect using any machine under NT. Won't connect under any machine running win95.
0
mrmickCommented:
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
evelAuthor Commented:
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
mrmickCommented:
No, I don't have a remote network to test with.  The person I helped in a previous question was making the connection.
0
evelAuthor Commented:
Try connecting to me \\206.171.172.192\test l:tester p:tester
0
mrmickCommented:
Ok, give me a couple of minutes.
0
evelAuthor Commented:
thanks. If you don't have wnetaddconnection setup just stick \\206.171.172.192\test in run and see if it connects.
0
mrmickCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.