Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / ComponentModel / COM2Interop / Int32CAMarshaler.cs / 1305376 / 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
- DocumentSchemaValidator.cs
- XPathQilFactory.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- Rotation3DKeyFrameCollection.cs
- mactripleDES.cs
- TextMetrics.cs
- DataSet.cs
- CmsInterop.cs
- OleDbDataReader.cs
- DataGridDesigner.cs
- StaticFileHandler.cs
- ConfigurationStrings.cs
- DataPointer.cs
- SQLBytesStorage.cs
- DefaultAuthorizationContext.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- Stylesheet.cs
- DataGrid.cs
- EnumUnknown.cs
- PropertyManager.cs
- InstanceHandleConflictException.cs
- DataProtection.cs
- X509Certificate2.cs
- XamlRtfConverter.cs
- RectAnimation.cs
- HttpSocketManager.cs
- SafeNativeMethods.cs
- BackStopAuthenticationModule.cs
- CategoryNameCollection.cs
- EditorPartChrome.cs
- CompiledAction.cs
- QueryFunctions.cs
- wpf-etw.cs
- ElementAtQueryOperator.cs
- BooleanProjectedSlot.cs
- PeerNeighborManager.cs
- DataGridSortCommandEventArgs.cs
- TransformValueSerializer.cs
- serverconfig.cs
- TransactionOptions.cs
- ListViewInsertionMark.cs
- Int32CAMarshaler.cs
- Model3DGroup.cs
- DesignConnectionCollection.cs
- ValidationSummaryDesigner.cs
- TextTrailingCharacterEllipsis.cs
- SafeSecurityHelper.cs
- ParameterModifier.cs
- Model3D.cs
- autovalidator.cs
- DefaultClaimSet.cs
- FastPropertyAccessor.cs
- RichTextBox.cs
- WmlControlAdapter.cs
- NullableConverter.cs
- ParseChildrenAsPropertiesAttribute.cs
- IHttpResponseInternal.cs
- IPEndPoint.cs
- CodeNamespace.cs
- TimeoutException.cs
- BinaryCommonClasses.cs
- WebPartHeaderCloseVerb.cs
- TransformPatternIdentifiers.cs
- Color.cs
- HtmlDocument.cs
- HotCommands.cs
- SqlConnectionPoolGroupProviderInfo.cs
- KeyProperty.cs
- ItemList.cs
- IISUnsafeMethods.cs
- HtmlInputReset.cs
- TakeOrSkipWhileQueryOperator.cs
- CanonicalFormWriter.cs
- MaterialGroup.cs
- PowerStatus.cs
- XmlSortKeyAccumulator.cs
- Effect.cs
- MarkupExtensionParser.cs
- QuaternionAnimation.cs
- XmlSerializationReader.cs
- OpCopier.cs
- EmptyElement.cs
- RawStylusInputCustomDataList.cs
- FontFaceLayoutInfo.cs
- LayoutTableCell.cs
- GifBitmapDecoder.cs
- HtmlInputSubmit.cs
- ProjectedSlot.cs
- EntitySqlQueryCacheKey.cs
- HostedBindingBehavior.cs
- ItemsChangedEventArgs.cs
- InvalidOperationException.cs
- SmiContextFactory.cs
- XmlSchemaObjectCollection.cs
- AssemblyBuilder.cs
- unsafenativemethodsother.cs
- BitStream.cs
- ImagingCache.cs
- HealthMonitoringSection.cs
- ZipPackage.cs