I have several windows machines identified by ip address. I would like to write an application that query the computers remotely and gets their name. I cannot rely on DNS because it does not provide exact results.
I heard that there is a NetBIOS API that can be used, but I am not familiar with this API.
check getnameinfo
The getnameinfo function provides protocol-independent name resolution from an address to an ANSI host name and from a port number to the ANSI service name.