Thread: GetThreadId(HANDLE).

  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    16

    GetThreadId(HANDLE).

    hello,

    just a quick question (i hope :P) about the GetThreadId() function in devcpp. well for me, its not there. i looked it up in msdn as way to get the id of a thread for which i have a handle to, and i went to use it and it wasnt defined. so i looked where it was defined (in winbase.h) and its not even there.

    does anyone know an alternative to this function, or something i can do to get access to this function?

    thanks

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    The GetThreadId function has very little to do with devcpp. It's a minor detail, but if you don't understand that we're talking about the wrong problem.

    Are you using Windows Server 2003? I doubt it, and that could be your problem. Have a look at the requirements section.

    The "See Also" section immediately below might help you out with finding an alternative.

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    16
    um, i dont think my operating system is effecting that.

    im using windows xp. and the problem is that when i try to compile a program that has GetThreadId(HANDLE) in it, i get an undefined reference error.

  4. #4
    Registered User
    Join Date
    Jun 2004
    Posts
    722
    http://msdn.microsoft.com/library/de...etthreadid.asp
    Requirements

    Server: Requires Windows Server 2003.
    ...
    DevCpp uses MinGW as compiler env. Therefore it's a MinGW problem, not to have that function compiled and available to link.
    Last edited by xErath; 12-07-2004 at 04:09 PM.

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    The adapted SDK that comes with MingW is probably just a little outdated, so that the function you want is not available.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #6
    Registered User
    Join Date
    Oct 2004
    Posts
    16
    o, ok lol i didnt see that <requires windows server 2003>, is there anyway to get the id of a thread?

  7. #7
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640
    http://msdn.microsoft.com/library/de...mprocesses.asp

    Check that link out, I think it's what you want.
    Client: Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0.
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  8. #8
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Typically, if you have a thread HANDLE you also have its ID. How are you getting a thread handle without an id?

Popular pages Recent additions subscribe to a feed