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
- UriScheme.cs
- CodeCatchClauseCollection.cs
- FieldToken.cs
- SourceElementsCollection.cs
- Mappings.cs
- SqlNotificationRequest.cs
- BuilderPropertyEntry.cs
- InstanceKey.cs
- CoreSwitches.cs
- UnmanagedMemoryStreamWrapper.cs
- HandlerMappingMemo.cs
- SQLBoolean.cs
- TextEditorSpelling.cs
- InstanceOwnerQueryResult.cs
- CommandDevice.cs
- TimelineClockCollection.cs
- ParagraphVisual.cs
- PixelShader.cs
- Expander.cs
- PathFigureCollection.cs
- CookieParameter.cs
- LocatorPartList.cs
- TargetParameterCountException.cs
- RuleValidation.cs
- DataTableClearEvent.cs
- XmlCollation.cs
- ArgumentValue.cs
- WebPartTransformerCollection.cs
- PasswordBoxAutomationPeer.cs
- SqlRetyper.cs
- CultureSpecificCharacterBufferRange.cs
- ScriptingWebServicesSectionGroup.cs
- Vector.cs
- WebPartActionVerb.cs
- FixedSchema.cs
- SafeLibraryHandle.cs
- PrintController.cs
- DeadCharTextComposition.cs
- RenamedEventArgs.cs
- TextRangeEditTables.cs
- Permission.cs
- WS2007FederationHttpBindingCollectionElement.cs
- SchemaTableColumn.cs
- DockPanel.cs
- DateTimeSerializationSection.cs
- PropertyMapper.cs
- FormatSelectingMessageInspector.cs
- wmiprovider.cs
- Symbol.cs
- CommonDialog.cs
- DataPager.cs
- NativeMethods.cs
- BitmapMetadataEnumerator.cs
- TypedServiceOperationListItem.cs
- XmlEventCache.cs
- FormatterServicesNoSerializableCheck.cs
- ToolStripRendererSwitcher.cs
- HostingPreferredMapPath.cs
- UntypedNullExpression.cs
- TableHeaderCell.cs
- RIPEMD160.cs
- HtmlTableRow.cs
- CollectionView.cs
- BitmapEffectInputConnector.cs
- EntityStoreSchemaGenerator.cs
- LiteralTextContainerControlBuilder.cs
- COM2PropertyDescriptor.cs
- ExtendedTransformFactory.cs
- validation.cs
- ComponentRenameEvent.cs
- Calendar.cs
- TextEditorSelection.cs
- Attachment.cs
- DataSetUtil.cs
- ResourceAssociationSetEnd.cs
- RadioButtonRenderer.cs
- SqlBulkCopyColumnMappingCollection.cs
- WeakRefEnumerator.cs
- DocumentReference.cs
- Table.cs
- MenuCommandsChangedEventArgs.cs
- ParameterModifier.cs
- tibetanshape.cs
- BinaryConverter.cs
- XComponentModel.cs
- PriorityBindingExpression.cs
- GradientBrush.cs
- ConvertBinder.cs
- CompositeFontInfo.cs
- PropertySourceInfo.cs
- MarkupCompilePass2.cs
- ChannelSinkStacks.cs
- Vector3D.cs
- RectKeyFrameCollection.cs
- BindingBase.cs
- EnumMember.cs
- Int64AnimationBase.cs
- MergePropertyDescriptor.cs
- RenderTargetBitmap.cs
- SoapInteropTypes.cs