diff --git a/jacob/jni/Dispatch.cpp b/jacob/jni/Dispatch.cpp index aad1b75..1181895 100644 --- a/jacob/jni/Dispatch.cpp +++ b/jacob/jni/Dispatch.cpp @@ -535,6 +535,8 @@ JNIEXPORT jobject JNICALL Java_com_jacob_com_Dispatch_invokev buf = CreateErrorMsgFromInfo(hr, &excepInfo, nm); env->ReleaseStringUTFChars(name, nm); } else { + //the dispid was passed in not the name. + //make space for the id string dispIdAsName = new char[256]; // get the id string _itoa_s (dispID, dispIdAsName, 256,10);