Network API
Updated Monday December 26, 2011
   
Category
Topic
Broadcasts
vb6
vb5
vb4-32
WriteFile: Broadcasting System Messages using Mailslots
Send system alerts to other 9x, ME or NT/2000/XP machines via "mailslots"  Oct 10.2002

NetMessageBufferSend: Broadcasting System Messages
Send alerts to other NT servers or workstations, or to Win9x systems running WinPopup  Jan 25.2000



Browsing
vb6
vb5
vb4-32
SHBrowseForFolder: Browse to Obtain Network Machines or Shares
How to return a share or remote computer using the familiar Browse dialog. Nov 30.1999


Computer Users and Groups
vb6
vb5
vb4-32
InitializeSecurityContext: Authenticate User via the NT Challenge Process
How to perform an NT Challenge from VB.  Mar 16.2002

NetUserGetInfo: Enumerate the User List and Obtain User Info
Code to load a list box with the users for a given PDC/BDC (or local NT machine), along with their USER_INFO_10 data.  Oct 30.2000

LookupAccountSid: Determine if the Current Process is Running Under Admin Account
Code to determine if the current user is an Admin. Apr 16.2002

NetUserSetInfo: Disable User Accounts (USER_INFO_1008)
Small routine using USER_INFO_1008 to disable a specified user's account. Dec 19.2004

NetUserSetInfo: Enable/Disable User Accounts (USER_INFO_3)
Slightly more involved, this uses a USER_INFO_3 structure to retrieve user info to allow enabling or disabling of the user account. Dec 19.2004

NetUserGetInfo: Network User Full Name and Comments
Retrieving the USER_INFO_10 data about a network user, including the user's full name.  May 05.2000

OpenUserBrowser: Add Selection of Users and Groups
Showing and retrieving user and / or group selection via the undocumented OpenUserBrowser API. Apr 15.2002

NetMessageBufferSend: Broadcasting System Messages
Send alerts to other NT servers or workstations, or to Win9x systems running WinPopup Jan 25.2000

NetLocalGroupEnum: Enumerate Local Groups
Retrieve the local groups on your NT/2000 workstation or server Apr 19.2001

NetLocalGroupEnum: Enumerate Local Groups and Descriptions
Retrieve the local groups and their descriptions on your NT/2000 workstation or server.  Apr 19.2001

NetLocalGroupGetMembers: Enumerate Local Groups and Members
Pass a machine and group name, retrieve the members of that group.  Feb 26.2002

LookupAccountName: Verify a User's Account
How to verify that a specific user is authenticated by the domain controller of local system.  Jan 21.2002



Connection
vb6
vb5
vb4-32
IsNetDrive: Determining the Connection State of a Mapped Drive
API returning the connection state of mapped drives. Dec 9.2005

InternetGetConnectedState: Determine Network Connection Type
Six wrapper routines returning system network connection information. June 10.1999

IsNetworkAlive: Determine Network Connection State
Five wrapper routines to determine whether a given network connection is currently alive.  April 20.2001

IsDestinationReachable: Determine Network QOC Info
Determine if the destination can be reached, and retrieve Quality of Connection information for the destination. March 13.2001

NetGetJoinInformation: Join Information for a Local or Remote Machine
How to determine information concerning the workgroup or domain join status of a given machine.  Jul 06.2002

NetFileEnum: Get Open File Info from a Specified Machine
Use NetFileEnum to return a listing of open files and owners on remote machines. Apr 5.2003

WNetGetUser: User, Share and Share User for Network Resources
How to determine information concerning the workgroup or domain join status of a given machine.  Jan 15.2002

WNetGetConnection: Get UNC Path for Mapped Drive
Code to resolve a local or remote UNC path from a mapped drive letter. Jul 6.2002

WNetConnectionDialog: Invoking the Map/Disconnect Drive Dialog
Code to resolve a local or remote UNC path from a mapped drive letter. Jan 4.2006



Date/Time
vb6
vb5
vb4-32
RegQueryValueEx: Identify Time Zones by Time Zone Bias
How to retrieve time zone names from the registry, and locate a zone based on the time zone bias.  Jul 08.2002

NetRemoteTOD: Get Time of Day Info for Local or Remote Machines
Examining return values from the NetRemoteTOD API. Oct 22.2001

SetSystemTime: SNTP Time Server Synchronization using Winsock
Using the Winsock control to connect to Internet Time Servers for system date/time synchronization.  Feb 3.2002

SetSystemTime: Date and Time Synchronization to a Remote Server
Use NetRemoteTOD to synchronize a local machine to a domain server.  Oct 22.2001



Domains
vb6
vb5
vb4-32
NetServerEnum: Obtain Domain/Workgroup Servers and Machines
Calling NetServerEnum to retrieve the domain machine list. May 22.2001

NetServerEnum: Get Version Info for Domain/Workgroup Servers and Machines
Calling NetServerEnum with the SERVER_INFO_101 structure to retrieve domain machine and their OS version.  May 22.2001

GetNetworkParams: Obtain Domain Registering the Local Machine
Function that returns the domain in which the local computer is registered. May 22.2001

GetNetworkParams: Host Name of the Local Machine
Function that returns the host name of the local computer. May 22.2001

NetGetJoinInformation: Join Information for a Local or Remote Machine
How to determine information concerning the workgroup or domain join status of a given machine.  Jul 06.2002



DHCP
vb6
vb5
vb4-32
GetAdaptersInfo: Determine if DHCP is Enabled
Function to return True if DHCP is enabled on the system.  Apr 25.2001

GetAdaptersInfo: Get the DHCP Server IP
Function returning the IP Address of the connected DHCP server. Apr 25.2001

GetAdaptersInfo: Get the IPs for all DHCP Servers
For multiple NICs or multiple DHCP servers, a function to return all IP addresses for all connected DHCP servers.  Apr 25.2001

IPRenewAddress: Release and Renew a DHCP IP Address
How to reset DHCP IP addresses using IPReleaseAddress and IPRenewAddress May 27.2001

URLDownloadToFile: Obtain Machine's Public IP Behind Router
Download and parse a shtml file returning the public IP address of the machine.  Jan 5.2005



DNS Servers
vb6
vb5
vb4-32
GetNetworkParams: Determine Current and Available DNS Servers
Use GetNetworkParams to return the current and available DNS servers.  Mar 5.2002



Files
vb6
vb5
vb4-32
GetSecurityDescriptorOwner: Local or Remote File or Folder Owner
GetFileSecurity, LookupAccountSid and GetSecurityDescriptorOwner return the owner of a file or a folder on a local or remote machine. Jan 17.2006

NetFileEnum: Get Open File Info from a Specified Machine
Use NetFileEnum to return a listing of open files and owners on remote machines. Apr 5.2003



FTP API
vb6
vb5
vb4-32
FtpFindFirstFile: Connect and Retrieve FTP File Listings
Using the FTP APIs to connect to a site and retrieve its file listing. Dec 17.1999

DoFileDownload: Download Files Using IE's Download Dialog
Use the Internet Explorer 'File Download' dialog in your application.  Jan 8.2000

FtpGetFile: Download Files via FTP
Adding to the FTP demo adding file download ability. Dec 17.1999

FtpFindFirstFile: Download Files via FTP with a Download Progress Callback
How to use callbacks to present a progress bar and file size transferred from a FTP download session. Oct 27.2001



IP Address
vb6
vb5
vb4-32
gethostbyname: Determine Network Host Name and IP Address
Use these simple routines to obtain the user's machine name and their IP address  Aug 27.1998

gethostbyname: Resolve Host Name to IP Address
Pass a domain name and return the IP address Mar 23.2000

gethostbyaddr: Obtain Host Name from IP Address
Pass an IP address to this routine, and retrieve the host name. May 03.2000

GetAdaptersInfo: Get the DHCP Server IP
Function returning the IP Address of the connected DHCP server.  Apr 25.2001

GetAdaptersInfo: Get the IPs for all DHCP Servers
For multiple NICs or multiple DHCP servers, a function to return all IP addresses for all connected DHCP servers.  Apr 25.2001

GetAdaptersInfo: Get the Network Adapter IP Address
Function returning the IP Address of the local adapter. NetBIOS is not required.  Apr25.2001

GetAdaptersInfo: Get IP Addresses for All Installed Network Adapters
For multiple NICs, a function to return all local IP addresses for all active adapters. NetBIOS is not required.  Apr 25.2001

URLDownloadToFile: Obtain Machine's Public IP Behind Router
Download and parse a shtml file returning the public IP address of the machine.  Jan 5.2005



IP Statistics
vb6
vb5
vb4-32
GetTcpStatistics: Obtaining a System's TCP Statistics
Method to retrieve TCP statistics for the local machine, including connections, opens, data received and sent. Feb.11.2001

GetIfTable: Local Machine Network Interface Table
Method to retrieve the MIB-II (Management Information Base) interface table information for the system. Feb.11.2001

GetIpAddrTable: IP Address Table of the Local Machine
Method to retrieve the interface–to–IP address mapping table, including subnet mask. Feb.11.2001

GetTcpTable: Local Machine TCP Connection Table
Method to retrieve the TCP connection table, including local and remote IP addresses and ports in use. Feb.11.2001



MAC Address / Network Card
vb6
vb5
vb4-32
Netbios: Determine Local Adapter MAC Address
Obtain the Medium Access Control (MAC) address for the installed network card. Aug 27.1998

SendARP: Determine Local or Remote Adapter MAC Addresses
How to obtain the MAC address from a local or remote computer's network card. Aug 20.2002

Netbios: Determine Local Adapter MAC Addresses through LANA Enumeration 
Get all MAC address for all installed (enabled w/NetBIOS) network cards. Apr 18.2004



Notifications
vb6
vb5
vb4-32
WriteFile: Broadcasting System Messages using Mailslots
Send system alerts to other 9x, ME or NT/2000/XP machines from any machine via "mailslots"  Oct 10.2002

NetMessageBufferSend: Broadcasting System Messages
Send alerts to other NT servers or workstations, or to Win9x systems running WinPopup Jan 25.2000



Passwords
vb6
vb5
NetUserGetInfo: Get User Password Age
Pass a user name and get the age of that user's password. Dec 19.2004

NetServerEnum: Get Password Age All Users on the Specified Machine
Enumerate machines on the network and retrieve all users and password ages for each Dec 19.2004



Printers
vb6
vb5
vb4-32
ConnectToPrinterDlg: Install Network Printers
Browse and connect to printers on a network.  Jan 4.2006

SetPrinter: Rename Local and Remote Printers
Using PRINTER_LEVEL4 (or PRINTER_LEVEL2) to rename either local or remote printers.  Aug 6.2005

SetPrinter: Rename Local and Remote Printers /2
An alternate method to the above, this uses a different declaration of the PRINTER_LEVEL4 structure to rename either local or remote printers. Although not shown the change should echo to a PRINTER_INFO_2 structure without too much difficulty.  Jan 13.2006



Ping / TraceRT
vb6
vb5
vb4-32
IcmpSendEcho: Ping a Machine by IP Address
Ping any IP address from your VB app with this!  Aug 27.1998

IcmpSendEcho: Ping a Machine by Host Name
Similar to the IP ping, this takes a domain name, resolves it, then pings. Mar 23.2000

IcmpSendEcho: Perform a Tracert (Trace Route) in VB
Code to perform a tracert (trace route) in VB. 
Oct 30.2000

IcmpSendEcho: Perform a Tracert (Trace Route) in VB with Host Name Resolution
Based on the same code as above, adds a function to resolve the host name for the IP traced. Oct 30.2000



Server Date/Time
vb6
vb5
vb4-32
RegQueryValueEx: Identify Time Zones by Time Zone Bias
How to retrieve time zone names from the registry, and locate a zone based on the time zone bias. Jul 8.2002

NetRemoteTOD: Get Time of Day Info for Local or Remote Machines
Examining return values from the NetRemoteTOD API.  Oct 22.2001

SetSystemTime: SNTP Time Server Synchronization using Winsock
Using the Winsock control to connect to Internet Time Servers for system date/time synchronization.  Feb 3.2002

SetSystemTime: Date and Time Synchronization to a Remote Server
Use NetRemoteTOD to synchronize a local machine to a domain server.  Oct 22.2001



Servers / Workstations
vb6
vb5
vb4-32
EnumServicesStatus: Enumerate Local or Remote Machine Services and Status
Adding NetServerEnum code, this allows viewing of services running on any NT system in the domain. May 22.2001

GetNetworkParams: Obtain Domain Registering the Local Machine
Function that returns the domain in which the local computer is registered. May 22.2001

GetNetworkParams: Host Name of the Local Machine
Function that returns the host name of the local computer. May 22.2001

InitiateSystemShutdown: Terminating Remote Windows Sessions
How to call shut down remote computers (and cancel the shutdown if needed).  Dec 8.2004

NetFileEnum: Get Open File Info from a Specified Machine
Use NetFileEnum to return a listing of open files and owners on remote machines. Apr 5.2003

NetRemoteTOD: Get Time of Day Info for Local or Remote Machines
Examining return values from the NetRemoteTOD API.  Oct 22.200

NetSessionEnum: Enumerate Sessions on a Server
Use NetSessionEnum to provide information about sessions established on a server. Jun 18.2001

NetServerEnum: Obtain Domain/Workgroup Servers and Machines
Calling NetServerEnum to retrieve the domain machine list. May 22.2001

NetServerEnum: Get Version Info for Domain/Workgroup Servers and Machines
Calling NetServerEnum with the SERVER_INFO_101 structure to retrieve domain machine and their OS version. May 22.2001

NetServerGetInfo: Configuration Info for Domain/Workgroup Servers and Machines
NetServerEnum and NetServerGetInfo combined to provide version and other info for local and remote machines running the specified type of OS software. March 10.2006

NetGetJoinInformation: Join Information for a Local or Remote Machine
How to determine information concerning the workgroup or domain join status of a given machine. Jul 6.2002

NetWkstaGetInfo: Workstation Configuration Information
Pass a server or workstation, and retrieve configuration info for the machine. Jun 26.2001

NetWkstaUserEnum: Workstation Logon Information
Pass a server or workstation, and retrieve user logon info. Jun 26.2001

NetWkstaGetInfo: Workstation Configuration and Current User  
Pass a server or workstation, and retrieve info about the machine and the logged-on user name. Jun 26.2001

NetWkstaGetInfo: Workstation Configuration and Logon Information  
Pass a server or workstation, and retrieve machine and logon information. Jun 26.2001

SetSystemTime: Date and Time Synchronization to a Remote Server
Use NetRemoteTOD to synchronize a local machine to a domain server.  Oct 22.2001

WNetEnumResource: Enumerating Local Network Resources
Obtain mapped drives on the local machine, and resolve local drive letters into the corresponding UNC path. Jun 26.2001



Security
vb6
vb5
vb4-32
InitializeSecurityContext: Authenticate User via the NT Challenge Process
How to perform an NT Challenge from VB. Mar 16.2002

LookupAccountSid: Determine if the Current Process is Running Under Admin Account
Code to determine if the owner of the current process is running under the Admin account. Apr 16.2002

IsUserAnAdmin: Determine if the Current User is an Administrator
Code to determine if the current user is an Administrator. Apr 25.2005

LookupAccountName: Verify a User's Account
How to verify that a specific user is authenticated by the domain controller of local system. Jan 21.2002

NetUserSetInfo: Disable User Accounts (USER_INFO_1008)
Small routine using USER_INFO_1008 to disable the specified user account. Dec 19.2004

NetUserSetInfo: Enable/Disable User Accounts (USER_INFO_3)
Slightly more involved, this uses a USER_INFO_3 structure to retrieve user info to allow enabling or disabling of a user account. Dec 19.2004



Services
vb6
vb5
vb4-32
EnumServicesStatus: Enumerate Local Machine Services
Basic code to call EnumServicesStatus to obtain the service list for the local machine. May 22.2001

