Функция _WinNet_AddConnection

 ↑  ←  Описание функции


_WinNet_AddConnection

Connects a local device to a network resource

#include <WinNet.au3>
_WinNet_AddConnection($sLocalName, $sRemoteName [, $sPassword = 0])

Параметры

$sLocalName Name of a local device to be redirected, such as "F:" or "LPT1". The string is treated in a
    case-insensitive manner. If 0, a connection to the network resource is made without redirecting the local
    device.
$sRemoteName Name of the network resource to connect to
$sPassword [необязательный] Password to be used to make a connection. This parameter is usually the password associated
    with the current user. If 0, the default password is used. If the string is empty, no password is used.

Возвращаемое значение

Успех:Возвращает True
Ошибка:Возвращает False

Примечания

This function is provided only for compatibility with 16-bit versions of Windows. Applications should call the
WNet_AddConnection2 or the WNet_AddConnection3 function. A successful connection is persistent meaning that
the system automatically restores the connection during subsequent logon operations.

См. также

_WinNet_AddConnection2, _WinNet_AddConnection3

См. также

Искать WNetAddConnection в библиотеке MSDN