printf("--[c++] jni Java_org_mozilla_xpcom_Utilities_callMethodByIndex %d\n",(int)mid);
PRLogModuleInfo *log = bcJavaGlobal::GetLog(); PR_LOG(log, PR_LOG_DEBUG, ("--[c++] jni Java_org_mozilla_xpcom_Utilities_callMethodByIndex %d\n",(int)mid));
JNIEXPORT jobject JNICALL Java_org_mozilla_xpcom_Utilities_callMethodByIndex    (JNIEnv *env, jclass clazz, jlong _oid, jint mid, jstring jiid, jlong _orb, jobjectArray args) {    bcIORB * orb = (bcIORB*) _orb;    bcOID oid = (bcOID)_oid;    nsIID iid;    printf("--[c++] jni Java_org_mozilla_xpcom_Utilities_callMethodByIndex %d\n",(int)mid);    const char * str = NULL;    str = env->GetStringUTFChars(jiid,NULL);    iid.Parse(str);    env->ReleaseStringUTFChars(jiid,str);    bcICall *call = orb->CreateCall(&iid, &oid, mid);    /*****/    nsIInterfaceInfo *interfaceInfo;    nsIInterfaceInfoManager* iimgr;    if( (iimgr = XPTI_GetInterfaceInfoManager()) != NULL) {        if (NS_FAILED(iimgr->GetInfoForIID(&iid, &interfaceInfo))) {            return NULL;  //nb exception handling        }        NS_RELEASE(iimgr);    } else {        return NULL;    }    /*****/    bcIMarshaler * m = call->GetMarshaler();    bcJavaMarshalToolkit * mt = new bcJavaMarshalToolkit((unsigned)mid, interfaceInfo, args, env, 0, orb);    mt->Marshal(m);    orb->SendReceive(call);    bcIUnMarshaler * um = call->GetUnMarshaler();//      mt->UnMarshal(um);    jobject retval;    mt->UnMarshal(um, &retval);    delete m; delete um; delete mt;//      return NULL;    return retval;}