PDA

View Full Version : Get UNC from Network Drive Letter



Wayne Freeman
05-22-2007, 11:56 AM
Hi, under what circumstances would FUNCTION:Get System Information(UNC From Network Drive Letter) fail? The docs simply say that if the function fails, the destination variable will receive a "0" but the docs don't say what to do about it.

The workstation I'm testing on has a network drive letter of "H:" mapped and Windows knows the UNC of it because when I mapped the drive it showed the location as "\\DEVELOPMENT\SharedDocs". Yet, when I invoke this function, it always returns 0.

How can I troubleshoot this? Thanks!

Wayne Freeman
Analytica Business Systems
www.analyticabiz.com

linder
05-22-2007, 11:42 PM
Wayne,

This function simply calls the WNetGetConnection API:

http://msdn2.microsoft.com/en-us/library/aa385453.aspx

The next build will return the error code in the %_SB_ERROR% variable.

Friedrich

Wayne Freeman
05-23-2007, 12:12 AM
Hi Friedrich,

Ah. Having read the documentation at the link you sent, I think I have a clue.

I have a mixed environment here, and am using Samba rather than a pure LAN Manager networks services layer. That's probably confusing the issue.

I wish there was another way to get the server name. I'll wait till the next build so I can see the error returned before I spend any more energy troubleshooting this.

Thanks,

Wayne
www.analyticabiz.com

linder
05-23-2007, 12:15 AM
Hello Wayne,

The next build should be available within the next 2-3 days. We'll make the code modifications to return the "UNC From Network Drive Letter" error code in %_SB_ERROR% later today.

Thanks,
Friedrich