I am using WNetAddConnection to temporarily map to remote drives, gather some various file info, then disconnect using WNetCancelConnection. Everything works wonderfully, most of the time. I OCCASSIONALLY receive an error (1326) from a few of the remote resources, but not always the same ones and not consistently. (I have an input form that has a cmd button that allows the user to immediately "test" the resource they have specified.) Today I tested one that has sometimes given me problems and received an error (again 1326). I went to a DOS prompt, performed a NET USE (with the exact same info I use in the API call) and it connected fine. I disconnected, went back to my form, clicked the test button and it connected fine. The application is running on NT Workstation 4.0 and is attempting to map to resources running the same OS.
Does this sound like some type of timing issue? (A few of the remote drives have a persistent map and they have NEVER failed to connect.) Is there something I am missing?
TIA,