Available Network APIs

Question:
I would like to know if I could obtain a listingof the functions in the netapi.dll file and howto declare them in VB. It would be mostappreciated.

Answer:
The API Text Viewer has the API calls available with their correct parameters for Visual Basic. As far as I know, all the network API calls begin with WNet, as in WNetAddConnection. Here is the text from the Win32API.TXT file available on your hard drive. I believe this is all of the applicable network functions, but they all appear to be in mpr.dll.

Declare Function WNetAddConnection Lib “mpr.dll” Alias “WNetAddConnectionA” (ByVal lpszNetPath As String, ByVal lpszPassword As String, ByVal lpszLocalName As String) As LongDeclare Function WNetAddConnection2 Lib “mpr.dll” Alias “WNetAddConnection2A” (lpNetResource As NETRESOURCE, ByVal lpPassword As String, ByVal lpUserName As String, ByVal dwFlags As Long) As LongDeclare Function WNetCancelConnection Lib “mpr.dll” Alias “WNetCancelConnectionA” (ByVal lpszName As String, ByVal bForce As Long) As LongDeclare Function WNetCancelConnection2 Lib “mpr.dll” Alias “WNetCancelConnection2A” (ByVal lpName As String, ByVal dwFlags As Long, ByVal fForce As Long) As LongDeclare Function WNetGetConnection Lib “mpr.dll” Alias “WNetGetConnectionA” (ByVal lpszLocalName As String, ByVal lpszRemoteName As String, cbRemoteName As Long) As LongDeclare Function WNetOpenEnum Lib “mpr.dll” Alias “WNetOpenEnumA” (ByVal dwScope As Long, ByVal dwType As Long, ByVal dwUsage As Long, lpNetResource As NETRESOURCE, lphEnum As Long) As LongDeclare Function WNetEnumResource Lib “mpr.dll” Alias “WNetEnumResourceA” (ByVal hEnum As Long, lpcCount As Long, lpBuffer As Any, lpBufferSize As Long) As LongDeclare Function WNetCloseEnum Lib “mpr.dll” Alias “WNetCloseEnum” (ByVal hEnum As Long) As LongDeclare Function WNetGetUser Lib “mpr.dll” Alias “WNetGetUserA” (ByVal lpName As String, ByVal lpUserName As String, lpnLength As Long) As LongDeclare Function WNetConnectionDialog Lib “mpr.dll” Alias “WNetConnectionDialog” (ByVal hwnd As Long, ByVal dwType As Long) As LongDeclare Function WNetDisconnectDialog Lib “mpr.dll” Alias “WNetDisconnectDialog” (ByVal hwnd As Long, ByVal dwType As Long) As LongDeclare Function WNetGetLastError Lib “mpr.dll” Alias “WNetGetLastErrorA” (lpError As Long, ByVal lpErrorBuf As String, ByVal nErrorBufSize As Long, ByVal lpNameBuf As String, ByVal nNameBufSize As Long) As Long

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may