User/password problems with GetVolumeNameForVolumeMountPoint() (Windows remote drive mount?)

≡放荡痞女 提交于 2019-12-06 06:07:44

Make a call to WNetAddConnection2 before trying to access the shares on the embedded box. You might need to have username in the form of MyXPEmbedded\[admin username].

You may come across issues if you have already tried to make connections to the embedded box previously. To remove any of the lingering connections you can use, from the command line - net use with the /delete option. You can also play with establishing the connection w/ net use before running your program for debugging purposes.

As far as running w/o admin privileges that will mostly have to do with where you decide to make the local mount point, but you could probably get away with just using the UNC path. Using the default administrative shares (which are enabled if "use simple file sharing" is disabled) you can access the embedded system using something like \\MyXPEmbedded\c$\some\path.

You probably need to establish at least one SMB (named pipe / file share) connection from the Vista workstation to the XP workstation, on any share with sufficient rights, like \\myXP\whatever or \\myXp\c$ or even \\myXP\icp$, prior to be able to open any network path targeting "myXP" computer.

You can do that programmatically using the WNetAddConnection2 Function, with a user name and password.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!