15 {
16 if (oids == null || oids.Count == 0)
17 {
18 numOids = 0;
19 return SafePointerHandle<SafeLocalAllocHandle>.InvalidHandle;
20 }
21 string[]
array =
new string[oids.Count];
22 for (
int i = 0;
i <
array.Length;
i++)
23 {
25 }
26 SafeLocalAllocHandle safeLocalAllocHandle;
27 checked
28 {
29 int num = array.Length * sizeof(void*);
30 string[] array2 =
array;
31 foreach (
string text in array2)
32 {
33 num += text.Length + 1;
34 }
35 safeLocalAllocHandle = SafeLocalAllocHandle.Create(num);
36 }
37 byte** ptr = (byte**)(void*)safeLocalAllocHandle.DangerousGetHandle();
38 byte* ptr2 = (
byte*)(ptr +
array.Length);
39 for (
int k = 0; k <
array.Length; k++)
40 {
41 string text2 =
array[k];
42 ptr[k] = ptr2;
44 ptr2[text2.Length] = 0;
45 ptr2 += text2.Length + 1;
46 }
47 numOids =
array.Length;
48 return safeLocalAllocHandle;
49 }