 |
NetConnectionEnum ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Lists all connections made to a shared resource on the server or all connections established from a particular computer. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
WinNT:
NET_API_STATUS NetConnectionEnum(
LPWSTR servername,
LPWSTR qualifier,
DWORD level,
LPBYTE *bufptr,
DWORD prefmaxlen,
LPDWORD entriesread,
LPDWORD totalentries,
LPDWORD resume_handle
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
WinNT:
DECLARE INTEGER NetConnectionEnum IN netapi32;
INTEGER servername,;
STRING qualifier,;
INTEGER level,;
INTEGER @ bufptr,;
INTEGER prefmaxlen,;
INTEGER @ entriesread,;
INTEGER @ totalentries,;
INTEGER @ resume_handle
|
 |
 |
 |
| Parameters: |
 |
servername
[in] Pointer to a Unicode (Windows NT/2000/XP) or ANSI (Windows 95/98/Me) string specifying the name of the remote server on which the function is to execute.
qualifier
[in] Pointer to a Unicode (Windows NT/2000/XP) or ANSI (Windows 95/98/Me) string specifying a share name or computer name for the connections of interest.
level
[in] Specifies the information level of the data.
bufptr
[out] Pointer to the address of the buffer that receives the information.
prefmaxlen
[in] Specifies the preferred maximum length of returned data, in bytes.
entriesread
[out] Pointer to a value that receives the count of elements actually enumerated.
totalentries
[out] Pointer to a value that receives the total number of entries that could have been enumerated from the current resume position.
resume_handle
[in/out] Pointer to a DWORD value that contains a resume handle which is used to continue an existing connection search. |
 |
 |
| Return value: |
 |
If the function succeeds, the return value is NERR_Success (0). If the function fails, the return value is a system error code.
|
 |
 |
| My comment: |
 |
Admin or server, print, or comm operator group membership is required to successfully execute the NetConnectionEnum function.
Different declarations for Windows NT/2000/XP, and for Windows 95/98/Me.
Windows 95/98/Me: The caller must allocate and deallocate the buffer -- bufptr.
See NET SESSION command -- WinNT, NET VIEW command - WinMe. |
 |
 |
| Word Index links for the NetConnectionEnum : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-10-22 18:51:38 | | Modified: | 2003-08-12 09:13:00 | Visited in last 7 days: 11 |