Lines Matching refs:env

58 static void jstring_to_cstring(JNIEnv* env, jstring jstr, char* cstr, int len);
132 (JNIEnv *env, jclass cls)
147 (JNIEnv *env, jclass cls)
156 array= (*env)->NewByteArray(env, (jsize)len);
158 (*env)->SetByteArrayRegion(env, array, 0, (jint)len, (jbyte*)&thread_func);
169 (JNIEnv *env, jclass cls, jint pid)
200 JNU_ThrowIOException(env, "no such process");
206 JNU_ThrowIOExceptionWithLastError(env, err_mesg);
225 JNU_ThrowByName(env, "com/sun/tools/attach/AttachNotSupportedException",
228 JNU_ThrowByName(env, "com/sun/tools/attach/AttachNotSupportedException",
244 (JNIEnv *env, jclass cls, jlong hProcess)
256 (JNIEnv *env, jclass cls, jstring pipename)
261 jstring_to_cstring(env, pipename, name, MAX_PIPE_NAME_LENGTH);
276 JNU_ThrowIOExceptionWithLastError(env, "CreateNamedPipe failed");
287 (JNIEnv *env, jclass cls, jlong hPipe)
298 (JNIEnv *env, jclass cls, jlong hPipe)
305 JNU_ThrowIOExceptionWithLastError(env, "ConnectNamedPipe failed");
315 (JNIEnv *env, jclass cls, jlong hPipe, jbyteArray ba, jint off, jint baLen)
338 JNU_ThrowIOExceptionWithLastError(env, "ReadFile");
344 (*env)->SetByteArrayRegion(env, ba, off, (jint)nread, (jbyte *)(buf+off));
358 (JNIEnv *env, jclass cls, jlong handle, jbyteArray stub, jstring cmd,
383 jstring_to_cstring(env, cmd, data.cmd, MAX_CMD_LENGTH);
384 argsLen = (*env)->GetArrayLength(env, args);
388 JNU_ThrowInternalError(env, "Too many arguments");
391 jobject obj = (*env)->GetObjectArrayElement(env, args, i);
395 jstring_to_cstring(env, obj, data.arg[i], MAX_ARG_LENGTH);
397 if ((*env)->ExceptionOccurred(env)) return;
405 jstring_to_cstring(env, pipename, data.pipename, MAX_PIPE_NAME_LENGTH);
415 JNU_ThrowIOExceptionWithLastError(env, "VirtualAllocEx failed");
421 stubLen = (DWORD)(*env)->GetArrayLength(env, stub);
422 stubCode = (*env)->GetByteArrayElements(env, stub, &isCopy);
426 JNU_ThrowIOExceptionWithLastError(env, "VirtualAllocEx failed");
432 (*env)->ReleaseByteArrayElements(env, stub, stubCode, JNI_ABORT);
447 JNU_ThrowIOExceptionWithLastError(env, "WaitForSingleObject failed");
454 JNU_ThrowIOException(env,
458 JNU_ThrowIOException(env,
462 JNU_ThrowInternalError(env,
475 JNU_ThrowIOException(env,
478 JNU_ThrowIOExceptionWithLastError(env, "CreateRemoteThread failed");
585 static void jstring_to_cstring(JNIEnv* env, jstring jstr, char* cstr, int len) {
592 str = JNU_GetStringPlatformChars(env, jstr, &isCopy);
596 JNU_ReleaseStringPlatformChars(env, jstr, str);