When I run the following code:
ISynchronize *sync_p;
res = CoCreateInstance(CLSID_StdEvent, NULL, CLSCTX_INPROC, IID_ISynchronize, (LPVOID *)&sync_p);
if (!SUCCEEDED(res))
_com_issue_error(res);
res = sync_p->Reset();
The final line fails with error code 0x80010120 - "There are no synchronize objects to wait on". The documentation doesn't indicate anything about what might cause this error - it's almost as if it's getting things mixed up with ISynchronizeContainer. What am I doing wrong here?