Board index » delphi » How to get informations about LAN-connections ?

How to get informations about LAN-connections ?

Hi,

I've tried to create a little Net-Watcher for (NetBeui) LAN-Connections.

The Win32api.help says something about WNet-functions...but I'm unable
to use these functions. Everytime I tried to compile I got errors or a
nonfunctional Code. :(
Example
the function
WNetGetConnection(localsizename:lptstr,remotesizename:lptstr,buffersize:lpdword):
DWORD
doesn't accept a pointer to a dword as the buffersize-argument. Delphi
means incompatible types..
If I use instead of this an integer value, compilation is possible, but
the executable causes errors.

Does anyone can explain me how I can use this functions or better which
functions or components I should use for checking of
Netbeui-Connections.

Frank

 

Re:How to get informations about LAN-connections ?


Show us (some of) the source. Then it's easier to answer your question...:-)
You can also just mail the source to me and I'll see what I can do!

--

Janus N. T?ndering
Email: janusnt<alpha>usa<dot>net
Please correct my email address if you
want to mail me....thanks

Quote
Frank Lebus wrote in message <353F6173.F3DE0...@gmx.de>...
>Hi,

>I've tried to create a little Net-Watcher for (NetBeui) LAN-Connections.

>The Win32api.help says something about WNet-functions...but I'm unable
>to use these functions. Everytime I tried to compile I got errors or a
>nonfunctional Code. :(
>Example
>the function
>WNetGetConnection(localsizename:lptstr,remotesizename:lptstr,buffersize:lpd
word):
>DWORD
>doesn't accept a pointer to a dword as the buffersize-argument. Delphi
>means incompatible types..
>If I use instead of this an integer value, compilation is possible, but
>the executable causes errors.

>Does anyone can explain me how I can use this functions or better which
>functions or components I should use for checking of
>Netbeui-Connections.

>Frank

Re:How to get informations about LAN-connections ?


The Delphi declaration of Win32 functions differ from that used in the Win32
helpfile, since the Win32 help file was written for C++. If you are useing
Delphi 3, use the code completion feature after you typed the win32 function to
see how the parameters of of the funtion is declared. According to my D3 editor
your function is declared as :

WNetGetConnection(lpLocalName:PChar, lpRemoteName:PChar, var lpnLength:integer)

Christo Crause
Thermal Separations Research
University of Stellenbosch
South Africa

Quote
>Hi,

>I've tried to create a little Net-Watcher for (NetBeui) LAN-Connections.

>The Win32api.help says something about WNet-functions...but I'm unable
>to use these functions. Everytime I tried to compile I got errors or a
>nonfunctional Code. :(
>Example
>the function
>WNetGetConnection(localsizename:lptstr,remotesizename:lptstr,buffersize:lpdwor
d):
>DWORD
>doesn't accept a pointer to a dword as the buffersize-argument. Delphi
>means incompatible types..
>If I use instead of this an integer value, compilation is possible, but
>the executable causes errors.

>Does anyone can explain me how I can use this functions or better which
>functions or components I should use for checking of
>Netbeui-Connections.

>Frank

Other Threads