Using Win32 functions in Visual FoxPro Image Gallery
Network Management
..msdn
NetApiBufferFree
NetApiBufferSize
NetConnectionEnum
NetFileClose
NetFileEnum
NetFileGetInfo
NetGetDCName
NetGroupEnum
NetLocalGroupEnum
NetMessageBufferSend
NetMessageNameAdd
NetMessageNameDel
NetMessageNameEnum
NetScheduleJobAdd
NetScheduleJobDel
NetScheduleJobEnum
NetServerEnum
NetServerGetInfo
NetSessionEnum
NetShareAdd
NetShareDel
NetShareEnum
NetShareSetInfo
NetUserAdd
NetUserChangePassword
NetUserDel
NetUserEnum
NetUserGetGroups
NetUserGetInfo
NetUserGetLocalGroups
NetUserSetInfo
NetWkstaGetInfo
NetWkstaTransportEnum
NetWkstaUserEnum
Code examples:
Enumerating network sessions established on a server
NetSessionEnum
..msdn    Add comment     W32 Constants      Translate this page
Provides information about sessions established on a server.
Code examples:
Enumerating network sessions established on a server
Declaration:
NET_API_STATUS NetSessionEnum(
  LPWSTR servername,
  LPWSTR UncClientName,
  LPWSTR username,
  DWORD level,
  LPBYTE* bufptr,
  DWORD prefmaxlen,
  LPDWORD entriesread,
  LPDWORD totalentries,
  LPDWORD resume_handle
);
FoxPro declaration:
DECLARE INTEGER NetSessionEnum IN Netapi32;
    STRING servername,;
    STRING UncClientName,;
    STRING username,;
    LONG lvl,;
    INTEGER @bufptr,;
    LONG prefmaxlen,;
    LONG @entriesread,;
    LONG @totalentries,;
    LONG @resume_handle
Parameters:
servername
[in] Pointer to a string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.

UncClientName
[in] Pointer to a string that specifies the name of the computer session for which information is to be returned. If this parameter is NULL, NetSessionEnum returns information for all computer sessions on the server.

username
[in] Pointer to a string that specifies the name of the user for which information is to be returned. If this parameter is NULL, NetSessionEnum returns information for all users.

level
[in] Specifies the information level of the data.

bufptr
[out] Pointer to the buffer that receives the data. The format of this data depends on the value of the level parameter.

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 value that contains a resume handle which is used to continue an existing session search.
Return value:
If the function succeeds, the return value is NERR_Success (0).
My comment:
Buffer bufptr is allocated by the system and must be freed using the NetApiBufferFree function.
Word Index links for the NetSessionEnum :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-01-26 21:24:19
Modified: 2006-01-26 21:27:37
Visited in last 7 days: 15
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.167.250.64)
3 sec.Function: 'GdipRotateWorldTransform'
7 sec.Function: 'capCreateCaptureWindow'
10 sec.Function: 'GetDefaultPrinter'
14 sec.Function: 'SetBkColor'
18 sec.Function: 'WTSSendMessage'
22 sec.Function: 'SCardListCards'
26 sec.Function: 'EnumDeviceDrivers'
31 sec.Function: 'mixerSetControlDetails'
34 sec.Function: 'CeRegDeleteKey'
38 sec.Function: 'ReportEvent'
Google
Advertise here!