[python-win32] win32net.NetUseAdd buglet (or doc buglet)

Jens B. Jorgensen jens.jorgensen at tallan.com
Sat Apr 19 11:41:21 EDT 2003


Scott Prive wrote:

>Hi Jens,
>
>Thank you for your reply and your suggestion.
>
>The reason I picked NetUseAdd() was it was what showed up in my Google
>search for "python drive map" -- I did not know about
>win32wnet.WNetAddConnection2... I'm used to wrapping shell commands in
>functions... naturally I want to get away from such silliness :-)
>
>Re: NetUseAdd(), what docs were you looking at? I could see on the
>ActiveState documentation online, that gave a brief description of the API
>NetUseAdd()...  then referred to the MSDN website for more info, which did
>show a username/password. You can see in my output, it actually *does* work
>(or seems to even if I interact with the mount manually).
>
Hmm, ok. I must have been looking at the wrong struct. The one I was 
looking at just had a password and I couldn't get the thing to work for 
me. I was referring to my copy of MSDN Library (1999! often more 
accurate as it portrays things as they are with the computers I work 
with rather than how Microsoft would like them to be).

>I just noticed the win32wnet wrappers have MUCH better documentation... is
>win32net depreciated or otherwise less desired than win32wnet (should I read
>into it that way)?
>
Actually it was the MSDN Library docs that noted that if the targeted 
platform is win32 then you can use WNetAddConnection2. Although I 
haven't used the WNet* apis very much that doc suggests to me that the 
WNet* stuff is newer.

>
>I'll work with your suggestion, thanks again. Next time I have a problem
>like this I won't assume the first API I found is the only one that can do
>the task either. :-)
>
Oh most definitely especially when it comes to the win32 apis since they 
have evolved but continue to carry much of their ancient baggage.

-- 
Jens B. Jorgensen
jens.jorgensen at tallan.com

"With a focused commitment to our clients and our people, we deliver value through customized technology solutions"  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3108 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.python.org/pipermail/python-win32/attachments/20030419/a2e3ae0e/smime.bin


More information about the Python-win32 mailing list