Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetProcessIds() [1/2]

static int[] System.Diagnostics.NtProcessManager.GetProcessIds ( )
inlinestatic

Definition at line 131 of file NtProcessManager.cs.

132 {
133 int[] array = new int[256];
134 int needed;
135 while (true)
136 {
137 int num = array.Length * 4;
138 if (!global::Interop.Kernel32.EnumProcesses(array, num, out needed))
139 {
140 throw new Win32Exception();
141 }
142 if (needed != num)
143 {
144 break;
145 }
146 array = new int[array.Length * 2];
147 }
148 int[] array2 = new int[needed / 4];
149 Array.Copy(array, array2, array2.Length);
150 return array2;
151 }

References System.array, and System.Array.Copy().