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

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

private static QueryInterface ( IntPtr @this, System.Guid &riid, IntPtr ppvObject ) : int
@this System.IntPtr
riid System.Guid
ppvObject System.IntPtr
Результат int
			private static int QueryInterface(IntPtr @this, ref Guid riid, IntPtr ppvObject)
			{
#if MAP_EX_TO_HR
				try
				{
#endif
					if (IID_IUnknown.Equals(riid) || IID_IStream.Equals(riid))
					{
						Marshal.WriteIntPtr(ppvObject, @this);
						AddRef(@this);
						return S_OK;
					}
					else
					{
						Marshal.WriteIntPtr(ppvObject, IntPtr.Zero);
						return E_NOINTERFACE;
					}
#if MAP_EX_TO_HR
				}
				catch (Exception e)
				{
					return GetHRForException(e);
				}
#endif
			}