Thread: Get handle by name

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    163
    It's a waitable timer object.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by System_159 View Post
    It's a waitable timer object.
    I don't think there is a way to do that (officially).

    What are you ACTUALLY trying to do (bigger picture - you are asking how to remove a wheel-nut when you are actually wanting to fix a puncture).


    Edit: Are you even sure that the object HAS a name? Waitable Timer Objects do not HAVE to have a name, only if CreateWaitableTimerEx is used does it have a name, if one is supplied.

    --
    Mats
    Last edited by matsp; 03-16-2009 at 08:19 AM.
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    163
    Quote Originally Posted by matsp View Post
    I don't think there is a way to do that (officially).
    I didn't think so.


    Basically I have several programs that all need to be synchronized together. So for that I've got a waitable timer as a seperate program.

    Hard to get in to specifics without writing a novel(I've spent about a week and a half just deciphering the existing code to get to this point).

    edit: and Yes, one thing that I am sure of is the name of the timer

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    But if you KNOW the name, then you can use OpenWaitableTimer() to open a new handle to the timer. I suspect that is what you really want to do anyways.

    Edit: The reason I say "that's what you want to do anyways" is that going the other way around, is that I think handles are actually "process local", meaning that each process has it's own handle, that is different from the other processes that connect to the same timer.

    --
    Mats
    Last edited by matsp; 03-16-2009 at 08:28 AM.
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with setting text into LTEXT using Window Handle
    By jasperleeabc in forum Windows Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Getting other processes class names
    By Hawkin in forum Windows Programming
    Replies: 3
    Last Post: 03-20-2008, 04:02 PM
  3. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  4. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM