Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Map Network Drive dialog box
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00194378
Message ID:
00194467
Views:
23
>>>>Hello George, you answer helped me out also as I have been having trouble with making sure network resources were available. But my problem is this, I have established that UNC will be used through out my application, so I dont rely on the user being mapped to K: or J:, just that they are logged into the server. I will issue the \\402fs1\data\lotcard\data\drive.dbf to get to my data. So what I would like to know from you is how can I get to the second dialog that comes up from the above, when the user is not logged into the server. The dialog above lets them map a drive to a server resource, but if they are not logged in then it brings up the login screen. How can I just get the login screen to come up as I am using UNC's and mapping is not my problem?
>>>
>>>Hi Bret,
>>>
>>>According to the SDK: "If the function attempts to make a connection and the provider returns the message ERROR_INVALID_PASSWORD, Windows prompts the user to enter a password and uses the new password in another attempt to make the connection." The value for ERROR_INVALID_PASSWORD is 86. I'll have to investigate the login dialog. It doesn't appear in the WNet... group. Does this help?
>>
>>So what your saying is that I should trick it into thinking that the password was invalid and thus the login screen will come up?
>
>Not really. The UNC should work provided they've logged in before. If it doesn't then it means that either they haven't or there isn't an available license, etc. This is why I use the WNet... functions rather than UNCs. If I can't make a connection without a password, I can find out why. I'd first assume, of course, that they hadn't logged into a server if the UNC failed, then call the WNetConnectDialog() function to try and establish the connection. It's a relatively simple matter to determine what drives are mapped before and after the call is made, and then compare the results.
>
>The only function that I've been able to find that might be of help (LogonUser) applies only to NT. Not being an NT user, I can't test it.

Thanks, that helps. I am sure closer than before.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform