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. Application requirement

Application requirement

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++databasejsonhelp
6 Posts 3 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.
  • K Offline
    K Offline
    Kogee San
    wrote on last edited by
    #1

    Hello. I have certain programming issue that need to be solved. Im creating an application under win32 console application using VC++2005 :- 1) How can i make the win32 application console invisible/hide during execution. (the black dos window is invisible) 2) Is there any API that can detect an internet connection? I want the application to detect any internet connection is available (wireless or cable). Is there any option or idea to create this mechanism? Maybe it is possible if there is an internet connection available, the application would print a message saying "internet connection available". 3) How can I do a timer in this application? This timer would trigger an event when a time comes. For instance, a message loop will appear every 5 minutes. Thanks

    D L 2 Replies Last reply
    0
    • K Kogee San

      Hello. I have certain programming issue that need to be solved. Im creating an application under win32 console application using VC++2005 :- 1) How can i make the win32 application console invisible/hide during execution. (the black dos window is invisible) 2) Is there any API that can detect an internet connection? I want the application to detect any internet connection is available (wireless or cable). Is there any option or idea to create this mechanism? Maybe it is possible if there is an internet connection available, the application would print a message saying "internet connection available". 3) How can I do a timer in this application? This timer would trigger an event when a time comes. For instance, a message loop will appear every 5 minutes. Thanks

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Muhamad Hazwan Halim wrote:

      1. Is there any API that can detect an internet connection?

      See if this helps.

      Muhamad Hazwan Halim wrote:

      1. How can I do a timer in this application? This timer would trigger an event when a time comes. For instance, a message loop will appear every 5 minutes.

      In a console application?


      "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      K 1 Reply Last reply
      0
      • K Kogee San

        Hello. I have certain programming issue that need to be solved. Im creating an application under win32 console application using VC++2005 :- 1) How can i make the win32 application console invisible/hide during execution. (the black dos window is invisible) 2) Is there any API that can detect an internet connection? I want the application to detect any internet connection is available (wireless or cable). Is there any option or idea to create this mechanism? Maybe it is possible if there is an internet connection available, the application would print a message saying "internet connection available". 3) How can I do a timer in this application? This timer would trigger an event when a time comes. For instance, a message loop will appear every 5 minutes. Thanks

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Muhamad Hazwan Halim wrote:

        How can i make the win32 application console invisible/hide during execution. (the black dos window is invisible)

        Why do you need the console window if you are just going to hide it? Maybe you want a windowless application?

        K 1 Reply Last reply
        0
        • D David Crow

          Muhamad Hazwan Halim wrote:

          1. Is there any API that can detect an internet connection?

          See if this helps.

          Muhamad Hazwan Halim wrote:

          1. How can I do a timer in this application? This timer would trigger an event when a time comes. For instance, a message loop will appear every 5 minutes.

          In a console application?


          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          K Offline
          K Offline
          Kogee San
          wrote on last edited by
          #4

          yes. In a console application. Is it possible? What im trying to do is creating such like a software agent which it is invisible to the user. So, this software agent will try to communicate with the server every 5 minutes. If there is connection, then every 5 minutes this software agent will send packets which contains information regarding the client PC. Since im not doing any graphical icons to this software agent, i created the win32 Console application. Is it possible to create a timer so it will send packets to the server every 5 minutes using win32 console application. Any API codes? Thanks

          D 1 Reply Last reply
          0
          • L led mike

            Muhamad Hazwan Halim wrote:

            How can i make the win32 application console invisible/hide during execution. (the black dos window is invisible)

            Why do you need the console window if you are just going to hide it? Maybe you want a windowless application?

            K Offline
            K Offline
            Kogee San
            wrote on last edited by
            #5

            Actually i have receive several opinion from google and also other forums saying that why do i need a console application if we were just going to hide it. Thinking and thinking i still could not understand why. :) . As for my application here, actually what im trying to do is a software agent which will communicate and send information packets to the server for every 5 minutes. (This is where i need a timer to solve this). So this software agent is located at client side where it must be invisible to the user for security reason. The reason i choose win32 Console application as the client application side (software agent) is because I dont have any intention to put any graphical icon to the application. It is pure text based. So I just wanna hide the dos window (text based) so that user did not even know that the program is running background. Is there any option @ API that can help me accomplish this requirement?

            1 Reply Last reply
            0
            • K Kogee San

              yes. In a console application. Is it possible? What im trying to do is creating such like a software agent which it is invisible to the user. So, this software agent will try to communicate with the server every 5 minutes. If there is connection, then every 5 minutes this software agent will send packets which contains information regarding the client PC. Since im not doing any graphical icons to this software agent, i created the win32 Console application. Is it possible to create a timer so it will send packets to the server every 5 minutes using win32 console application. Any API codes? Thanks

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Muhamad Hazwan Halim wrote:

              Is it possible to create a timer so it will send packets to the server every 5 minutes using win32 console application.

              Yes. You can use Sleep(300000) for this. When it returns from sleeping, send the packets.


              "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              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