rlebeau wrote:That doesn't make much sense. If you have multiple cards on the same network, they need unique IP addresses. That is enough to differentiate them. I would be surprised if they didn't support obtaining an IP address automatically from a DNS server on the local network. That would make them more plug-n-play.
Sorry, I should have explained this better. The cards are fairly basic (inexpensive) and have a default static IP address, and there is nothing in the documentation about obtaining an IP automatically. I have only tried it on 2 networks but it has shown up at its default IP in both instances. But, even if it could get an IP from the DNS server I still need the MAC address to identify the card and its location in the display.
rlebeau wrote:Are you wanting to get the MAC addresses so that you can then configure the IPs from within your software?
Yes, the software will assign an IP and set a couple of other parameters on the card based on the MAC address.
rlebeau wrote:You are not not doing any error handling when calling GetIpNetTable(). And you are not allocating the IP array correctly, either. GetIpNetTable() returns the number of *bytes* needed for the array, not the number of *elements*, like you are currently treating it.
This is my initial test code so I didn’t worry about error handling, I included it here because although it seemed to work I wasn’t confident that I was doing it right, which I was not. So thank you for correcting the code it gives me a good place to start!
Thanks again for your assistance,
Quintin