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. Remote desktop

Remote desktop

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphicscode-review
6 Posts 3 Posters 1 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
    Miguel Lopes
    wrote on last edited by
    #1

    Hi all, My application needs to know if it's running through remote desktop, to optimize graphics and stuff for low bandwitdh connections. Question: How do i automatically detect that the user is running my app through remote desktop? Thanks in advance!!

    M 1 Reply Last reply
    0
    • M Miguel Lopes

      Hi all, My application needs to know if it's running through remote desktop, to optimize graphics and stuff for low bandwitdh connections. Question: How do i automatically detect that the user is running my app through remote desktop? Thanks in advance!!

      M Offline
      M Offline
      Miguel Lopes
      wrote on last edited by
      #2

      Maybe this function works: GetSystemMetrics( SM_REMOTESESSION ); which returns a bool indicating wherever the user is using RD... havent been able to test it yet...

      M 1 Reply Last reply
      0
      • M Miguel Lopes

        Maybe this function works: GetSystemMetrics( SM_REMOTESESSION ); which returns a bool indicating wherever the user is using RD... havent been able to test it yet...

        M Offline
        M Offline
        Miguel Lopes
        wrote on last edited by
        #3

        works, but the compiler refused to accept the SM_REMOTESESSION value, even including "winuser.h", where it is defined. So, i just passed the value 0x1000 :) I know its a bad policy, but im not going to waste a lot of time with compiler sh$t.

        M N 2 Replies Last reply
        0
        • M Miguel Lopes

          works, but the compiler refused to accept the SM_REMOTESESSION value, even including "winuser.h", where it is defined. So, i just passed the value 0x1000 :) I know its a bad policy, but im not going to waste a lot of time with compiler sh$t.

          M Offline
          M Offline
          Mike Dimmick
          wrote on last edited by
          #4

          Define WINVER to be 0x0500 before including any headers (typically in StdAfx.h), and ensure you're using a relatively recent Platform SDK (the headers included with VC6 don't have this definition). You can consider this a 'safety guard' to stop you accidentally using a feature not supported on older systems. Stability. What an interesting concept. -- Chris Maunder

          1 Reply Last reply
          0
          • M Miguel Lopes

            works, but the compiler refused to accept the SM_REMOTESESSION value, even including "winuser.h", where it is defined. So, i just passed the value 0x1000 :) I know its a bad policy, but im not going to waste a lot of time with compiler sh$t.

            N Offline
            N Offline
            Navin
            wrote on last edited by
            #5

            I think you have the right idea, but be careful, it just means it probably isn't supported on older verions (e.g., Windows Nt 4.0.) You could follow the suggestion to change your platform version and recompile, but I'm not sure if that means your app will fail to work on older platforms. :confused: I haven't risked it. "Fish and guests stink in three days." - Benjamin Franlkin

            M 1 Reply Last reply
            0
            • N Navin

              I think you have the right idea, but be careful, it just means it probably isn't supported on older verions (e.g., Windows Nt 4.0.) You could follow the suggestion to change your platform version and recompile, but I'm not sure if that means your app will fail to work on older platforms. :confused: I haven't risked it. "Fish and guests stink in three days." - Benjamin Franlkin

              M Offline
              M Offline
              Miguel Lopes
              wrote on last edited by
              #6

              No problem! My app is only supposed to work on win2000+. I know that in previous versions that might not work...

              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