General information
Category:
Coding, syntax & commands
This may help. It's some code I got from Russell Campbell on the MS newsgroup a few days ago and it finds the UNC from a mapped drive:
MyFileName = "F:\APPS\WORD\WINWORD.EXE" && Replace with a file name on your
network drive.
DECLARE INTEGER WNetGetConnection IN win32api ;
STRING lpszLocalName,;
STRING lpszRemoteName,;
INTEGER @ lpchBuffer;
API function
slpRemoteName = SPACE(254)
slen = LEN(slpRemoteName)
iSuccess = WNetGetConnection(left(MyFileName, 2), @slpRemoteName, @slen)
IF iSuccess = 0
? MyFileName + " = " + LEFT(slpRemoteName, ATC(chr(0), slpRemoteName) -
1) + substr(MyFileName, 3)
ENDIF
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only