Jeff Latimer : pdh: Pass parameters through to PdhLookupPerfIndexByNameW for checking.
Module: wine Branch: master Commit: c0700eeff30e80d46f21b3e3890c77df0f09b1ab URL: http://source.winehq.org/git/wine.git/?a=commit;h=c0700eeff30e80d46f21b3e389... Author: Jeff Latimer <lats(a)yless4u.com.au> Date: Tue Feb 19 21:17:19 2008 +1100 pdh: Pass parameters through to PdhLookupPerfIndexByNameW for checking. --- dlls/pdh/pdh_main.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index f2ecc89..423f033 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -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; }
participants (1)
-
Alexandre Julliard