Results 1 to 2 of 2

Thread: WSALookupServiceBegin/Next/End API Calls

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 1999
    Location
    Oak Park, IL, USA
    Posts
    43
    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?A...P=R2398&m=4461

    If so, I would be ever so gratefull.

    [email protected]

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Location
    quebec
    Posts
    81

    Exclamation

    If your running under win2000 you can use the

    Code:
    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

    C/C++,Delphi,VB6,Java,PB (blech!),ASP,JSP,SQL...bla bla bla and bla
    I love deadlines. I like the whooshing sound they make as they fly by.
    —Douglas Adams

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width