terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
Marshal.cs
Go to the documentation of this file.
1using System;
9
11{
12 // Token: 0x02000450 RID: 1104
13 public static class Marshal
14 {
15 // Token: 0x060021AA RID: 8618 RVA: 0x0000207A File Offset: 0x0000027A
16 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
17 public static IntPtr AllocHGlobal(IntPtr cb)
18 {
19 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
20 }
21
22 // Token: 0x060021AB RID: 8619 RVA: 0x0004C53C File Offset: 0x0004A73C
23 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
24 public static IntPtr AllocHGlobal(int cb)
25 {
26 return (IntPtr)0;
27 }
28
29 // Token: 0x060021AC RID: 8620 RVA: 0x0004C550 File Offset: 0x0004A750
33
34 // Token: 0x060021AD RID: 8621 RVA: 0x0004C560 File Offset: 0x0004A760
35 private static bool skip_fixed(Array array, int startIndex)
36 {
37 return true;
38 }
39
40 // Token: 0x060021AE RID: 8622 RVA: 0x0004C570 File Offset: 0x0004A770
41 internal static void copy_to_unmanaged(byte[] source, int startIndex, IntPtr destination, int length)
42 {
43 int num = 1;
44 if (num != 0)
45 {
46 return;
47 }
48 if (num == 0)
49 {
50 return;
51 }
52 }
53
54 // Token: 0x060021AF RID: 8623 RVA: 0x0004C58C File Offset: 0x0004A78C
55 public static void Copy(byte[] source, int startIndex, IntPtr destination, int length)
56 {
57 int num = 1;
58 if (num != 0)
59 {
60 return;
61 }
62 if (num == 0)
63 {
64 }
65 }
66
67 // Token: 0x060021B0 RID: 8624 RVA: 0x0004C5B0 File Offset: 0x0004A7B0
69 {
70 if (!true)
71 {
72 }
73 }
74
75 // Token: 0x060021B1 RID: 8625 RVA: 0x0004C5C0 File Offset: 0x0004A7C0
79
80 // Token: 0x060021B2 RID: 8626 RVA: 0x0004C5D0 File Offset: 0x0004A7D0
81 public static void Copy(IntPtr source, byte[] destination, int startIndex, int length)
82 {
83 int num = 1;
84 if (num != 0)
85 {
86 return;
87 }
88 if (num == 0)
89 {
90 }
91 }
92
93 // Token: 0x060021B3 RID: 8627 RVA: 0x0004C5F4 File Offset: 0x0004A7F4
94 public static void Copy(IntPtr source, char[] destination, int startIndex, int length)
95 {
96 int num = 1;
97 if (num != 0)
98 {
99 return;
100 }
101 if (num == 0)
102 {
103 }
104 }
105
106 // Token: 0x060021B4 RID: 8628 RVA: 0x0004C618 File Offset: 0x0004A818
107 public static void Copy(IntPtr source, short[] destination, int startIndex, int length)
108 {
109 int num = 1;
110 if (num != 0)
111 {
112 return;
113 }
114 if (num == 0)
115 {
116 }
117 }
118
119 // Token: 0x060021B5 RID: 8629 RVA: 0x0004C63C File Offset: 0x0004A83C
120 public static void Copy(IntPtr source, int[] destination, int startIndex, int length)
121 {
122 int num = 1;
123 if (num != 0)
124 {
125 return;
126 }
127 if (num == 0)
128 {
129 }
130 }
131
132 // Token: 0x060021B6 RID: 8630 RVA: 0x0004C660 File Offset: 0x0004A860
133 public static void FreeBSTR(IntPtr ptr)
134 {
135 }
136
137 // Token: 0x060021B7 RID: 8631 RVA: 0x0004C670 File Offset: 0x0004A870
138 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
139 public static void FreeHGlobal(IntPtr hglobal)
140 {
141 }
142
143 // Token: 0x060021B8 RID: 8632 RVA: 0x0004C680 File Offset: 0x0004A880
144 private unsafe static void ClearBSTR(IntPtr ptr)
145 {
146 int num = 1;
147 if (num == 0)
148 {
149 }
150 long num2 = 0L;
151 if (num == 0)
152 {
153 }
154 void* ptr2 = (void*)IntPtr.Add(ptr, (int)num2);
155 }
156
157 // Token: 0x060021B9 RID: 8633 RVA: 0x0004C6A4 File Offset: 0x0004A8A4
158 public static void ZeroFreeBSTR(IntPtr s)
159 {
160 if (!true)
161 {
162 }
164 }
165
166 // Token: 0x060021BA RID: 8634 RVA: 0x0004C6BC File Offset: 0x0004A8BC
167 private unsafe static void ClearAnsi(IntPtr ptr)
168 {
169 int num = 1;
170 long num2 = 0L;
171 if (num == 0)
172 {
173 }
174 void* ptr2 = (void*)ptr;
175 if (num != 0)
176 {
177 if (num == 0)
178 {
179 }
180 void* ptr3 = (void*)IntPtr.Add(ptr, (int)num2);
181 return;
182 }
183 }
184
185 // Token: 0x060021BB RID: 8635 RVA: 0x0004C6EC File Offset: 0x0004A8EC
186 private static void ClearUnicode(IntPtr ptr)
187 {
188 int num = 1;
189 long num2 = 0L;
190 if (num == 0)
191 {
192 }
193 short num3 = Marshal.ReadInt16(ptr, (int)num2);
194 if (num == 0)
195 {
196 }
197 long num4 = 0L;
198 Marshal.WriteInt16(ptr, (int)num2, (short)num4);
199 }
200
201 // Token: 0x060021BC RID: 8636 RVA: 0x0004C718 File Offset: 0x0004A918
202 public static void ZeroFreeGlobalAllocAnsi(IntPtr s)
203 {
204 if (!true)
205 {
206 }
208 }
209
210 // Token: 0x060021BD RID: 8637 RVA: 0x0004C730 File Offset: 0x0004A930
212 {
213 if (!true)
214 {
215 }
217 }
218
219 // Token: 0x060021BE RID: 8638 RVA: 0x0000207A File Offset: 0x0000027A
220 public static int GetHRForException(Exception e)
221 {
222 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
223 }
224
225 // Token: 0x060021BF RID: 8639 RVA: 0x0004C748 File Offset: 0x0004A948
226 public static bool IsComObject(object o)
227 {
228 }
229
230 // Token: 0x060021C0 RID: 8640 RVA: 0x0000207A File Offset: 0x0000027A
231 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
232 public static int GetLastWin32Error()
233 {
234 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
235 }
236
237 // Token: 0x060021C1 RID: 8641 RVA: 0x0000207A File Offset: 0x0000027A
238 public static string PtrToStringAnsi(IntPtr ptr)
239 {
240 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
241 }
242
243 // Token: 0x060021C2 RID: 8642 RVA: 0x0000207A File Offset: 0x0000027A
244 public static string PtrToStringUni(IntPtr ptr)
245 {
246 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
247 }
248
249 // Token: 0x060021C3 RID: 8643 RVA: 0x0000207A File Offset: 0x0000027A
250 [ComVisible(true)]
252 {
253 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
254 }
255
256 // Token: 0x060021C4 RID: 8644 RVA: 0x0004C758 File Offset: 0x0004A958
257 public static T PtrToStructure<T>(IntPtr ptr)
258 {
259 object obj;
260 while (obj != null)
261 {
262 if (obj == null)
263 {
264 throw new InvalidCastException();
265 }
266 }
267 }
268
269 // Token: 0x060021C5 RID: 8645 RVA: 0x0000207A File Offset: 0x0000027A
270 public static byte ReadByte(IntPtr ptr, int ofs)
271 {
272 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
273 }
274
275 // Token: 0x060021C6 RID: 8646 RVA: 0x0000207A File Offset: 0x0000027A
276 public static short ReadInt16(IntPtr ptr, int ofs)
277 {
278 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
279 }
280
281 // Token: 0x060021C7 RID: 8647 RVA: 0x0000207A File Offset: 0x0000027A
282 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
283 public static int ReadInt32(IntPtr ptr, int ofs)
284 {
285 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
286 }
287
288 // Token: 0x060021C8 RID: 8648 RVA: 0x0000207A File Offset: 0x0000027A
289 private unsafe static IntPtr StringToHGlobalAnsi(char* s, int length)
290 {
291 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
292 }
293
294 // Token: 0x060021C9 RID: 8649 RVA: 0x0004C774 File Offset: 0x0004A974
295 public static IntPtr StringToHGlobalAnsi(string s)
296 {
297 /*
298An exception occurred when decompiling this method (060021C9)
299
300ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IntPtr System.Runtime.InteropServices.Marshal::StringToHGlobalAnsi(System.String)
301
302 ---> System.Exception: Basic block has to end with unconditional control flow.
303{
304 IL_0000:
305 brtrue(IL_0000, ldc.i4:bool(1))
306}
307
308 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
309 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
310 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
311 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
312 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
313 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
314 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
315 --- End of inner exception stack trace ---
316 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
317 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
318*/;
319 }
320
321 // Token: 0x060021CA RID: 8650 RVA: 0x0004C784 File Offset: 0x0004A984
323 {
324 byte[] array;
325 while (array == null)
326 {
327 }
328 }
329
330 // Token: 0x060021CB RID: 8651 RVA: 0x0004C798 File Offset: 0x0004A998
331 internal static IntPtr SecureStringGlobalAllocator(int len)
332 {
333 if (!true)
334 {
335 }
336 return Marshal.AllocHGlobal(0);
337 }
338
339 // Token: 0x060021CC RID: 8652 RVA: 0x0004C7B0 File Offset: 0x0004A9B0
341 {
342 int num = 1;
343 byte[] data = s.data;
344 long num2 = 0L;
345 int num3;
346 Marshal.WriteInt16(num, (int)num2, (short)num3);
347 if (num == 0)
348 {
349 }
350 long num4 = 0L;
351 Marshal.WriteInt16(num, (int)num2, (short)num4);
352 if (!false)
353 {
354 }
355 throw new OutOfMemoryException();
356 }
357
358 // Token: 0x060021CD RID: 8653 RVA: 0x0004C808 File Offset: 0x0004AA08
360 {
362 return intPtr;
363 }
364
365 // Token: 0x060021CE RID: 8654 RVA: 0x0004C818 File Offset: 0x0004AA18
366 [ComVisible(true)]
367 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
368 public static void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld)
369 {
370 }
371
372 // Token: 0x060021CF RID: 8655 RVA: 0x0004C828 File Offset: 0x0004AA28
373 public static void StructureToPtr<T>(T structure, IntPtr ptr, bool fDeleteOld)
374 {
375 if (!true)
376 {
377 }
378 }
379
380 // Token: 0x060021D0 RID: 8656 RVA: 0x0000207A File Offset: 0x0000027A
381 private unsafe static IntPtr BufferToBSTR(char* ptr, int slen)
382 {
383 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
384 }
385
386 // Token: 0x060021D1 RID: 8657 RVA: 0x0000207A File Offset: 0x0000027A
388 {
389 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
390 }
391
392 // Token: 0x060021D2 RID: 8658 RVA: 0x0004C838 File Offset: 0x0004AA38
394 {
395 if (!true)
396 {
397 }
399 return intPtr;
400 }
401
402 // Token: 0x060021D3 RID: 8659 RVA: 0x0004C84C File Offset: 0x0004AA4C
403 public unsafe static void WriteByte(IntPtr ptr, int ofs, byte val)
404 {
405 void* ptr2 = (void*)IntPtr.Add(ptr, ofs);
406 }
407
408 // Token: 0x060021D4 RID: 8660 RVA: 0x0004C868 File Offset: 0x0004AA68
409 public unsafe static void WriteInt16(IntPtr ptr, int ofs, short val)
410 {
411 void* ptr2 = (void*)ptr;
412 }
413
414 // Token: 0x060021D5 RID: 8661 RVA: 0x0000207A File Offset: 0x0000027A
416 {
417 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
418 }
419
420 // Token: 0x060021D6 RID: 8662 RVA: 0x0004C880 File Offset: 0x0004AA80
422 {
424 return intPtr;
425 }
426
427 // Token: 0x060021D7 RID: 8663 RVA: 0x0004C894 File Offset: 0x0004AA94
428 internal static void SetLastWin32Error(int error)
429 {
430 }
431
432 // Token: 0x060021D8 RID: 8664 RVA: 0x0004C8A4 File Offset: 0x0004AAA4
433 internal static ICustomMarshaler GetCustomMarshalerInstance(Type type, string cookie)
434 {
435 int num = 1;
436 if (num == 0)
437 {
438 }
439 if (num == 0)
440 {
441 }
442 if (num == 0)
443 {
444 }
445 long num2 = 0L;
446 int num3 = 3;
447 if (num2 == 0L && num3 == 0)
448 {
449 Type type2;
450 if (type2 != null && type2 == null)
451 {
452 throw new ArrayTypeMismatchException();
453 }
455 if (methodInfo != null)
456 {
457 }
458 if (type != null && type == null)
459 {
460 throw new ArrayTypeMismatchException();
461 }
462 object obj;
463 long num4;
464 if (obj != null)
465 {
466 if (obj == null)
467 {
468 throw new InvalidCastException();
469 }
470 }
471 else
472 {
473 num4 = 0L;
474 }
475 if (obj != null)
476 {
479 if (!false)
480 {
481 }
482 throw new OutOfMemoryException();
483 }
484 if (num4 == 0L)
485 {
486 return "' returned null, which is not allowed.";
487 }
488 if (false)
489 {
490 throw new OutOfMemoryException();
491 }
492 }
493 throw new OutOfMemoryException();
494 }
495
496 // Token: 0x060021D9 RID: 8665 RVA: 0x0004C980 File Offset: 0x0004AB80
497 // Note: this type is marked as 'beforefieldinit'.
502
503 // Token: 0x04001284 RID: 4740
505
506 // Token: 0x04001285 RID: 4741
508
509 // Token: 0x04001286 RID: 4742
511
512 // Token: 0x04001287 RID: 4743
513 internal static readonly object MarshalerInstanceCacheLock;
514
515 // Token: 0x02000451 RID: 1105
517 {
518 // Token: 0x060021DA RID: 8666 RVA: 0x0004C998 File Offset: 0x0004AB98
519 public SecureStringAllocator(object @object, IntPtr method)
520 {
522 this.m_target = @object;
524 this.method_code = this;
525 }
526
527 // Token: 0x060021DB RID: 8667 RVA: 0x0004C9EC File Offset: 0x0004ABEC
528 public IntPtr Invoke(int len)
529 {
532 IntPtr method = this.method;
533 return method_code;
534 }
535 }
536
537 // Token: 0x02000452 RID: 1106
538 internal class MarshalerInstanceKeyComparer : IEqualityComparer<ValueTuple<Type, string>>
539 {
540 // Token: 0x060021DC RID: 8668 RVA: 0x0000207A File Offset: 0x0000027A
542 {
543 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
544 }
545
546 // Token: 0x060021DD RID: 8669 RVA: 0x0000207A File Offset: 0x0000027A
548 {
549 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
550 }
551
552 // Token: 0x060021DE RID: 8670 RVA: 0x0004CA10 File Offset: 0x0004AC10
554 {
555 }
556 }
557
558 // Token: 0x02000453 RID: 1107
561 private sealed class <>c
562 {
563 // Token: 0x060021DF RID: 8671 RVA: 0x0004CA24 File Offset: 0x0004AC24
564 // Note: this type is marked as 'beforefieldinit'.
565 static <>c()
566 {
567 }
568
569 // Token: 0x060021E0 RID: 8672 RVA: 0x0004CA34 File Offset: 0x0004AC34
570 public <>c()
571 {
572 }
573
574 // Token: 0x060021E1 RID: 8673 RVA: 0x0000207A File Offset: 0x0000027A
576 {
577 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
578 }
579
580 // Token: 0x04001288 RID: 4744
581 public static readonly Marshal.<>c <>9;
582
583 // Token: 0x04001289 RID: 4745
584 public static Func<Dictionary<ValueTuple<Type, string>, ICustomMarshaler>> <>9__201_0;
585 }
586 }
587}
class f__AnonymousType0<< Count > j__TPar
IntPtr method_code
Definition Delegate.cs:386
IntPtr invoke_impl
Definition Delegate.cs:371
static bool IsRunningOnWindows
bool Equals(ValueTuple< Type, string > lhs, ValueTuple< Type, string > rhs)
Definition Marshal.cs:541
static unsafe void WriteByte(IntPtr ptr, int ofs, byte val)
Definition Marshal.cs:403
static IntPtr GetFunctionPointerForDelegate< TDelegate >(TDelegate d)
Definition Marshal.cs:421
static void ZeroFreeBSTR(IntPtr s)
Definition Marshal.cs:158
static readonly object MarshalerInstanceCacheLock
Definition Marshal.cs:513
static string PtrToStringUni(IntPtr ptr)
Definition Marshal.cs:244
static string PtrToStringAnsi(IntPtr ptr)
Definition Marshal.cs:238
static void ZeroFreeGlobalAllocUnicode(IntPtr s)
Definition Marshal.cs:211
static short ReadInt16(IntPtr ptr, int ofs)
Definition Marshal.cs:276
static void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld)
Definition Marshal.cs:368
static unsafe void ClearAnsi(IntPtr ptr)
Definition Marshal.cs:167
static byte ReadByte(IntPtr ptr, int ofs)
Definition Marshal.cs:270
static int GetHRForException(Exception e)
Definition Marshal.cs:220
static IntPtr SecureStringToUnicode(SecureString s, Marshal.SecureStringAllocator allocator)
Definition Marshal.cs:340
static void copy_to_unmanaged(byte[] source, int startIndex, IntPtr destination, int length)
Definition Marshal.cs:41
static void Copy(IntPtr source, short[] destination, int startIndex, int length)
Definition Marshal.cs:107
static bool skip_fixed(Array array, int startIndex)
Definition Marshal.cs:35
static IntPtr SecureStringToGlobalAllocUnicode(SecureString s)
Definition Marshal.cs:359
static unsafe void copy_to_unmanaged_fixed(Array source, int startIndex, IntPtr destination, int length, void *fixed_source_element)
Definition Marshal.cs:30
static void ClearUnicode(IntPtr ptr)
Definition Marshal.cs:186
static unsafe void copy_from_unmanaged_fixed(IntPtr source, int startIndex, Array destination, int length, void *fixed_destination_element)
Definition Marshal.cs:76
static IntPtr StringToHGlobalAnsi(string s)
Definition Marshal.cs:295
static IntPtr UnsafeAddrOfPinnedArrayElement< T >(T[] arr, int index)
Definition Marshal.cs:393
static void FreeHGlobal(IntPtr hglobal)
Definition Marshal.cs:139
static object PtrToStructure(IntPtr ptr, Type structureType)
Definition Marshal.cs:251
static readonly int SystemDefaultCharSize
Definition Marshal.cs:507
static IntPtr SecureStringGlobalAllocator(int len)
Definition Marshal.cs:331
static unsafe IntPtr StringToHGlobalAnsi(char *s, int length)
Definition Marshal.cs:289
static ICustomMarshaler GetCustomMarshalerInstance(Type type, string cookie)
Definition Marshal.cs:433
static void StructureToPtr< T >(T structure, IntPtr ptr, bool fDeleteOld)
Definition Marshal.cs:373
static Dictionary< ValueTuple< Type, string >, ICustomMarshaler > MarshalerInstanceCache
Definition Marshal.cs:510
static void Copy(IntPtr source, byte[] destination, int startIndex, int length)
Definition Marshal.cs:81
static IntPtr AllocHGlobal(IntPtr cb)
Definition Marshal.cs:17
static void Copy(IntPtr source, int[] destination, int startIndex, int length)
Definition Marshal.cs:120
static void Copy(IntPtr source, char[] destination, int startIndex, int length)
Definition Marshal.cs:94
static bool IsComObject(object o)
Definition Marshal.cs:226
static void copy_from_unmanaged(IntPtr source, int startIndex, Array destination, int length)
Definition Marshal.cs:68
static void SetLastWin32Error(int error)
Definition Marshal.cs:428
static unsafe IntPtr BufferToBSTR(char *ptr, int slen)
Definition Marshal.cs:381
static IntPtr GetFunctionPointerForDelegateInternal(Delegate d)
Definition Marshal.cs:415
static IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index)
Definition Marshal.cs:387
static void ZeroFreeGlobalAllocAnsi(IntPtr s)
Definition Marshal.cs:202
static int ReadInt32(IntPtr ptr, int ofs)
Definition Marshal.cs:283
static readonly int SystemMaxDBCSCharSize
Definition Marshal.cs:504
static IntPtr SecureStringToBSTR(SecureString s)
Definition Marshal.cs:322
static unsafe void ClearBSTR(IntPtr ptr)
Definition Marshal.cs:144
static IntPtr AllocHGlobal(int cb)
Definition Marshal.cs:24
static unsafe void WriteInt16(IntPtr ptr, int ofs, short val)
Definition Marshal.cs:409
static void FreeBSTR(IntPtr ptr)
Definition Marshal.cs:133
static T PtrToStructure< T >(IntPtr ptr)
Definition Marshal.cs:257
static void Copy(byte[] source, int startIndex, IntPtr destination, int length)
Definition Marshal.cs:55
static IntPtr Add(IntPtr pointer, int offset)
Definition IntPtr.cs:162