General information
Category:
Windows API functions
Title:
Values Returned by Win32API With WNetAddConnection
What mean those values Returned by Win32API when I execute WNetAddConnection ?
Declare integer WNetAddConnection in WIN32API string,string,string
drive_letter = "G:"
share_name = "\\boss500\"
z=WNetAddConnection(share_name, "", Drive_Letter)
sometimes z = 1200, 85, 67 or 0
Or using this other function:
SET LIBRARY TO SYS(2004)+'FOXTOOLS.FLL' ADDITIVE
LOCAL xaddconn, xh, xservidor, xletra
xaddconn=RegFn('WNetAddConnection','CCC','I')
share_name = "\\boss500"
drive_letter = "G:"
x=CallFn(xaddconn,share_name,"",drive_letter)
? x
I know that if I put (:) at the end of the drive letter
the return value is diferrent.
Must the drive letter for those function have the (:) at the end or not ?
I'm asking because in Windows Script Host (Wscript) doesnt comes with the (:) at the end.
I havent found what the return values of WNetAddConnection mean.
Sample:
ONET = CREATEOBJECT("WScript.Network")
oNetDrives = ONET.EnumNetworkDrives
FOR lni = 0 TO oNetDrives.COUNT - 1 STEP 2
? oNetDrives.ITEM(lni)
ENDFOR
and oNetDrives.ITEM(lni) returns => "\\BOSS500\E" without (:)
Does it makes difference if Win is 9x, ou Win2K ?
Thank's in Advance
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