Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Multi-threading in C++

I am trying to create a game engine using multiple threads and Direct X. I can't figure out how to create a new thread using Direct X. If anyone knows how and is willing too tell me I would really appreciate it? Thanx

Comments

  • sumn79sumn79 Member Posts: 6
    : I am trying to create a game engine using multiple threads and Direct X. I can't figure out how to create a new thread using Direct X. If anyone knows how and is willing too tell me I would really appreciate it? Thanx
    :

    code :
    //this is the thread function
    void HandleNotifications(LPDWORD )
    {
    //any code
    }
    //////////add this to your main
    DWORD dwThreadID;
    HANDLE thread;
    if ((thread=CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)HandleNotifications, NULL, 0, &dwThreadID)) == NULL)
    return FALSE;
    SetThreadPriority(thread, THREAD_PRIORITY_LOWEST );
    ResumeThread(thread);
    /////////
Sign In or Register to comment.