add PdhValidatePath wrapper

This commit is contained in:
Doug MacEachern committed 2007-03-05 21:24:03 +00:00
1 parent 98fd0fdbcc
commit c2296865e2
3 files changed
+20 -10

No files matched your search

+15
View File
@@ -70,6 +70,21 @@ static char *get_error_message(PDH_STATUS status) {
}
}
JNIEXPORT jlong SIGAR_JNI(win32_Pdh_validate)
(JNIEnv *env, jclass cur, jstring jpath)
{
PDH_STATUS status;
jboolean is_copy;
LPCTSTR path = JENV->GetStringChars(env, jpath, &is_copy);
status = PdhValidatePath(path);
if (is_copy) {
JENV->ReleaseStringChars(env, jpath, path);
}
return status;
}
JNIEXPORT void SIGAR_JNI(win32_Pdh_pdhConnectMachine)
(JNIEnv *env, jobject cur, jstring jhost)
{