System.Drawing.ComIStreamMarshaler.ManagedToNativeWrapper.ReleaseInterface C# (CSharp) Метод

ReleaseInterface() статический приватный Метод

static private ReleaseInterface ( IntPtr comInterface ) : void
comInterface System.IntPtr
Результат void
			internal static void ReleaseInterface(IntPtr comInterface)
			{
				if (comInterface != IntPtr.Zero)
				{
					IntPtr vtable = Marshal.ReadIntPtr(comInterface);

					if (vtable == comVtable)
						Release(comInterface);
					else
					{
						ReleaseSlot releaseSlot = (ReleaseSlot)Marshal.PtrToStructure((IntPtr)((long)vtable + (long)(IntPtr.Size * 2)), typeof(ReleaseSlot));
						releaseSlot.Release(comInterface);
					}
				}
			}