Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Networking API

Networking API

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminjsontutorialquestion
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    helsten2
    wrote on last edited by
    #1

    Is there an API which will tell me when a machine enters/leaves the network (at startup/shutdown)? If not, can anybody point me in the right direction on how to detect these events? :confused:

    A D 2 Replies Last reply
    0
    • H helsten2

      Is there an API which will tell me when a machine enters/leaves the network (at startup/shutdown)? If not, can anybody point me in the right direction on how to detect these events? :confused:

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      give more information. which computer (remote or used)? when will u meen detect this events etc. look "Service Functions" maybe get some idea

      H 1 Reply Last reply
      0
      • A Anonymous

        give more information. which computer (remote or used)? when will u meen detect this events etc. look "Service Functions" maybe get some idea

        H Offline
        H Offline
        helsten2
        wrote on last edited by
        #3

        By "detect these events" I mean detect when a machine enters/leaves the network. If a machine is equiped with a network adapter, a startup of the meachine will normally mean that the machine tries to connect. I want to capture this. If a mahine is shut down or powered off it will leave the network. I want to capture that. I hope this clarifies my question. So, to repeat, what API should I use to capture these events (real-time)? Thank U in advance!

        D 1 Reply Last reply
        0
        • H helsten2

          Is there an API which will tell me when a machine enters/leaves the network (at startup/shutdown)? If not, can anybody point me in the right direction on how to detect these events? :confused:

          D Offline
          D Offline
          dlhson
          wrote on last edited by
          #4

          Can it help you ? CAsyncSocket::IsAborted Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

          H 1 Reply Last reply
          0
          • D dlhson

            Can it help you ? CAsyncSocket::IsAborted Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

            H Offline
            H Offline
            helsten2
            wrote on last edited by
            #5

            I don't know. I just searched through my MSDN Library and could not find any documentation. Where did you find it? I assume this call is supposed to handle a machine being shut down (leaving the network). What about a new machine connecting to the network? Thank U in advance!

            1 Reply Last reply
            0
            • H helsten2

              By "detect these events" I mean detect when a machine enters/leaves the network. If a machine is equiped with a network adapter, a startup of the meachine will normally mean that the machine tries to connect. I want to capture this. If a mahine is shut down or powered off it will leave the network. I want to capture that. I hope this clarifies my question. So, to repeat, what API should I use to capture these events (real-time)? Thank U in advance!

              D Offline
              D Offline
              Daniel Lohmann
              wrote on last edited by
              #6

              If you think of "connected to the network" as beeing physically connected to the network, ther are no APIs that could give you this information. This is heavily protocol and client configuration dependend. However, if you mean that the machine establishes a session e.g. to the domain controller, you should take a look at the NetXXX Apis, especially NetSessionEnum() could be of help. However, you have to poll it, there is no ready-to-use notification mechanism available. -- Daniel Lohmann http://www.losoft.de (Hey, this page is worth looking! You can find some free and handy NT tools there :-D )

              H 1 Reply Last reply
              0
              • D Daniel Lohmann

                If you think of "connected to the network" as beeing physically connected to the network, ther are no APIs that could give you this information. This is heavily protocol and client configuration dependend. However, if you mean that the machine establishes a session e.g. to the domain controller, you should take a look at the NetXXX Apis, especially NetSessionEnum() could be of help. However, you have to poll it, there is no ready-to-use notification mechanism available. -- Daniel Lohmann http://www.losoft.de (Hey, this page is worth looking! You can find some free and handy NT tools there :-D )

                H Offline
                H Offline
                helsten2
                wrote on last edited by
                #7

                Thanks! I hoped there was a way to avoid this polling thing, but it looks like there is no way around it. Makes my real-time requirement a little bit difficult, though ....

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups