March 28, 2024, 03:31:26 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Enumerating PCs

Started by Brian, May 22, 2018, 09:55:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

May 22, 2018, 09:55:57 AM Last Edit: May 22, 2018, 09:59:25 AM by Brian Pugh
Hi,

I wrote this years ago to enumerate PCs on our 200-plus network. Came in handy at times. I have just realised it didn't include Windows 10 when enumerating. Some of the code is not mine, so whoever - thanks

It will enumerate your local PC, and if it is on a network, scans round the network. It returns the IP address and Windows versions, mainly, although I suppose more could be added

Brian

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

May 22, 2018, 11:15:06 AM #2 Last Edit: May 22, 2018, 11:20:33 AM by Brian Pugh
Here we go!

The udp.inc comes up with an error about a missing RETURN, but appears to work OK. Can't find where it should be, though

Brian

billhsln

Found the missing return.  Change:

Sub UDP_ResolveIP(name as string),string
   'get an ip address from a host name
   POINTER he
   he = gethostbyname(name)
   if he<>NULL
      return inet_ntoa(*<HostEnt>he.*<POINTER>*<POINTER>addrlist)
   EndIf
   return "Unknown"
EndSub


Bill
When all else fails, get a bigger hammer.

Brian

May 22, 2018, 11:35:51 AM #4 Last Edit: May 22, 2018, 11:45:02 AM by Brian Pugh
Good man!

Updated udp.inc attached