I have an application that needs to access a share on a remote machine using the provided User name and Password, and I am making use of WNetUseConnection2 to connect to that share. the actual code was taken from here
Both of them are windows 7 64 Bit OS either a VM or a physical machine, but the issue is that on some of the machines the process is unable to access the share but in other machines it works with exactly same configurations.
when it fails, I tried to check through the Process Monitor, i see that it gives the following error:
Operation CreateFile \\;RdpDr\;:1\\199.63.65.55\MyShareName BAD NETWORK NAME
I was wondering if some one has a clue as to what is going on here, as if I use RunAS for windows explorer on that same machine and try to reach "\199.63.65.55\MyShareName" it works.
Has any one faced this issue before or have a clue as to what may be causing this on few of the machines?
Also why is it is it prefixing \\;RdpDr\;:1
to my UNC path?
Regards Kiran