See the question and my original answer on StackOverflow

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.