none
the initial state of a EVENT using CreateEvent RRS feed

  • Question

  • HANDLE WINAPI CreateEvent(
      _In_opt_  LPSECURITY_ATTRIBUTES lpEventAttributes,
      _In_      BOOL bManualReset,
      _In_      BOOL bInitialState,
      _In_opt_  LPCTSTR lpName
    );
    

    The CreateEvent function is defined above, and I notice many kinect SDKs use the following parameters:

    CreateEvent(NULL,TRUE,FALSE,NULL);

     I've see some SDK sample, though the initial state is false, but when they use some codes like

    WaitForSingleObject(m_hNextColorFrameEvent, 0);
    the return value shows that the event is signaled. But I don't see any SetEvent function in the program. I guess there might be some function setting the state to TRUE, but I'm not sure, can anyone help me, thanks a lot.

    Kang 

    Friday, October 18, 2013 5:19 PM

Answers

  • When you create the event, you pass this to the API to grab a frame. It is the Kinect runtime that will set this to notify your application that a frame is ready.

    Carmine Sirignano - MSFT

    Friday, October 18, 2013 7:58 PM

All replies