locked
Thread ordering groups (AvRtCreateThreadOrderingGroup terminates with error code 2) RRS feed

  • Question

  • I was hoping to try using thread ordering groups to improve performance, but it would appear that these do not work in normally configured windows (7) installations. I am getting an error (code 2 for unavailable file, which is obviously also nonsense) when trying to create a thread ordering group. It would appear that the Thread Ordering Service is not started when needed, but rather only manually... Is there any way of solving this without requiring the user to start the service manually and without requiring administrative rights? If not, the whole thing is somewhat useless for software which you might want to distribute...
    Saturday, January 22, 2011 2:00 AM

Answers

  • > Is there a way to start the thread ordering services without admin rights

    I don't think so

    > Shouldn't it start automatically

    I don't think so.  If your client is a service you could add a dependency on the ThreadOrder service; otherwise you'll need to have a component in your installer that changes the startup type of the ThreadOrder service to "Automatic" and starts it.


    Matthew van Eerde
    • Marked as answer by Joe2[[10 Monday, January 24, 2011 8:01 PM
    Monday, January 24, 2011 7:45 PM
  • http://msdn.microsoft.com/en-us/library/cc308556.aspx

    "To use the thread ordering APIs discussed in this article, make sure that the Thread Ordering Service is running. This service is not started by default."


    Matthew van Eerde
    • Marked as answer by Joe2[[10 Monday, January 24, 2011 8:03 PM
    Monday, January 24, 2011 7:54 PM

All replies

  • You're running the code here and getting "Error creating group (2)" ?

    http://msdn.microsoft.com/en-us/library/ms681962%28v=VS.85%29.aspx

     


    Matthew van Eerde
    Monday, January 24, 2011 4:56 PM
  • I'm able to reproduce the error you're seeing.  It looks like the thread ordering functions require the ThreadOrder service to be running in order to work.

    The MMCSS functions don't require the ThreadOrder service, though; just the MMCSS service.


    Matthew van Eerde
    Monday, January 24, 2011 5:02 PM
  • re first post: yes re second post: I figured out the same, but is there any way to start the thread ordering service, without admin rights? Or rather: shouldn't it start automatically, when required (i.e.: is this a bug?)?
    Monday, January 24, 2011 6:09 PM
  • > Is there a way to start the thread ordering services without admin rights

    I don't think so

    > Shouldn't it start automatically

    I don't think so.  If your client is a service you could add a dependency on the ThreadOrder service; otherwise you'll need to have a component in your installer that changes the startup type of the ThreadOrder service to "Automatic" and starts it.


    Matthew van Eerde
    • Marked as answer by Joe2[[10 Monday, January 24, 2011 8:01 PM
    Monday, January 24, 2011 7:45 PM
  • http://msdn.microsoft.com/en-us/library/cc308556.aspx

    "To use the thread ordering APIs discussed in this article, make sure that the Thread Ordering Service is running. This service is not started by default."


    Matthew van Eerde
    • Marked as answer by Joe2[[10 Monday, January 24, 2011 8:03 PM
    Monday, January 24, 2011 7:54 PM
  • Ok, doing that in the installer (when Admin rights are needed anyways) would be an option. Are there actually any programs that use thread ordering? (I don't know any)
    Monday, January 24, 2011 8:02 PM