| 15 | jclass g_classUdpEngine; |
| 16 | |
| 17 | jint JNI_OnLoad(JavaVM *vm, void *reserved) { |
| 18 | UNUSED(reserved); |
| 19 | |
| 20 | JNIEnv *env = NULL; |
| 21 | jint result = JNI_ERR; |
| 22 | g_jvm = vm; |
| 23 | |
| 24 | if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK) { |
| 25 | return result; |
| 26 | } |
| 27 | |
| 28 | jclass clazz = env->FindClass("com/tencent/mm/hardcoder/HardCoderJNI"); |
| 29 | g_classUdpEngine = (jclass) env->NewGlobalRef(clazz); |
| 30 | env->DeleteLocalRef(clazz); |
| 31 | |
| 32 | return JNI_VERSION_1_6; |
| 33 | } |
| 34 | |
| 35 | void c2Java_OnData(JNIEnv *envCThread, int callbackType, uint64_t requestid, uint64_t timestamp, int errCode, int funcid, int dataType, uint8_t *data, int len) { |
| 36 | if (!envCThread) { |
nothing calls this directly
no outgoing calls
no test coverage detected