how to use win32wnet.WNetAddConnection2 ?

Ava ava at dde974.equipement.gouv.fr
Wed Dec 22 08:15:26 EST 1999


The first message contains an error, here is the correct one:
my apologies for the inconvenience

Hello,

Under Windows 98 and Python 1.5.2, I'm trying to use
win32wnet.WNetAddConnection2:
server is a windows NT server 4.0 SP3, member of a domain where I am logged
as user/pass.

>> import win32wnet
>> win32wnet.WNetAddConnection2(1, 'e:', '\\\\server\share$', None, 'user',
'pass')
Traceback (innermost last):
  File "<pyshell#1>", line 1, in ?
    win32wnet.WNetAddConnection2(1, 'e:', '\\\\server\share$', None, 'user',
'pass')
TypeError: argument 4: expected string, None found

this is different from the doc (in
Python/Win32/demos/win32wnet/netresource.htm), which says that Provider can
be None. Anyway:

>> win32wnet.WNetAddConnection2(1, 'e:', '\\\\server\share$', '', 'user',
'pass')
Traceback (innermost last):
  File "<pyshell#2>", line 1, in ?
    win32wnet.WNetAddConnection2(1, 'e:', '\\\\server\share$', '', 'user',
'pass')
api_error: (87, 'WNetAddConnection2', 'Param\350tre incorrect.')

Can someone tell me what I am doing wrong?

Thanks in advance,
Jephte CLAIN
minf7 at educ.univ-reunion

PS: please CC: to me, I am not on the list




More information about the Python-list mailing list