On Wed, 7 Sep 2011 12:08:16 -0700 (PDT), Krystian <firstname.lastname@example.org> wrote:
>The problem is :
>a user start a program on his local computer (XP) and then this
>program logs on to the the directory on the server (MS 2008) and work
>on the data files (not SQL; the user name and password are set in the
>program); the user has no direct access to this data - only the
>program; when the program ends, it logs out from the server.
>How can I establish a connection to the server's resources; which Win
>API functions allow me to log in and log out to the server ?
You can use WNetAddConnection2(...) windows function to "map" a network
directory to a local drive letter and WNetCancelConnection2(...) to close it at
I haven't tried them but they look pretty easy to implement.
Amilcar A. Camargo F.
Guatemala, C. A.