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
- SchemaImporterExtensionElement.cs
- RepeatButtonAutomationPeer.cs
- CodeGeneratorAttribute.cs
- DataGridViewMethods.cs
- UnmanagedMemoryAccessor.cs
- WinFormsSpinner.cs
- Rule.cs
- WorkflowOwnerAsyncResult.cs
- MemberHolder.cs
- MgmtConfigurationRecord.cs
- SocketStream.cs
- Drawing.cs
- SafeNativeMethodsOther.cs
- ObjectStateManager.cs
- XmlWriterSettings.cs
- DefaultBinder.cs
- DeviceFiltersSection.cs
- ErrorWrapper.cs
- MILUtilities.cs
- SrgsRuleRef.cs
- RectangleGeometry.cs
- TableCell.cs
- ConditionalAttribute.cs
- FocusChangedEventArgs.cs
- IIS7WorkerRequest.cs
- LicenseException.cs
- AddingNewEventArgs.cs
- EffectiveValueEntry.cs
- SqlVersion.cs
- EntityContainerEntitySetDefiningQuery.cs
- TextLineBreak.cs
- _ScatterGatherBuffers.cs
- Types.cs
- StylusCollection.cs
- BitmapVisualManager.cs
- metrodevice.cs
- Point3D.cs
- AffineTransform3D.cs
- OleCmdHelper.cs
- XPathItem.cs
- XmlUtf8RawTextWriter.cs
- WebServicesSection.cs
- PreservationFileReader.cs
- PathStreamGeometryContext.cs
- WriteLineDesigner.xaml.cs
- DefaultValueConverter.cs
- TrackBarRenderer.cs
- indexingfiltermarshaler.cs
- CultureData.cs
- WebControlsSection.cs
- BatchStream.cs
- VBCodeProvider.cs
- DataTablePropertyDescriptor.cs
- EmulateRecognizeCompletedEventArgs.cs
- ListViewDeleteEventArgs.cs
- NullableFloatAverageAggregationOperator.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- CompoundFileDeflateTransform.cs
- StateInitialization.cs
- FontStretch.cs
- StyleSheet.cs
- XmlUtilWriter.cs
- SafeThreadHandle.cs
- StringResourceManager.cs
- ReadOnlyDictionary.cs
- MenuItemCollection.cs
- TextReturnReader.cs
- ProfileProvider.cs
- EventEntry.cs
- RelationshipManager.cs
- ScrollChrome.cs
- basecomparevalidator.cs
- FixedBufferAttribute.cs
- ConfigurationStrings.cs
- AttributeProviderAttribute.cs
- InternalCache.cs
- AsyncResult.cs
- FaultCode.cs
- XmlNodeChangedEventArgs.cs
- ClientBuildManager.cs
- InputBuffer.cs
- GradientStop.cs
- SqlColumnizer.cs
- DocumentCollection.cs
- ConfigurationPropertyAttribute.cs
- OracleCommandSet.cs
- Mouse.cs
- ContainsRowNumberChecker.cs
- RegexGroupCollection.cs
- ImageInfo.cs
- __ComObject.cs
- WebPartRestoreVerb.cs
- ReadContentAsBinaryHelper.cs
- InputDevice.cs
- ReachFixedPageSerializer.cs
- Emitter.cs
- MDIWindowDialog.cs
- VectorCollection.cs
- XsltException.cs
- AsymmetricAlgorithm.cs