ensure my prog only starts in session 0

This is a discussion on ensure my prog only starts in session 0 within the Windows Programming forums, part of the Platform Specific Boards category; How do i find out what windows session my program is starting up in? I'm making a server application, and ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    329

    ensure my prog only starts in session 0

    How do i find out what windows session my program is starting up in?
    I'm making a server application, and run into problem when terminal server users are logging on:
    My program is in the startup folder, and is started many times when this happens, strange things happen then..

  2. #2
    "I Win!" by U. Lose vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,589
    Have you tried Mutex setting to check if the program is already running?
    To be or not to be == true

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    329
    No, i'm just using FindWindow() with the classname, but it doesn't seem to detect it in another session..
    will a mutex be detected? I'll check if the function i just found doesn't work: WTSGetActiveConsoleSessionId()

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Assembly amature question: prog errors
    By geek@02 in forum Tech Board
    Replies: 1
    Last Post: 10-03-2008, 01:35 PM
  2. need help making a dot bounce up and down y axis in this prog
    By redwing26 in forum Game Programming
    Replies: 10
    Last Post: 08-05-2006, 12:48 PM
  3. an option at the end of this prog to ask if I want to run again
    By bandito9111 in forum C++ Programming
    Replies: 2
    Last Post: 03-31-2003, 01:30 PM
  4. Try my prog...
    By Commander in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 05-09-2002, 07:43 AM
  5. password prog
    By ihsir in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 01-06-2002, 05:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21