Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- RecognizerBase.cs
- _TransmitFileOverlappedAsyncResult.cs
- EntityContainerEntitySetDefiningQuery.cs
- PointConverter.cs
- EntityDesignPluralizationHandler.cs
- DrawingImage.cs
- DataGridTextBoxColumn.cs
- LocalFileSettingsProvider.cs
- thaishape.cs
- RuleEngine.cs
- DataGridBoolColumn.cs
- SizeValueSerializer.cs
- CompositeClientFormatter.cs
- FormsAuthenticationCredentials.cs
- JulianCalendar.cs
- PartitionResolver.cs
- Triangle.cs
- JsonXmlDataContract.cs
- Byte.cs
- remotingproxy.cs
- InputBindingCollection.cs
- ThrowOnMultipleAssignment.cs
- PersonalizationProviderHelper.cs
- RSACryptoServiceProvider.cs
- HttpCacheParams.cs
- Label.cs
- ColorMatrix.cs
- XPathSelectionIterator.cs
- RawStylusSystemGestureInputReport.cs
- WebPartHeaderCloseVerb.cs
- BitmapData.cs
- ServiceBuildProvider.cs
- SoapTypeAttribute.cs
- EUCJPEncoding.cs
- SqlNodeAnnotation.cs
- TextInfo.cs
- CodeAccessPermission.cs
- DBDataPermission.cs
- StructuralObject.cs
- EditorServiceContext.cs
- CryptoApi.cs
- SpinWait.cs
- ErrorFormatterPage.cs
- NameValuePermission.cs
- ConfigurationPropertyAttribute.cs
- GiveFeedbackEvent.cs
- UriTemplate.cs
- LogicalTreeHelper.cs
- EntityDataSourceConfigureObjectContext.cs
- IPHostEntry.cs
- FileDialogPermission.cs
- FixedSOMElement.cs
- XPathNavigatorKeyComparer.cs
- UidManager.cs
- TextTabProperties.cs
- ObjectKeyFrameCollection.cs
- StylusPointPropertyInfo.cs
- PlatformNotSupportedException.cs
- CombinedGeometry.cs
- Choices.cs
- ChameleonKey.cs
- HtmlTableRow.cs
- HtmlTableRow.cs
- CfgRule.cs
- Attributes.cs
- StyleHelper.cs
- IInstanceContextProvider.cs
- Array.cs
- TimeSpanMinutesConverter.cs
- CatalogPartCollection.cs
- DesignerHelpers.cs
- BitmapEffect.cs
- DataGridViewRowsRemovedEventArgs.cs
- SemaphoreFullException.cs
- XPathAncestorQuery.cs
- DependencyPropertyKey.cs
- UITypeEditors.cs
- XmlFileEditor.cs
- AutomationTextAttribute.cs
- ResourceManager.cs
- DataGridViewCheckBoxColumn.cs
- Closure.cs
- PipelineComponent.cs
- MediaElementAutomationPeer.cs
- WindowsAuthenticationModule.cs
- DuplexChannelFactory.cs
- Literal.cs
- CacheForPrimitiveTypes.cs
- SymmetricKeyWrap.cs
- GeneralTransformCollection.cs
- TreeViewItemAutomationPeer.cs
- SecurityKeyUsage.cs
- PopupEventArgs.cs
- OleDbTransaction.cs
- CellParaClient.cs
- BaseAsyncResult.cs
- Variant.cs
- ParagraphResult.cs
- CodeTypeDeclarationCollection.cs
- BinaryObjectReader.cs