Home > database >  Call gethostbyname in PB
Call gethostbyname in PB

Time:09-18

In PB program calls the winsock gethostbyname to get the IP network card is used to allow the sender application can send data to the receiving end, now added network CARDS, seemingly gethostbyname couldn't get two network card IP, seeks the solution or way of thinking

CodePudding user response:

Perform ipconfig -all, written into the file, then the manual programming read file, the address analysis out

The code below
The run (" ipconfig - all & gt;> C: \ 1. TXT ")

And then parse c: \ 1. TXT can

CodePudding user response:

Gethostbyname itself is will get all the network card.
See the MSDN hostent structure.
  • Related