SAMPLE: Connect Net Drive--a File Manager Extension

Last reviewed: February 15, 1996
Article ID: Q99862

SUMMARY

The NETCON program sample demonstrates how to create a dynamic-link library (DLL) that will extend the File Manager application in Microsoft Windows versions 3.1 and later. The program sample exports a function called FMExtensionProc(), which File Manager sends messages to during its initialization. NETCON adds a Quick Connect menu to File Manager (in Windows for Workgroups, NETCON adds a toolbar button and a help string to be displayed in the status bar when the toolbar button is selected). When the Quick Connect menu item is selected, NECON.DLL brings up a Connect Network Drive dialog box. The program uses the following network application programming interface (API), which must be supported by the network that Windows is running on:

   - WNetAddConnection()
   - WNetGetConnection()

NETCON also maintains the MRU_Files section of WIN.INI in the exact manner that Windows for Workgroups does. Unlike the Connect Network Drive dialog box that comes with Windows for Workgroups, this dialog box does not browse for available drives during initialization, and therefore startup time may be significantly faster.

Download NETCON.EXE from the Microsoft Software Library (MSL) on the following services:

  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download NETCON.EXE (size: 27450 bytes) 
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the \SOFTLIB\MSLFILES directory
          Get NETCON.EXE (size: 27450 bytes) 
    

MORE INFORMATION

To enable File Manager to use the DLL, and the following line to the [AddOns] section of WINFILE.INI:

   Quick Net Connection = netcon.dll


Additional reference words: 3.10 softlib NETCON.EXE
KBCategory: kbprg kbfile
KBSubcategory: UsrExt


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 15, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.