Click to See Complete Forum and Search --> : WSALookupServiceBegin/Next/End API Calls
gregghoush
Aug 29th, 2000, 08:25 PM
I have found C source code for using these calls to get the DNS server ip's of the local machine. But I am no good at converting it. Anyone want to give me an example, or convert the code at: http://www.stardust.com/cgi-bin/wa?A2=ind9901&L=WINSOC&P=R2398&m=4461
If so, I would be ever so gratefull.
gregghoush@mediaone.net
hitcgar
Sep 6th, 2000, 10:26 AM
If your running under win2000 you can use the
Private Enum COMPUTER_NAME_FORMAT
ComputerNameNetBIOS = &H0
ComputerNameDnsHostname = &H1
ComputerNameDnsDomain = &H2
ComputerNameDnsFullyQualified = &H3
ComputerNamePhysicalNetBIOS = &H4
ComputerNamePhysicalDnsHostname = &H5
ComputerNamePhysicalDnsDomain = &H6
ComputerNamePhysicalDnsFullyQualified = &H7
ComputerNameMax = &H8
End Enum
Public Declare Function GetComputerNameEx Lib "kernel32" _
(NameType As COMPUTER_NAME_FORMAT, _
lpBuffer As Any, _
lpnSize As Long) As Boolean
function.
For win 9x you'll have to translate your reference C prog. Hope you're not too :confused:
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.