Microsoft Knowledge Base |
|
How to Get List of Network Connections with WNetGetConnection |
|
|
Last reviewed: October 19, 1994
Article ID: Q112013 |
|
|
The information in this article applies to:
- Microsoft Test for Windows, version 2.0
SUMMARYThis article shows by example how to print a list of all the active network connections on drives A-Z. The example makes a call to the Windows API WNetGetConnection() function.
MORE INFORMATIONThe WNetGetConnection() function returns the name of the network resource associated with the specified redirected local device. UINT WNetGetConnection(lpszLocalName, lpszRemoteName, cbRemoteName)
Parameter Description lpszLocalName Points to a null-terminated string specifying the
name of the redirected local device.
lpszRemoteName Points to the buffer to receive the null-
terminated name of the remote network resource.
cbRemoteName Points to a variable specifying the maximum number
of bytes the buffer pointed to by lpszRemoteName
can hold. The function sets this variable to the
number of bytes copied to the buffer.
Step-by-Step Example
|
|
Additional reference words: 2.00
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |