System.Drawing.ComIStreamMarshaler.ManagedToNativeWrapper.GetUnderlyingInterface C# (CSharp) Method

GetUnderlyingInterface() static private method

static private GetUnderlyingInterface ( IntPtr comInterface, bool outParam ) : IStream
comInterface System.IntPtr
outParam bool
return IStream
			internal static IStream GetUnderlyingInterface(IntPtr comInterface, bool outParam)
			{
				if (Marshal.ReadIntPtr(comInterface) == comVtable)
				{
					IStream managedInterface = GetObject(comInterface).managedInterface;

					if (outParam)
						Release(comInterface);

					return managedInterface;
				}
				else
					return null;
			}