enotkrutoy commited on
Commit
8e4ea49
·
verified ·
1 Parent(s): 763a1b6

Create Add-Type.ps1

Browse files
Files changed (1) hide show
  1. test/Add-Type.ps1 +19 -0
test/Add-Type.ps1 ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ${W`I`N`32} = @"
2
+ using System;
3
+ using System.Runtime.InteropServices;
4
+
5
+ public class Win32 {
6
+
7
+ [DllImport("kernel32")]
8
+ public static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
9
+
10
+ [DllImport("kernel32")]
11
+ public static extern IntPtr LoadLibrary(string name);
12
+
13
+ [DllImport("kernel32")]
14
+ public static extern bool VirtualProtect(IntPtr lpAddress, UIntPtr dwSize, uint flNewProtect, out uint lpflOldProtect);
15
+
16
+ }
17
+ "@
18
+
19
+ Add-Type ${W`IN`32}