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
- PrintPreviewGraphics.cs
- AtomServiceDocumentSerializer.cs
- SafeFindHandle.cs
- DropShadowBitmapEffect.cs
- NamedElement.cs
- HtmlAnchor.cs
- StandardTransformFactory.cs
- MemberDomainMap.cs
- QuerySafeNavigator.cs
- InputLanguageManager.cs
- QueryConverter.cs
- DesignerVerbToolStripMenuItem.cs
- figurelength.cs
- IdentityReference.cs
- ZipIOCentralDirectoryFileHeader.cs
- CoreSwitches.cs
- HashAlgorithm.cs
- MemberAccessException.cs
- DataGridViewImageColumn.cs
- Material.cs
- WsatServiceCertificate.cs
- KeyTimeConverter.cs
- DiagnosticTrace.cs
- DummyDataSource.cs
- DotExpr.cs
- DecimalConstantAttribute.cs
- EllipticalNodeOperations.cs
- SelectionWordBreaker.cs
- SafeLibraryHandle.cs
- UriScheme.cs
- StylusPointPropertyUnit.cs
- ToolStripPanel.cs
- MarkupObject.cs
- InlinedAggregationOperator.cs
- EventLogSession.cs
- TextDocumentView.cs
- TextServicesCompartmentContext.cs
- Html32TextWriter.cs
- ADMembershipUser.cs
- WindowsFormsSectionHandler.cs
- ContainerParaClient.cs
- CodeDirectiveCollection.cs
- ReadOnlyCollectionBase.cs
- AssemblySettingAttributes.cs
- CommandExpr.cs
- DiscoveryMessageSequence11.cs
- GlyphElement.cs
- GiveFeedbackEvent.cs
- XmlSchemaSet.cs
- SqlError.cs
- AnonymousIdentificationModule.cs
- SqlConnectionManager.cs
- WebPartMenu.cs
- CompletionCallbackWrapper.cs
- TemplatePartAttribute.cs
- ExpandCollapseProviderWrapper.cs
- EntityViewGenerator.cs
- safelink.cs
- ObjectAnimationUsingKeyFrames.cs
- TabControlCancelEvent.cs
- CodeEventReferenceExpression.cs
- HttpFormatExtensions.cs
- TTSVoice.cs
- KeyEvent.cs
- DummyDataSource.cs
- RSAPKCS1SignatureFormatter.cs
- TypeDescriptor.cs
- FileReader.cs
- LicenseContext.cs
- XmlSchemaSimpleContentRestriction.cs
- XmlWhitespace.cs
- RoutedUICommand.cs
- Hex.cs
- CookieParameter.cs
- SurrogateSelector.cs
- NativeMethods.cs
- TabItemAutomationPeer.cs
- MouseDevice.cs
- RSAOAEPKeyExchangeFormatter.cs
- Nullable.cs
- SevenBitStream.cs
- XPathExpr.cs
- MessageQueueCriteria.cs
- LinkedResourceCollection.cs
- Stylesheet.cs
- MsmqInputSessionChannelListener.cs
- WindowsListViewScroll.cs
- DataTablePropertyDescriptor.cs
- DBCSCodePageEncoding.cs
- ColumnResult.cs
- LoginStatusDesigner.cs
- ClientConfigurationHost.cs
- AlternateView.cs
- WebPartUserCapability.cs
- SupportingTokenProviderSpecification.cs
- DocumentViewerBase.cs
- WebPartMenu.cs
- XMLDiffLoader.cs
- LinkButton.cs
- FreezableCollection.cs