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. C / C++ / MFC
  3. Don't Want To Run Any Application...

Don't Want To Run Any Application...

Scheduled Pinned Locked Moved C / C++ / MFC
9 Posts 6 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.
  • M Offline
    M Offline
    m_codeproject
    wrote on last edited by
    #1

    Hi group, I am developing some time critical application. Now my question is " When my application starts, user can't run any application in back ground. Even it can't pres ALT+TAB. Because if windows takes some time to switch my application fails because i am reading some data at miliseconds. Now what is the programming steps which i should take for this." :confused: :confused: :confused: :confused: :confused: :confused: | :-O :rose: -------------------------------------------------- Say Whatever You Know Manish --------------------------------------------------

    L P 2 Replies Last reply
    0
    • M m_codeproject

      Hi group, I am developing some time critical application. Now my question is " When my application starts, user can't run any application in back ground. Even it can't pres ALT+TAB. Because if windows takes some time to switch my application fails because i am reading some data at miliseconds. Now what is the programming steps which i should take for this." :confused: :confused: :confused: :confused: :confused: :confused: | :-O :rose: -------------------------------------------------- Say Whatever You Know Manish --------------------------------------------------

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Don't use windows. If you have such a critical task, then a desktop OS like Windows is not suitable. Even when the user is not interfering there is no guaranty that the OS assignes enough CPU time to your application. Regards Daniel

      M 1 Reply Last reply
      0
      • L Lost User

        Don't use windows. If you have such a critical task, then a desktop OS like Windows is not suitable. Even when the user is not interfering there is no guaranty that the OS assignes enough CPU time to your application. Regards Daniel

        M Offline
        M Offline
        m_codeproject
        wrote on last edited by
        #3

        Thanx Daniel But i have no choice of using different OS. I have completed my hardware interface. It works fine when my application runs. But when user starts any other application, delays in timer interrupts occur and my application behave differently. So i want to do that no one can run any application except mine. Anyway or by doing anything he/she can't run any application... :(( :(( :(( :(( :(( :(( :(( :(( || :-O :rose: -------------------------------------------------- Say Whatever You Know Manish --------------------------------------------------

        F M 2 Replies Last reply
        0
        • M m_codeproject

          Thanx Daniel But i have no choice of using different OS. I have completed my hardware interface. It works fine when my application runs. But when user starts any other application, delays in timer interrupts occur and my application behave differently. So i want to do that no one can run any application except mine. Anyway or by doing anything he/she can't run any application... :(( :(( :(( :(( :(( :(( :(( :(( || :-O :rose: -------------------------------------------------- Say Whatever You Know Manish --------------------------------------------------

          F Offline
          F Offline
          Francisco Viella
          wrote on last edited by
          #4

          the trick is making your computer believe that your application is a screen saver, that way, no other application can run. I did this in VB :mad: some time ago. I suppose it won't be very difficult to port it to VC++ Go to the MSDN and look for this article HOWTO: Block CTRL+ALT+DEL and ALT+TAB in Windows 95 or Windows 98

          M M 2 Replies Last reply
          0
          • M m_codeproject

            Thanx Daniel But i have no choice of using different OS. I have completed my hardware interface. It works fine when my application runs. But when user starts any other application, delays in timer interrupts occur and my application behave differently. So i want to do that no one can run any application except mine. Anyway or by doing anything he/she can't run any application... :(( :(( :(( :(( :(( :(( :(( :(( || :-O :rose: -------------------------------------------------- Say Whatever You Know Manish --------------------------------------------------

            M Offline
            M Offline
            Mike Nordell
            wrote on last edited by
            #5

            > But i have no choice of using different OS. Then you have but one choice AFAICT, write it as a kernel-mode (ring 0) driver and turn off interrupts. Don't expect to make any friends or ship such a horrible hack though. You are _either_ Real-Time or Windows, it's *impossible* to have real-time demands in windows (even for device-drivers not turning off interrupts). Perhaps your hardware is either designed to be driven by a real-time "something" or it's mis-designed to be used in a preemptive OS?

            1 Reply Last reply
            0
            • M m_codeproject

              Hi group, I am developing some time critical application. Now my question is " When my application starts, user can't run any application in back ground. Even it can't pres ALT+TAB. Because if windows takes some time to switch my application fails because i am reading some data at miliseconds. Now what is the programming steps which i should take for this." :confused: :confused: :confused: :confused: :confused: :confused: | :-O :rose: -------------------------------------------------- Say Whatever You Know Manish --------------------------------------------------

              P Offline
              P Offline
              Paolo Messina
              wrote on last edited by
              #6

              Have you tried to use SetThreadPriority() and SetPriorityClass() with THREAD_PRIORITY_TIME_CRITICAL and REALTIME_PRIORITY_CLASS respectively? (If you do, don't forget to restore default priority when you don't need that anymore). Maybe that could help, but as others said Windows is not a real-time OS. I think that's the best you can do in a user-mode application. Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)

              1 Reply Last reply
              0
              • F Francisco Viella

                the trick is making your computer believe that your application is a screen saver, that way, no other application can run. I did this in VB :mad: some time ago. I suppose it won't be very difficult to port it to VC++ Go to the MSDN and look for this article HOWTO: Block CTRL+ALT+DEL and ALT+TAB in Windows 95 or Windows 98

                M Offline
                M Offline
                m_codeproject
                wrote on last edited by
                #7

                Francisco, I am happy with your answer. I will do as you suggest but if i will get ne problem i will mail you in this post. Okay. -------------------------------------------------- Say Whatever You Know Manish --------------------------------------------------

                1 Reply Last reply
                0
                • F Francisco Viella

                  the trick is making your computer believe that your application is a screen saver, that way, no other application can run. I did this in VB :mad: some time ago. I suppose it won't be very difficult to port it to VC++ Go to the MSDN and look for this article HOWTO: Block CTRL+ALT+DEL and ALT+TAB in Windows 95 or Windows 98

                  M Offline
                  M Offline
                  mProject
                  wrote on last edited by
                  #8

                  Dear I want to write application which work in 98/2000. so your article is for 98 and it works fine in 98 but what about 2000.:(( :(( -------------------------------------------------- Say Whatever You Know. Helping other people is good for health. ========= Manish ========= ---------------------------------------------------

                  F 1 Reply Last reply
                  0
                  • M mProject

                    Dear I want to write application which work in 98/2000. so your article is for 98 and it works fine in 98 but what about 2000.:(( :(( -------------------------------------------------- Say Whatever You Know. Helping other people is good for health. ========= Manish ========= ---------------------------------------------------

                    F Offline
                    F Offline
                    Francisco Viella
                    wrote on last edited by
                    #9

                    In Windows 2000 you have mucho more control on the priorities of the different processes (look at the post by Paolo Messina). I tried once (in Windows 2000) to place the seti process at realtime priority, and I can tell you it did exactly that. I could do nothing more that use that application. No switching, no mouse (keyboard still works), no paging, the closest thing you'll ever see to a real time OS in Windows.:)

                    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