Results 1 to 7 of 7

Thread: Window's API to get a remote computer's name

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2001
    Location
    India
    Posts
    10

    Post Window's API to get a remote computer's name

    Hi!!

    well, i am looking for a sample code which would enable me to get a remote computer's name (which is in network) using windows API.

    thanking u,
    peri

  2. #2
    jim mcnamara
    Guest
    This enumerates (lists) the names of all the computers in the network.

    http://www.mvps.org/vbnet/code/netwo...serverenum.htm

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Jim: Do you need to be running NT is order for the code listed on your link to work? I'm running Win98, and when I tried it, I received the error message: "Can't find Dll entry point NetServerEnum in NetApi32."

  4. #4
    jim mcnamara
    Guest
    Hack - it's for NT & Win2K only. On that same site, if you look under shell programming, there is an example using the shell to enumerate the network, which works for all systems even Win95.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Jim: Duh...under your initial link, it even says under OS Restrictions that it is for WinNT. I think I need to get my eyes cleaned.

    Anyway, I got the link for Win9x, or others. The OS Restrictions for this are None. So, for those of you that might want to get the names of remote machines, but are not running WinNT or Win2K, try this link:

    http://www.mvps.org/vbnet/index.html...serverenum.htm

    Thanks Jim!!

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    I forgot to add: Click Win32 Shell once you get there. Actually, the link I just posted is the same one Jim posted. I didn't realize that until I tried it. For some odd reason, the links don't change when you change Web pages in this section, on this site.

  7. #7
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

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