Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WNetGetConnection
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
WORD WNetGetConnection(szLocalName, lpRemoteName, nBufferSize)
LPSTR szLocalName;
LPSTR lpRemoteName;
WORD FAR * nBufferSize;
 
The WNetGetConnection function returns the name of the network resource
associated with a redirected local device.
 
Parameter     Description
────────────────────────────────────────────────────────────────────────────
 
szLocalName   Points to a null-terminated string specifying the name of the
              redirected local device.
 
lpRemoteName  Points to the buffer that receives the null-terminated name of
              the remote network resource.
 
nBufferSize   Points to a variable containing the maximum number of bytes
              the buffer pointed to by lpRemoteName can hold. The function
              sets this variable to the actual number of bytes copied to the
              buffer.
 
Return Value
 
The return value is one of the following.
 
Value             Meaning
────────────────────────────────────────────────────────────────────────────
WN_BAD_POINTER    Invalid pointer.
 
WN_BAD_VALUE      The szLocalName parameter is not a valid local device.
 
WN_MORE_DATA      Buffer was too small.
 
WN_NET_ERROR      Network error.
 
WN_NOT_CONNECTED  The szLocalName parameter is not a redirected local
                  device.
 
WN_NOT_SUPPORTED  Function not supported.
 
WN_OUT_OF_MEMORY  Out of memory.
 
WN_SUCCESS        Success.
 
Comments
 
The export ordinal for this function is 12.
 
                                      ♦