Opened 12 years ago

Closed 12 years ago

#2186 closed Bug (Fixed)

WinNet UDF - AddConnection Functions - Help File Issue

Reported by: MrMitchell Owned by: guinness
Milestone: Component: Documentation
Version: Severity: None
Keywords: WinNet Cc:


In the Help File, for the _WinNet_AddConnection, _WinNet_AddConnection2, _WinNet_AddConnection3 functions, for $sLocalName parameter the doc says "If 0, a connection to the network...without redirecting the local device."

I cannot get the function to work in this manner by passing a 0 as the $sLocalName parameter. The only way to get it to work is to pass either an empty string or the Null keyword. In beta either works fine. In current production, passing only an empty string works since Null keyword isn't supported yet. Either way both Help Files say pass a 0, so I believe the Help File should be updated - replacing 0 with Null and/or empty string.

This is very similar to issue #2132.

Here's code that doesn't work:
$sServer = '
$sShare = 'C$'
$sUsername = 'domain\user'
$sPassword = 'password'
$sServerShare = $sServer & $sShare
$result = _WinNet_AddConnection2(0, $sServerShare, $sUsername, $sPassword, 1)
If $result Then

ShellExecute("Connection created to ", $sServerShare)


ConsoleWrite("Unable to connect to " & $sServerShare & @CRLF)


Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by MrMitchell

comment:2 Changed 12 years ago by guinness

  • Milestone set to
  • Owner set to guinness
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [7222] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain guinness.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.