EnumServicesStatus: Enumerate Local Machine Services and Status
Expanding on the above to add additional info returned from the EnumServicesStatus call. May 22.2001

EnumServicesStatus: Enumerate Local or Remote Machine Services and Status
Adding the NetServerEnum code, this allows viewing of services running on any NT system in the domain. May 22.2001



Shares
vb6
vb5
vb4-32
NetShareCheck: Determine Remote Folder or Device Share Status
Simple API call to test if a specific device is being shared on a local or remote machine. Aug 4.2004

WNetEnumResource: Enumerating Local Network Resources
Obtain mapped drives on the local machine, and resolve local drive letters into the corresponding UNC path. Jun 26.2001

NetConnectionEnum: Enumerating Share Connection Information
Using the NetConnectionEnum API to list connections made to a shared resource on the server or connections established from a particular computer.  Jun 18.2001

NetShareEnum: Enumerating Shared Resources on Other Machines  
Find remote machine shares, connection type, comments and resolved path using NetShareEnum.  Jun 18.2001

WNetAddConnection2: Transparently Connect to Network Shares
Several routines to connect and disconnect drives and printers. Sep 1.1998

NetShareAdd: Create a Local or Remote Share
Several routines to connect and disconnect drives and printers. Jan 21.2002

WNetGetConnection: Get UNC Path for Mapped Drive
Code to resolve a local or remote UNC path from a mapped drive letter.  Jul 6.2002



Transport Protocols
vb6
vb5
vb4-32
WSAEnumProtocols: Enumerating Installed Windows Socket Protocols
Simple API call to discover transport protocols installed on the local computer. Jan 2.2009

WSAEnumProtocols: Additional Data from Enumerated Windows Socket Protocols
More information about the collection of transport protocols and protocol chains installed on the local computer. Jan 2.2009

 



User Accounts
vb6
vb5
vb4-32
InitializeSecurityContext: Authenticate User via the NT Challenge Process
How to perform an NT Challenge from VB. Mar 16.2002

LookupAccountSid: Determine if the Current Process is Running Under Admin Account
Code to determine if the current user is an Admin. Apr 16.2002

NetUserSetInfo: Disable User Accounts (USER_INFO_1008)
Small routine using USER_INFO_1008 to disable the specified user account. Dec 19.2004

NetUserSetInfo: Enable/Disable User Accounts (USER_INFO_3)
Slightly more involved, this uses a USER_INFO_3 structure to retrieve user info to allow enabling or disabling of a user account. Dec 19.2004

NetUserGetInfo: Get User Password Age
Pass a user name and get the age of that user's password. Dec 19.2004

NetServerEnum: Get Password Age All Users on the Specified Machine
Enumerate machines on the network and retrieve all users and password ages for each Dec 19.2004

OpenUserBrowser: Add Selection of Users and Groups
Showing and retrieving user and / or group selection via the undocumented OpenUserBrowser API. Apr 15.2002

LookupAccountName: Verify a User's Account
How to verify that a specific user is authenticated by the domain controller of local system. Jan 21.2002



Windows Management Instrumentation (WMI)
vb6
vb5
Win32_NetworkAdapter: WMI Network Adapter Info
The Win32_NetworkAdapter WMI class enumerates and returns network adapters on a Windows system.  Mar 4.2002

Win32_NetworkAdapterConfiguration: WMI Network Adapter Configuration
Win32_NetworkAdapterConfiguration returns attributes and behaviours of a network adapter. This class has been extended to include extra properties and methods that support the management of the TCP/IP and Internetworking Packet Exchange (IPX) protocols. Mar 4.2002

Win32_Processor: WMI Processor Information
The Win32_Processor WMI class returns processor status and information for both single and multiprocessor machines.  Mar 4.2002



 

 
 

PayPal Link
Make payments with PayPal - it's fast, free and secure!

 
 
 
 

Copyright ©1996-2011 VBnet and Randy Birch. All Rights Reserved.
Terms of Use  |  Your Privacy

 

Hit Counter