I have written a COM object using C++.
Creating the object and connecting to its events works fine if I do them both at the same time (Javascript):
var obj = WScript.CreateObject("SomeCOMClass.Object", "event_");
However the following generates this error (msdn): http://msdn.microsoft.com/en-us/library/a7tya2wc(VS.85).aspx.
var obj = WScript.CreateObject("SomeCOMClass.Object");
WScript.ConnectObject(obj, "event_");
The error description page does not describe why I cannot connect to already created objects. I would like to be able to connect to created objects because I plan on returning objects from various C++ COM functions.