SAMPLE: Win32 Network Functions
PSS ID Number: Q103297
Article last modified on 08-29-1994

3.10

WINDOWS NT


----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Windows Software Development Kit (SDK) for Windows NT
   version 3.1
----------------------------------------------------------------------

The WINNET sample finds a connectable disk resource on the network,
connects to it, then disconnects. It demonstrates the following Win32
functions: WNetAddConnection(), WNetAddConnection2(),
WNetCancelConnection(), WNetCancelConnection2(), WNetCloseEnum(),
WNetEnumResource(), WNetGetConnection(), WNetGetLastError(), WNetGetUser(),
and WNetOpenEnum().

WINNET requires one or more network disk shares that can be used by the
machine/user-ID you are running WINNET on. Make sure that these shares are
not already connected to the machine/user-ID and do not require passwords.

IMPORTANT: Ensure that network drive W: is not in use when you run WINNET.

The Microsoft Windows NT version 3.1 operating system was not available at
the time this sample was acquired for the Microsoft Developer Network CD.
For this reason, the CD includes only the source files for the sample, not
the executable file or any DLLs. If you have Windows NT version 3.1
installed on your system, you may copy the source files to your hard drive
and invoke the Windows NT make file to build the sample.

Download WIN32NET.EXE, a self-extracting file, from the Microsoft Software
Library (MSL) on the following services:

 - CompuServe
      GO MSL
      Search for WIN32NET.EXE
      Display results and download

 - Microsoft Download Service (MSDL)
      Dial (206) 936-6735 to connect to MSDL
      Download WIN32NET.EXE

 - Internet (anonymous FTP)
      ftp ftp.microsoft.com
      Change to the \softlib\mslfiles directory
      Get WIN32NET.EXE

Additional reference words: 3.10
KBCategory: Prg
KBSubcategory: CodeSam NtwWinnet

=============================================================================

Copyright Microsoft Corporation 1994.
