Specification of ClassType.InvokeMethod says:
"The method must be member of the class type or one of its superclasses".
However, the command allows to invoke method passing an arbitrary class.
Example (pseudocode):
============================
Debuggee classes:
public class A { }
public class B {
public static void testedMethod() { }
}
============================
Debugger pseudocode:
threadId = suspendThread()
classIdA = getClassId("A")
classIdB = getClassId("B")
methodId = getMethodId(classIdB, "testedMethod")
ClassType.InvokeMethod(classIdA, threadId, methodId)
============================
Such debugger code invokes the method with error code NONE, but INVALID_METHODID is expected.