diff --git a/src/port/ntapi_port_name_helper.c b/src/port/ntapi_port_name_helper.c index bd55f5b..369cbd4 100644 --- a/src/port/ntapi_port_name_helper.c +++ b/src/port/ntapi_port_name_helper.c @@ -57,18 +57,12 @@ int32_t __stdcall __ntapi_tt_port_type_from_guid( { int itype; int isubtype; - const nt_guid * src_guid; - uint32_t guid_hash; - uint32_t src_hash; - - guid_hash = __ntapi->tt_buffer_crc32(0,guid,sizeof(nt_guid)); for (itype=0; itypett_buffer_crc32(0,src_guid,sizeof(nt_guid)); - - if (guid_hash == src_hash) { + if (!(__ntapi_tt_guid_compare( + &__port_guids[itype][isubtype], + guid))) { *type = (nt_port_type)itype; *subtype = (nt_port_subtype)isubtype; @@ -77,8 +71,7 @@ int32_t __stdcall __ntapi_tt_port_type_from_guid( } } - return NT_STATUS_INVALID_PARAMETER; - + return NT_STATUS_NOT_FOUND; }