Recent Posts

Pages: [1] 2 3 ... 10
1
General Questions / Re: Calculating my mac address
« Last post by Egil on May 23, 2018, 11:38:12 AM »
Getting the same missing ENDIF error here, but after correcting the inc file, Brians code compiled ok.
I also checked the wbemdisp.inc in my EB distro, and found the same error there. So maybe that file should be corrected in the next updated distro?


Egil



PS
Almost forgot.... nice work Anndy!
2
General Questions / Re: Calculating my mac address
« Last post by Brian Pugh on May 23, 2018, 06:40:40 AM »
Funny. I wonder if your wbemdisp.inc include file is different to mine - I don't get any compile error

And it displays nearly instantly for me

Brian
3
General Questions / Re: Calculating my mac address
« Last post by Andy on May 23, 2018, 06:27:59 AM »
Brian,

That's something to think about, good find!

I had to alter the wbemdisp.inc file to this:

Code: [Select]
$ifndef __wbemdisp_inc__
$define __wbemdisp_inc__
$endif

There was a missing EndIf.

It does state the WiFi USB adaptor was the only one connected, but it does take a few seconds before it gives the results.

Thanks,
Andy.
4
General Questions / Re: Calculating my mac address
« Last post by Brian Pugh on May 23, 2018, 06:21:49 AM »
Andy,

Have you seen this one? Don't understand it, but that's nothing new for me!

Brian
5
General Questions / Re: Calculating my mac address
« Last post by Andy on May 23, 2018, 05:24:45 AM »
Thanks guys,

That does give the type of the adaptor, it returns types 6 and 71, which is correct according to MSDN.  :)

Perhaps one final question on this:

I have 1 internal on board lan, and 1 USB WiFi adaptor.

The on board lan doesn't work (although it states in windows it's working correctly - and let's no go into why), so I use the USB WiFi adaptor for the Internet instead.

Now because I have a USB WiFi adaptor, the program also lists a "Microsoft Virtual WiFi Miniport adaptor" as well.

Now this Miniport adaptor is a "Virtual adaptor" - so the obvious question is this:

How can I tell if an adaptor is a physical one, or a virtual one?

Thanks for all your help,
Andy.






 
6
General Questions / Re: Calculating my mac address
« Last post by fasecero on May 22, 2018, 02:36:56 PM »

Congrats Andy, you have found a secret Easter egg! :) Nah, what is really happening is that 'Type' is a reserved word and in these cases Sapero was forced to change the variable name usually by putting an underscore prefix. This will happen in any BASIC dialect because by definition BASIC isn't case sensitive, so 'Next', 'NEXT', 'next' they all are the same to the compiler. On the other hand, both C and C++ are case sensitive, so 'next' is a reserved word but 'Next' isn't, so they can use it. Search for (Sapero) IP_ADAPTER_INFO header declaration and you'll see that it appears like this
Code: [Select]
type IP_ADAPTER_INFO
pointer _Next ' Next on MSDN (another reserved word)
...
UINT _Type ' Type on MSDN
...
endtype

So *p._type should do the trick.

Quote
try using pointer math -
 *p.Type is an UINT and in the structure follows *p.INDEX  which is a DWORD

It can also be done this way :)
7
General Questions / Re: Calculating my mac address
« Last post by LarryMc on May 22, 2018, 12:03:29 PM »
try using pointer math -
 *p.Type is an UINT and in the structure follows *p.INDEX  which is a DWORD
8
The Roundtable / Re: Enumerating PCs
« Last post by Brian Pugh on May 22, 2018, 11:35:51 AM »
Good man!

Updated udp.inc attached
9
The Roundtable / Re: Enumerating PCs
« Last post by billhsln on May 22, 2018, 11:34:48 AM »
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
10
The Roundtable / Re: Enumerating PCs
« Last post by Brian Pugh on May 22, 2018, 11:15:06 AM »
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
Pages: [1] 2 3 ... 10