Commit c0700eef authored by Jeff Latimer's avatar Jeff Latimer Committed by Alexandre Julliard

pdh: Pass parameters through to PdhLookupPerfIndexByNameW for checking.

parent 99bde8b0
......@@ -779,23 +779,22 @@ PDH_STATUS WINAPI PdhGetRawCounterValue( PDH_HCOUNTER handle, LPDWORD type,
PDH_STATUS WINAPI PdhLookupPerfIndexByNameA( LPCSTR machine, LPCSTR name, LPDWORD index )
{
PDH_STATUS ret;
WCHAR *machineW = NULL;
WCHAR *nameW;
TRACE("%s %s %p\n", debugstr_a(machine), debugstr_a(name), index);
if (!name || !index) return PDH_INVALID_ARGUMENT;
if (!name) return PDH_INVALID_ARGUMENT;
if (machine && !(machineW = pdh_strdup_aw( machine ))) return PDH_MEMORY_ALLOCATION_FAILURE;
if (machine)
{
FIXME("remote machine not supported\n");
return PDH_CSTATUS_NO_MACHINE;
}
if (!(nameW = pdh_strdup_aw( name )))
return PDH_MEMORY_ALLOCATION_FAILURE;
ret = PdhLookupPerfIndexByNameW( NULL, nameW, index );
ret = PdhLookupPerfIndexByNameW( machineW, nameW, index );
heap_free( nameW );
heap_free( machineW );
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment