Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / ComponentModel / COM2Interop / Int32CAMarshaler.cs / 1 / Int32CAMarshaler.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms.ComponentModel.Com2Interop { using System.Runtime.InteropServices; using System.ComponentModel; using System.Diagnostics; using System; ////// /// This class performs marshaling on a CADWORD struct given /// from native code. /// internal class Int32CAMarshaler : BaseCAMarshaler { public Int32CAMarshaler(NativeMethods.CA_STRUCT caStruct) : base(caStruct) { } ////// /// Returns the type of item this marshaler will /// return in the items array. In this case, the type is int. /// public override Type ItemType { get { return typeof(int); } } protected override Array CreateArray() { return new int[Count]; } ////// /// Override this member to perform marshalling of a single item /// given it's native address. /// protected override object GetItemFromAddress(IntPtr addr) { return addr.ToInt32(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms.ComponentModel.Com2Interop { using System.Runtime.InteropServices; using System.ComponentModel; using System.Diagnostics; using System; ////// /// This class performs marshaling on a CADWORD struct given /// from native code. /// internal class Int32CAMarshaler : BaseCAMarshaler { public Int32CAMarshaler(NativeMethods.CA_STRUCT caStruct) : base(caStruct) { } ////// /// Returns the type of item this marshaler will /// return in the items array. In this case, the type is int. /// public override Type ItemType { get { return typeof(int); } } protected override Array CreateArray() { return new int[Count]; } ////// /// Override this member to perform marshalling of a single item /// given it's native address. /// protected override object GetItemFromAddress(IntPtr addr) { return addr.ToInt32(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StrongNameUtility.cs
- NamespaceList.cs
- BoundColumn.cs
- InstanceKeyView.cs
- MaskInputRejectedEventArgs.cs
- PersonalizationStateInfoCollection.cs
- QueryReaderSettings.cs
- OleDbDataAdapter.cs
- ConstraintEnumerator.cs
- PublisherMembershipCondition.cs
- DataRowExtensions.cs
- MobileContainerDesigner.cs
- CommonProperties.cs
- TextDecorations.cs
- Native.cs
- SingleConverter.cs
- HTMLTagNameToTypeMapper.cs
- PrintControllerWithStatusDialog.cs
- OdbcConnectionStringbuilder.cs
- TypeSystemProvider.cs
- OleDbPropertySetGuid.cs
- WbemProvider.cs
- Parallel.cs
- RunInstallerAttribute.cs
- MessageBox.cs
- BasicViewGenerator.cs
- MtomMessageEncodingBindingElement.cs
- SymbolType.cs
- DocumentViewer.cs
- DataBindingHandlerAttribute.cs
- EmissiveMaterial.cs
- FlowLayout.cs
- FixUp.cs
- FieldToken.cs
- AddInAdapter.cs
- InstanceNormalEvent.cs
- FtpWebRequest.cs
- XmlUTF8TextReader.cs
- HtmlImage.cs
- HtmlShim.cs
- StorageEntitySetMapping.cs
- IPAddressCollection.cs
- __Filters.cs
- ParseNumbers.cs
- ConstructorNeedsTagAttribute.cs
- AppliedDeviceFiltersDialog.cs
- VisualStateChangedEventArgs.cs
- PageCanvasSize.cs
- MenuItem.cs
- DelimitedListTraceListener.cs
- Argument.cs
- BrushValueSerializer.cs
- IgnoreFileBuildProvider.cs
- TrackingProvider.cs
- OracleRowUpdatedEventArgs.cs
- PermissionToken.cs
- FixedPage.cs
- InfiniteTimeSpanConverter.cs
- xsdvalidator.cs
- Connector.xaml.cs
- XPathParser.cs
- DefaultPrintController.cs
- Matrix3DStack.cs
- ViewKeyConstraint.cs
- WizardForm.cs
- FormViewCommandEventArgs.cs
- ScrollChangedEventArgs.cs
- HtmlTableCellCollection.cs
- LinkClickEvent.cs
- WindowsToolbarAsMenu.cs
- RotateTransform3D.cs
- XmlSchemaValidator.cs
- PingOptions.cs
- CursorConverter.cs
- ImportContext.cs
- SerializationFieldInfo.cs
- Brush.cs
- ImageKeyConverter.cs
- StackOverflowException.cs
- SelectionWordBreaker.cs
- OracleMonthSpan.cs
- AbstractSvcMapFileLoader.cs
- StatusBarDrawItemEvent.cs
- ColumnClickEvent.cs
- SqlDataSourceRefreshSchemaForm.cs
- CodeChecksumPragma.cs
- TableLayoutSettingsTypeConverter.cs
- ScriptingAuthenticationServiceSection.cs
- BasicExpandProvider.cs
- FeatureAttribute.cs
- PerspectiveCamera.cs
- MetadataStore.cs
- UIntPtr.cs
- PostBackOptions.cs
- XpsDocument.cs
- JapaneseLunisolarCalendar.cs
- ToolStripPanelRenderEventArgs.cs
- ListViewGroupItemCollection.cs
- Composition.cs
- ThemeInfoAttribute.cs