| Title: | Microsoft Visual C/C++ | 
| Moderator: | PLUGH::needle | 
| Created: | Tue Mar 16 1993 | 
| Last Modified: | Wed Jun 04 1997 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 1121 | 
| Total number of notes: | 4385 | 
    
    This is a beginners question...
    
    I have to write a small 'C' program that connect to a network drive.
    I have been told to use the WNetAddConnection2 function, but from outside
    the Visual environment, I'm not aware of how to refer to this funtion
    from the command line compile and link.  (CL MYPROG.C)
    
    It fails on the linking, missing external ref. to WNetAddConnection2.
    
    In the 'C' file itself, I'm including "winnetwk.h"
    
    Can someone indicate how to do this?
    
    Thanks a lot,
    Mogens
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 1095.1 | Link with MPR.LIB | MARVIN::GLANVILLE | Fri Mar 21 1997 11:44 | 36 | |
|     
    PSS ID Number: Q102381
    Article last modified on 11-02-1995
     
    3.10 3.50 3.51 | 4.00
     
    WINDOWS NT     | WINDOWS
     
    
    ---------------------------------------------------------------------
    The information in this article applies to:
     
     - Microsoft Win32 Software Development Kit (SDK), versions 3.1, 3.5,
       3.51, and 4.0
    ---------------------------------------------------------------------
     
    The WNet* API routines are implemented in MPR.DLL. When linking an
    application that uses these routines, link with the import library
    MPR.LIB.
    For a list of which APIs can be resolved with which import libraries,
    see
    the file WIN32API.CSV, which is included in the Win32 SDK and the
    Visual
    C++ 32-bit edition.
     
    Additional reference words: 3.10 3.50 4.00 95 lnk2001
    KBCategory: kbnetwork
    KBSubcategory: NtwkWinnet
    =============================================================================
    Copyright Microsoft Corporation 1995.
    
    
    Hope this helps,
    Richard.
    
    
 | |||||