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
- CounterSampleCalculator.cs
- ConvertersCollection.cs
- EntityClientCacheEntry.cs
- HTMLTagNameToTypeMapper.cs
- SafeNativeMethodsMilCoreApi.cs
- Crypto.cs
- Ticks.cs
- WebPart.cs
- Main.cs
- ObservableDictionary.cs
- CallbackValidator.cs
- GridViewCommandEventArgs.cs
- OrderByBuilder.cs
- ServiceBusyException.cs
- RootBuilder.cs
- GridLength.cs
- XmlToDatasetMap.cs
- UrlAuthFailedErrorFormatter.cs
- MobileErrorInfo.cs
- AnnotationResourceChangedEventArgs.cs
- SymLanguageVendor.cs
- HttpBindingExtension.cs
- ImageKeyConverter.cs
- CalculatedColumn.cs
- MenuAutoFormat.cs
- TextParentUndoUnit.cs
- ToolStripDropDownItem.cs
- PointAnimationUsingPath.cs
- PersistenceTypeAttribute.cs
- OutOfMemoryException.cs
- XmlElement.cs
- ProfessionalColorTable.cs
- Roles.cs
- MaterialGroup.cs
- SessionEndingCancelEventArgs.cs
- MultiViewDesigner.cs
- UnsafeNetInfoNativeMethods.cs
- StyleXamlTreeBuilder.cs
- InvokeProviderWrapper.cs
- PathNode.cs
- RowUpdatedEventArgs.cs
- RoutedEventValueSerializer.cs
- GroupByExpressionRewriter.cs
- Activity.cs
- CloudCollection.cs
- ExcCanonicalXml.cs
- ConsoleEntryPoint.cs
- ElementUtil.cs
- Rijndael.cs
- ImmComposition.cs
- DataGridItem.cs
- SchemaElementLookUpTable.cs
- ContentFileHelper.cs
- DefinitionUpdate.cs
- EntityViewGenerationAttribute.cs
- ContainerVisual.cs
- DataSourceCollectionBase.cs
- HandlerFactoryCache.cs
- Listener.cs
- Atom10FormatterFactory.cs
- FileIOPermission.cs
- StreamReader.cs
- UnsafeNativeMethods.cs
- Win32.cs
- InvokeMethodActivityDesigner.cs
- NativeMethods.cs
- VectorAnimationBase.cs
- SelectionHighlightInfo.cs
- XPathArrayIterator.cs
- HtmlTextArea.cs
- AesManaged.cs
- HostedAspNetEnvironment.cs
- PointConverter.cs
- EnterpriseServicesHelper.cs
- CodeDomSerializerBase.cs
- XmlIgnoreAttribute.cs
- Convert.cs
- StrongNamePublicKeyBlob.cs
- EmbeddedObject.cs
- _SSPISessionCache.cs
- PreloadHost.cs
- PolyBezierSegment.cs
- DataGridViewAutoSizeModeEventArgs.cs
- EventHandlersStore.cs
- PolicyLevel.cs
- AudienceUriMode.cs
- SafeUserTokenHandle.cs
- SessionStateContainer.cs
- XmlCDATASection.cs
- HtmlElementEventArgs.cs
- ControlTemplate.cs
- ISFClipboardData.cs
- NumericPagerField.cs
- OpenFileDialog.cs
- DbConnectionFactory.cs
- SendMessageRecord.cs
- StyleCollectionEditor.cs
- SharedStatics.cs
- ZipIORawDataFileBlock.cs
- DesignerDataConnection.cs