Question

nRetVal = context.InitFromXmlFile(SAMPLE_XML_PATH, &errors);

Above is the function which results in the errors. Actually, SAMPLE_XML_PATH is xml file's path. I tried relative path and absolute path. But the error still pumps out. The return value(nRetVal) of this function is supposed to be 0 here. But the return value is 65537. This function is to read kinect information through XBOX360.

Blow is the error message.

  Failed: The parameter is incorrect. 
  [80070057] (m_pDmo -> AllocateStreamingResources())    
  m_pReader->Start():Error!

But Niviewer samples all run very well.

Is there any engineer who has bumped into this problem before? I have been struggling for this for a whole day.

Note: This program run pretty well yesterday. But the error pumps out today with similar program. (The difference between them can be ignored because I've already test it.)

I will appreciate your any answers.

Was it helpful?

Solution

When I initialize the kinectInterface handler, I use pointer to "new" a memory and commit operation on the memory.

The bad thing is the handler has never been closed if main process exit.

The Solution is put the pointer into smart pointer like "Ptr" would solve the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top