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
- WindowsToolbarItemAsMenuItem.cs
- GradientSpreadMethodValidation.cs
- FileDialog_Vista.cs
- HttpDebugHandler.cs
- RouteValueExpressionBuilder.cs
- RelatedView.cs
- documentation.cs
- Font.cs
- GacUtil.cs
- ComponentManagerBroker.cs
- TailCallAnalyzer.cs
- HtmlElementCollection.cs
- DbMetaDataCollectionNames.cs
- MessageVersion.cs
- AspNetSynchronizationContext.cs
- FileFormatException.cs
- PerformanceCounterPermission.cs
- ManagedWndProcTracker.cs
- TextFormatterImp.cs
- EventDrivenDesigner.cs
- SafeReadContext.cs
- TdsParserSessionPool.cs
- GridSplitter.cs
- RotateTransform3D.cs
- metadatamappinghashervisitor.cs
- ActivityBuilderHelper.cs
- BaseValidator.cs
- SmtpNtlmAuthenticationModule.cs
- FastPropertyAccessor.cs
- CompatibleIComparer.cs
- EditorAttribute.cs
- PermissionSetTriple.cs
- JulianCalendar.cs
- CodeSubDirectory.cs
- OleDbPermission.cs
- CultureSpecificStringDictionary.cs
- XmlAttributeCache.cs
- TemplatePropertyEntry.cs
- KeyFrames.cs
- Compiler.cs
- XmlArrayAttribute.cs
- PathStreamGeometryContext.cs
- MemberPath.cs
- AccessDataSourceView.cs
- ImmutablePropertyDescriptorGridEntry.cs
- ObjectTag.cs
- Point3DAnimation.cs
- AssemblyUtil.cs
- Parser.cs
- MailSettingsSection.cs
- SymbolEqualComparer.cs
- HtmlInputSubmit.cs
- XmlSchemaChoice.cs
- DebugView.cs
- Quad.cs
- FixedHighlight.cs
- ShapeTypeface.cs
- LinearGradientBrush.cs
- PersonalizationStateInfoCollection.cs
- FormConverter.cs
- DataPagerFieldCommandEventArgs.cs
- XmlNodeReader.cs
- _DigestClient.cs
- XmlCountingReader.cs
- PackageFilter.cs
- EntityDesignerBuildProvider.cs
- GroupItemAutomationPeer.cs
- DigitShape.cs
- PrimitiveXmlSerializers.cs
- DataGridViewEditingControlShowingEventArgs.cs
- RequestStatusBarUpdateEventArgs.cs
- BinaryFormatter.cs
- Calendar.cs
- ReflectionHelper.cs
- BooleanExpr.cs
- QuaternionAnimation.cs
- TypedOperationInfo.cs
- MenuEventArgs.cs
- TrackingRecord.cs
- SingleKeyFrameCollection.cs
- PrePrepareMethodAttribute.cs
- BitmapEffect.cs
- CommandLibraryHelper.cs
- propertytag.cs
- OracleTimeSpan.cs
- ExceptionAggregator.cs
- WebPartAddingEventArgs.cs
- StandardToolWindows.cs
- CompilerWrapper.cs
- PasswordBoxAutomationPeer.cs
- NamespaceInfo.cs
- TextTrailingWordEllipsis.cs
- RuleSettings.cs
- ArgumentException.cs
- EncodingDataItem.cs
- Logging.cs
- WorkflowRuntimeService.cs
- ExpandCollapseProviderWrapper.cs
- cookieexception.cs
- PublisherIdentityPermission.cs