Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return Codes when using the API to Map Drives
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00142147
Message ID:
00142234
Views:
35
>>Thanks for the info... This will definitely help me determine what is happening. Also, since I have VS 6, I now know where to look for the information next time. :-)
>>
>Hi Patric,
>
>Since Ed's already given you the details on the error codes. Perhaps, I can suggest a solution for the device not ready. I haven't tested this to see if it applies, but...
>DECLARE INTEGER SetErrorMode IN Win32API;
>  INTEGER fuErrorMode
>* 1 = SEM_FAILCRITICALERRORS
>lnoldmode = SetErrorMode(1)
>* Code here, and when done...
>= SetErrorMode(lnoldmode)
>From what you describe, a brief pause in execution, either by a short loop or a call to the Sleep() function, then a retry might do the trick.
>
>I think that the other error might be caused by an invalid user name, rather than bad password. I think that might generate an ERROR_INVALID_PASSWORD error rather than a login failure.
>
>hth,


Thanks for the response. I will try to utilize the suggesstion first thing in the morning.

After more research, I've determined that the only machines that are giving me the return code of 21 are SGI systems, not PC's, which are part of the NFS network grouping. (Please excuse my obvious lack of network savy!)

The part that is really giving me fits is that this only occurs periodically, and not always the same machine. I am racing through the mapping and unmapping rather quickly, so I think if I add some type of delay between mappings it may take care of the problem. (After I clear the modal dialog box and retry the mapping on the machine that generated the 21, it connects just fine.) This is why I really want to be able to eliminate the dialog box during the application life.

I sincerely appreciate the help from everyone. I am absolutely thrilled about getting into the API... Seems like the sky's the limit! (Well, actually the learning curve is the limit at this point!)

Thanks again, I'll have to drop off some homemade salsa next time I'm up your way!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform