IRunningObjectTable.Register always sets pdwRegister to 65536, an invalid value
问题 I'm using IRunningObjectTable.Register and IRunningObjectTable.Revoke as shown in this tutorial. My VBScript client initially calls methods no problem, but when the C# COM server disposes, I always receive a "Value does not fall within the expected range" exception. This is due to the commented line below: private const int ACTIVEOBJECT_STRONG = 0x0; [DllImport("ole32.dll")] private static extern int CreateBindCtx(int reserved, out IBindCtx bindCtx); [DllImport("oleaut32.dll")] private static