Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / WinForms / Managed / System / WinForms / ComponentModel / COM2Interop / Int32CAMarshaler.cs / 1 / 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
- InputMethodStateChangeEventArgs.cs
- HostedTransportConfigurationManager.cs
- SecurityElement.cs
- TypeConverterAttribute.cs
- ConstructorArgumentAttribute.cs
- ToolStripButton.cs
- MatrixStack.cs
- TCPListener.cs
- M3DUtil.cs
- TextDecorationCollectionConverter.cs
- CompiledAction.cs
- PeerTransportCredentialType.cs
- TextBoxBase.cs
- RectConverter.cs
- GcHandle.cs
- ExpressionVisitor.cs
- ImageIndexConverter.cs
- TemplateBindingExpressionConverter.cs
- TdsParserHelperClasses.cs
- StopRoutingHandler.cs
- AttributeTableBuilder.cs
- SimpleTypeResolver.cs
- IntSecurity.cs
- CompressStream.cs
- AnnotationResourceCollection.cs
- PropertyIDSet.cs
- WebPartsPersonalizationAuthorization.cs
- CollectionView.cs
- SystemDiagnosticsSection.cs
- FixedSOMContainer.cs
- PageWrapper.cs
- InternalConfigSettingsFactory.cs
- EncryptedReference.cs
- DataRowExtensions.cs
- PartitionedStreamMerger.cs
- Visitors.cs
- DeclarativeCatalogPart.cs
- BehaviorService.cs
- ObjectDataSourceStatusEventArgs.cs
- FlowDocumentPage.cs
- ProviderIncompatibleException.cs
- TextHidden.cs
- IntegerFacetDescriptionElement.cs
- MessageHeaderDescription.cs
- unitconverter.cs
- DateTimeValueSerializerContext.cs
- TextElementEnumerator.cs
- Expression.cs
- RemotingServices.cs
- CommandField.cs
- HtmlButton.cs
- XmlSchemaAttribute.cs
- SamlAuthorityBinding.cs
- ItemMap.cs
- ExtensionDataObject.cs
- ChangeInterceptorAttribute.cs
- ColumnWidthChangedEvent.cs
- SplayTreeNode.cs
- EntityDataSourceContainerNameItem.cs
- SymLanguageVendor.cs
- StyleHelper.cs
- GridViewDeleteEventArgs.cs
- EntityDataSourceMemberPath.cs
- XmlNamespaceManager.cs
- WriteTimeStream.cs
- cryptoapiTransform.cs
- Lookup.cs
- ExpressionEditorAttribute.cs
- TableItemPattern.cs
- BitmapEffectDrawing.cs
- Region.cs
- StructuralCache.cs
- ChameleonKey.cs
- _NegoStream.cs
- TrackingDataItemValue.cs
- XamlStackWriter.cs
- SmiMetaData.cs
- ResXFileRef.cs
- XMLDiffLoader.cs
- XpsViewerException.cs
- HostingEnvironmentWrapper.cs
- MouseDevice.cs
- MethodCallTranslator.cs
- RtfToken.cs
- WizardSideBarListControlItem.cs
- EnumMemberAttribute.cs
- DesigntimeLicenseContextSerializer.cs
- LongCountAggregationOperator.cs
- DbParameterHelper.cs
- TemplatedWizardStep.cs
- WebBrowserBase.cs
- CodeComment.cs
- AddressUtility.cs
- ObjectSecurity.cs
- HttpResponse.cs
- WhileDesigner.cs
- filewebrequest.cs
- ServiceDebugElement.cs
- BamlWriter.cs
- ChineseLunisolarCalendar.cs