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

◆ Next() [2/2]

int System.Runtime.InteropServices.CustomMarshalers.EnumVariantViewOfEnumerator.Next ( int celt,
object[] rgVar,
IntPtr pceltFetched )
inline

Definition at line 28 of file EnumVariantViewOfEnumerator.cs.

29 {
30 int num = 0;
31 try
32 {
33 if (celt > 0 && rgVar == null)
34 {
35 return -2147024809;
36 }
37 while (num < celt && Enumerator.MoveNext())
38 {
39 rgVar[num++] = Enumerator.Current;
40 }
41 if (pceltFetched != IntPtr.Zero)
42 {
43 Marshal.WriteInt32(pceltFetched, num);
44 }
45 }
46 catch (Exception ex)
47 {
48 return ex.HResult;
49 }
50 if (num != celt)
51 {
52 return 1;
53 }
54 return 0;
55 }

References System.Runtime.InteropServices.CustomMarshalers.EnumVariantViewOfEnumerator.Enumerator, System.Exception.HResult, System.Runtime.InteropServices.Marshal.WriteInt32(), and System.IntPtr.Zero.