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

◆ GetStdMarshaler()

IntPtr System.Runtime.InteropServices.StandardOleMarshalObject.GetStdMarshaler ( ref Guid riid,
int dwDestContext,
int mshlflags )
inlineprivate

Definition at line 17 of file StandardOleMarshalObject.cs.

18 {
19 IntPtr iUnknownForObject = Marshal.GetIUnknownForObject(this);
20 if (iUnknownForObject != IntPtr.Zero)
21 {
22 try
23 {
24 IntPtr ppMarshal = IntPtr.Zero;
25 if (Interop.Ole32.CoGetStandardMarshal(ref riid, iUnknownForObject, dwDestContext, IntPtr.Zero, mshlflags, out ppMarshal) == 0)
26 {
27 return ppMarshal;
28 }
29 }
30 finally
31 {
32 Marshal.Release(iUnknownForObject);
33 }
34 }
35 throw new InvalidOperationException(SR.Format(SR.StandardOleMarshalObjectGetMarshalerFailed, riid));
36 }
static int CoGetStandardMarshal(ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out IntPtr ppMarshal)

References Interop.Ole32.CoGetStandardMarshal(), System.SR.Format(), System.Runtime.InteropServices.Marshal.GetIUnknownForObject(), System.Runtime.InteropServices.Marshal.Release(), System.SR.StandardOleMarshalObjectGetMarshalerFailed, and System.IntPtr.Zero.

Referenced by System.Runtime.InteropServices.StandardOleMarshalObject.GetMarshalSizeMax(), and System.Runtime.InteropServices.StandardOleMarshalObject.MarshalInterface().