Well, I've managed to get my sink connected to the IMJAutomationEvents source, or at least it returns a valid cookie when I Advise(...) the ConnectionPoint, so I think it's connected
.
But, I'm still not receiving the Event notifications correctly. Maybe
John Gateley can answer this since he seems to be the one who wrote the VB version.
What function will be called by MC in my class? Does it need to be exposed in the interface or just a public function? The VC Wizard hasn't made it work even when I use the "Implement Interface" wizard.
According to the Type Library, it looks like I should have a function with the prototype:
HRESULT FireMJEvent(BSTR type, BSTR param1, BSTR param2)
But I've done that and nothing is received. I've also tried void (as generated by the Wizard) and _bstr_t, in all the combinations. It's a public function, and I even tried exposing it on the interface, all to no avail. I even tried just MJEvent in case the Fire wasn't needed (similar to Fire_MJEvent ??). I've compared the functions to those used in the Encoder plugins, but since it's the reverse direction, I can't quite figure it out.
Any help would be appreciated, if anyone has a running MC event handler in C++.