Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 2.38 KB

NetApiBufferSize.md

File metadata and controls

74 lines (56 loc) · 2.38 KB

Home

Function name : NetApiBufferSize

Group: Network Management - Library: netapi32


The NetApiBufferSize function returns the size, in bytes, of a buffer allocated by a call to the NetApiBufferAllocate function.


Code examples:

Retrieving the name of the primary domain controller (PDC) and join status information
How to enumerate, add and delete shares on the local computer (WinNT/XP)
Enumerating global and local group accounts on a server (WinNT/XP/2K)
Retrieving configuration information for the specified server (Win2000/XP)
Obtaining names of local and global groups for current user (WinNT/XP/2K)
Using NetWkstaTransportEnum to obtain MAC Address of remote server
Retrieving configuration information for the specified workstation (Win2000/XP)
Adding and deleting User Accounts
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Using the NetMessageBufferSend to send messages on the network
Enumerating network sessions established on a server
Finding out if the current user is the Guest account

Declaration:

NET_API_STATUS NetApiBufferSize(
  LPVOID Buffer,
  LPDWORD ByteCount
);  

FoxPro declaration:

DECLARE INTEGER NetApiBufferSize IN netapi32;
	INTEGER   Buffer,;
	INTEGER @ ByteCount  

Parameters:

Buffer [in] Pointer to a buffer returned by the NetApiBufferAllocate function.

ByteCount [out] Receives the size of the buffer, in bytes.


Return value:

If the function succeeds, the return value is NERR_Success (0).


Comments:

Various NetApi functions

  • NetServerEnum
  • NetConnectionEnum
  • NetUserEnum
  • NetWkstaUserEnum
  • NetShareEnum
  • NetGetDCName
  • NetGroupEnum
  • NetLocalGroupEnum
    and more...

implicitly allocate a memory buffer and require it to be freed after the call is complete.