c++ - Difference between WNetAddConnection2() and NetUseAdd() -
i'm mounting remote drive locally (see user/password problems getvolumenameforvolumemountpoint() (windows remote drive mount?))
question: difference between wnetaddconnection2() , netuseadd()? appears each permit assign remote drive path local drive letter providing username , password.
further, can call wnetaddconnection2() specifying local drive letter (works), or specifying "null" local drive letter, , console net use command show success mounting remote drive "nothing" locally -- expect -- i'm unsure of purpose kind of result. hope establish "logon credentials" between local system/process , remote computer other calls ::getvolumenameforvolumemountpoint() have correct username/password context, doesn't work me.
the ultimate goal mount remote drive locally without local drive letter (to local guid path share because 26 local drive letters in use), calls ::getvolumenameforvolumemountpoint() fail logon failure: unknown user name or bad password, after mount remotely local drive letter providing remote username , password (currently using wnetaddconnection2()).
netuseadd() makes connection visible in windows explorer, while wnetuseconnection() , wnetaddconnection() not make connection visible in windows explorer.
Comments
Post a Comment