Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wanting to go from Drive Letter to UNC any advice
Message
From
08/03/1999 10:37:54
 
 
To
08/03/1999 10:01:30
Beth Wetherbee
Virginia Beach Public Schools
Virginia Beach, Virginia, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00153439
Message ID:
00195150
Views:
29
>>>This is not a problem with the use of UNCs; it has to do with how your Novell network is set up. Novell 3.1x and 4.x in bindery emulation mode requires you to log into the server, one server at a time, either by explicit login or attachment. Attempting to map a resource (printer or drive) or examine the details of shared resources on a Netware server forces the login, but a simple UNC reference does not. A Novell server managed through an NT domain or via NDS is logged in when the domain or tree is accessed, avoiding the problem neatly. If you ATTACH the servers in your NetWare login script (as opposed to actually mapping a resource) you'll find that UNCs for the Attached servers will resolve normally.
>>>
>>We are using NDS here (IntraNetware 4.11) BUT I'm not sure what the other servers here are using. I *think* they are using the same. I am aware that the problem seems to be native to Novell from previous discussions with people who have had no problems with this on NT. It's just that some of my applications only display info on success of IF FILE(...) - they don't work on my PC but do work on the PCs they are intended for. (I have NO drives mapped - to ensure that my apps work without them).
>
>Hi Nigel -
>
>We are in the same Novell situation here and are having exactly the same problem you described. "Attach" doesn't work in this version of Novell, apparently. Have you had any luck finding a solution to this problem?
>

You might want to download my CLSHEAP.ZIP and NETRSC.ZIP files; you can access a Novell server's share and force a login using WNetAddConnection3(). The latest update contains a WNetAddConnection3() implementation as a part of the NETRSC.ZIP; in case they haven't posted it, here's the source for DEMO_WNetAddConnection3:
*FUNCTION DEMO_WNetAddConnection3
LPARAMETERS cLocal, cRemote, cUserID, cPassword
*
*	Do something useful with NETRSC (and by association, CLSHEAP)
*
LOCAL oHeapObj, oNetRsc, nResult
IF ! 'CLSHEAP' $ SET('PROC')
	SET PROCEDURE TO CLSHEAP ADDITIVE
ENDIF
IF ! 'NETRSC' $ SET('PROC')
	SET PROCEDURE TO NETRSC ADDITIVE
ENDIF
oHeapObj=CREATEOBJ('Heap')
oNetRsc=CREATEOBJ('NETRESOURCE',oHeapObj)
oNetRsc.SetRemoteName(cRemote)
oNetRsc.SetLocalName(cLocal)
IF TYPE('cUserID') # 'C'
	cUserID = ''
ENDIF
IF TYPE('cPassword') # 'C'
	cPassword = ''
ENDIF
*	Create the NETRESOURCE for the API call
oNetRsc.BuildNETRESOURCE()

DECLARE INTEGER WNetAddConnection3 IN WIN32API ;
	INTEGER hWND, ;
	STRING @ lpNETRESOURCE, ;
	STRING @ lpPassword, ;
	STRING @ lpUserID, ;
	INTEGER dwFlags
DECLARE INTEGER GetActiveWindow IN WIN32API

nResult = WNetAddConnection3(GetActiveWindow(),oNetRsc.cNETRESOURCE,cPassword + CHR(0),cUserID + CHR(0),0)
oNetRsc = ''
oHeapObj = ''
RETURN nResult

=DEMO_WNetAddConnection3('','\\MyNovellServer\SYS\PUBLIC','Bozo','Clown')
This will attempt to attach the Novell server resource in the second parameter with the userid and password supplied in the third and fourth parameter. The function will return 0 for success, any other value is an error from the WNetAddConnection3 API call, and can be interpreted from information in the MSDN and VC++ .H files related to the WNet-family calls (WINERROR.H and WINNETWK.H)

>Thanks!
>Beth
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform