Skip to content

Instantly share code, notes, and snippets.

@yardenshafir
Created December 27, 2018 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yardenshafir/8c9b2132e8b1002aac0be7d691526b7c to your computer and use it in GitHub Desktop.
Save yardenshafir/8c9b2132e8b1002aac0be7d691526b7c to your computer and use it in GitHub Desktop.
PHOST_LIST_ENTRY ExpFindHost(USHORT ExtensionId, USHORT ExtensionVersion)
{
PHOST_LIST_ENTRY entry;
for (entry == ExpHostList; ; entry = entry->Next)
{
if (entry == &ExpHostList)
{
return 0;
}
if ( *(entry->ExtensionId) == ExtensionId && *(entry->ExtensionVersion) == ExtensionVersion )
{
break;
}
}
InterlockedIncrement(entry->RefCount);
return entry;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment