Always review the module docs! Most of the time they are pretty clear. Even Daves books has mistakes. One that drove me nuts was the option SV_TYPE_WORKSTATION for get servers. You read Daves book and it says all NT Workstations and yet you get everything. Well what that really does is get you anything that is running the Workstation service! BTW: Dave himself explained that one. Get on the Activestate win32 perl for admins list. He watches that and usually responds to stuff.

As to your questions:

A connectible is anything that you are allowed to connect to and use(ie a share or a printer).

A container is simply an object that contains other objects(ie a domain is a container object that can contain users, computers and other objects).

This stuff is more Windows 2000 than Perl related so I can describe it offline if you need more help.

$connection is either 1 or 0. This is to tell Windows if the share is going to be a persistent connection(ie reboot and it is still there) so in your case as I saw above you don't want to perminanty mount so 0 would be good. However, dismounting is would be best. Use the

  CancelConnection($Name, $Connection, $Force)

to get rid of the connection when you are done.

$Result as used in the error message is simply used to build an error message which gets returned to the funcation caller

"Keep in mind if the user and password are blank that says to keep it local to the machine you are accessing. I don't understand."

Well I could have said that better. If you leave these blank. It will use the ID and password of the account that is logged on the computer that is running the script. Security would need to allow the access. Since this is a backup script; everything should already be set up.


In reply to Re: Re: Re: Using Win32 network shares by Marza
in thread Using Win32 network shares by John M. Dlugosz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.