GetInstances only needs PERF_DETAIL_NOVICE to get the names
This commit is contained in:
		
							parent
							
								
									14942613a3
								
							
						
					
					
						commit
						d49a0b720a
					
				@ -147,7 +147,7 @@ JNIEXPORT jobjectArray SIGAR_JNI(win32_Pdh_pdhGetInstances)
 | 
			
		||||
 | 
			
		||||
    status = PdhEnumObjectItems(NULL, NULL, counter_path, NULL,
 | 
			
		||||
                                &counter_list_size, instance_list_buf,
 | 
			
		||||
                                &instance_list_size, PERF_DETAIL_WIZARD,
 | 
			
		||||
                                &instance_list_size, PERF_DETAIL_NOVICE,
 | 
			
		||||
                                FALSE);
 | 
			
		||||
    
 | 
			
		||||
    if (status == PDH_MORE_DATA && instance_list_size > 0) {
 | 
			
		||||
@ -162,7 +162,7 @@ JNIEXPORT jobjectArray SIGAR_JNI(win32_Pdh_pdhGetInstances)
 | 
			
		||||
                                      NULL, &counter_list_size,
 | 
			
		||||
                                      instance_list_buf,
 | 
			
		||||
                                      &instance_list_size,
 | 
			
		||||
                                      PERF_DETAIL_WIZARD, FALSE);
 | 
			
		||||
                                      PERF_DETAIL_NOVICE, FALSE);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    JENV->ReleaseStringUTFChars(env, cp, counter_path);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user