Help with LIbFunc to get UNC path

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
pasdad1
Junior Coder
Posts: 21
Joined: Wed Nov 17, 2004 1:09 am

Help with LIbFunc to get UNC path

Post by pasdad1 » Fri Jun 29, 2007 3:59 pm

I'm trying to call the following API function to get a UNC path from a drive letter. (In this case the drive letter is s:) But having trouble, it's not returning what I expect.

Anybody have a suggestion on how to fix this?
Thanks.

Code: Select all

LibLoad>mpr,hDll
LibFunc>hDll,WNetGetUniversalNameA,uncpath,str:S:,1,ref:0,ref:0
MessageModal>%uncpath_1%
MessageModal>%uncpath_2%
MessageModal>%uncpath_3%
MessageModal>%uncpath_4%
LibFree>hDll
[/code]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts