private void ShowAllocatorRequirements(object sender, EventArgs e) { if (connectingPin != null) { IMemInputPin imip = connectingPin.IPin as IMemInputPin; if (imip != null) { try { AllocatorProperties pr = new AllocatorProperties(); int hr = imip.GetAllocatorRequirements(out pr); DsError.ThrowExceptionForHR(hr); if (pr != null) Program.mainform.propform.SetObject(new FieldsToPropertiesProxyTypeDescriptor(pr)); } catch (COMException ex) { Graph.ShowCOMException(ex, "Can't get requirements"); } catch (Exception ex) { MessageBox.Show(ex.Message, "Exception caught in IMemInputPin::GetAllocatorRequirements"); } } } connectingPin = null; }
private void ShowAllocatorProperties(object sender, EventArgs e) { if (connectingPin != null) { IMemInputPin imip = connectingPin.IPin as IMemInputPin; if (imip != null) { IMemAllocator ma = null; imip.GetAllocator(out ma); if (ma != null) { AllocatorProperties pr = new AllocatorProperties(); ma.GetProperties(pr); Program.mainform.propform.SetObject(new FieldsToPropertiesProxyTypeDescriptor(pr)); } } } connectingPin = null; }