Grigori Zakharov
Grigori Zakharov
```powershell #requires -version 6 using namespace System.Reflection.Emit using namespace System.Management.Automation function New-ILMethod { [CmdletBinding()] param( [Parameter(Mandatory, Position=0)] [ValidateNotNullOrEmpty()] [String]$Code, [Parameter()][Type]$ReturnType = [void], [Parameter()][Type[]]$Parameters = @(), [Parameter()][ScriptBlock]$Variables ) process { $dm...
Works slow with huge files. Fastest way (`pwsh` is required): ```powershell using namespace System.Reflection.Emit Set-Alias -Name ent -Value Get-Entropy function Get-Entropy { [CmdletBinding()] param( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [Byte[]]$Bytes ) process {...
How about something like this? ```powershell $LARGE_INTEGER = New-Struct LARGE_INTEGER { Int64 'QuadPart 0' Int32 'LowPart 0' UInt32 'HighPart 4' } -Explicit $FILE_DIRECTORY_INFORMATION = New-Struct FILE_DIRECTORY_INFORMATION { UInt32 'NextEntryOffset' UInt32...
Hey, dude! What are crap with your `Pinvoke.cs`? It's fully filled by copypaste code. And if you don't know all sysinternals tools (except GUI which requires additional drivers as Process...