On a Vista workstation, I have an embedded XP Embedded computer on which I want to programmatically mount volumes locally (for example, mount XP Embedded \\MyXPEmbedded\C:\some\path\ on a Vista workstation (installed on C:\mounted_XPEmbedded\ ).
(This is an administrative utility that runs on a Vista workstation that supports files on an XP Embedded workstation, which is part of a larger device.)
I see an XP Embedded computer from a Vista workstation. For example, I can ::getnameinfo() resolve the name of an XP Embedded computer from its IP address.
However, all calls to GetVolumeNameForVolumeMountPoint() fail (returns false ), and the formatted message ::GetLastError() looks like:
Logon failure: unknown user name or bad password
So it is clear that this is a resolution problem. However, I do not see a discussion in the Microsoft API how I can provide the user / password with these volume GUIDs.
When you browse “XP Embedded” from Windows Explorer on a Vista workstation by entering the IP address for the XP Embedded computer in the address bar, I will be asked to enter a username and password, after which I can see everything on XP Embedded (duh! How is it do it programmatically?)
QUESTION: How can I automatically specify the user name / password when working with the GUID APIs (and especially ::GetVolumeNameForVolumeMountPoint() )?
Part of the problem may be that these computers do not use the same domain (they cannot, the Vista computer will be added to the client domain, XP Embedded must be "hidden").
Other information that is probably not important:
- Vista Workstation and XP Embedded do not use the same domain (they cannot)
- The application runs on a Vista workstation with an account with administrator privileges (I assume that this is required?)
- This Vista administrator account is not available on the XP built-in computer (XP Embedded has a different administrative account)
- The clock between both computers is current (security credentials should work)
- Vista workstation has two network cards, one card is directly connected to the XP Embedded box, which has only one network card.
- Using C ++, MSVS2008
BONUS QUESTION: It would be nice if I could run this administrative utility on a Vista workstation without administrative permissions, is this possible? (I know the administrative login / password for embedded XP.)