Opened 13 years ago
Closed 12 years ago
#2186 closed Bug (Fixed)
WinNet UDF - AddConnection Functions - Help File Issue
Reported by: | MrMitchell | Owned by: | guinness |
---|---|---|---|
Milestone: | 3.3.9.5 | Component: | Documentation |
Version: | 3.3.9.4 | Severity: | None |
Keywords: | WinNet | Cc: |
Description
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 3.3.9.4 beta either works fine. In 3.3.8.1 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 = '
server\'
$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)
Else
ConsoleWrite("Unable to connect to " & $sServerShare & @CRLF)
EndIf
Attachments (0)
Change History (2)
comment:1 Changed 13 years ago by MrMitchell
comment:2 Changed 12 years ago by guinness
- Milestone set to 3.3.9.5
- Owner set to guinness
- Resolution set to Fixed
- Status changed from new to closed
Fixed by revision [7222] in version: 3.3.9.5
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.
Forgot to mention this was discovered in this thread: http://www.autoitscript.com/forum/topic/139466-solved-open-a-network-location-without-mapping