Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- BmpBitmapDecoder.cs
- APCustomTypeDescriptor.cs
- CommonObjectSecurity.cs
- KeyFrames.cs
- EntityProviderFactory.cs
- ProcessMonitor.cs
- PointCollection.cs
- SourceFileInfo.cs
- Underline.cs
- XPathMessageFilter.cs
- ValidatorCompatibilityHelper.cs
- HMACSHA384.cs
- TypeSemantics.cs
- BuildDependencySet.cs
- ConfigurationManagerInternalFactory.cs
- StructuralType.cs
- DataGridItemEventArgs.cs
- SocketAddress.cs
- MasterPageBuildProvider.cs
- PersonalizationStateQuery.cs
- LineBreakRecord.cs
- TableLayoutStyleCollection.cs
- MessageQueueConverter.cs
- Clipboard.cs
- DesignerTextViewAdapter.cs
- NextPreviousPagerField.cs
- AvTrace.cs
- StylusPointProperties.cs
- HttpRawResponse.cs
- QueryStatement.cs
- UrlMappingCollection.cs
- GeneratedContractType.cs
- GridViewCancelEditEventArgs.cs
- InvalidComObjectException.cs
- EqualityComparer.cs
- AbstractExpressions.cs
- SystemWebSectionGroup.cs
- DeleteHelper.cs
- DocumentPageViewAutomationPeer.cs
- StringUtil.cs
- QuaternionRotation3D.cs
- StringArrayConverter.cs
- GcHandle.cs
- PropertyGridCommands.cs
- SQLBytes.cs
- SqlBulkCopy.cs
- ReferencedType.cs
- LayoutEditorPart.cs
- SafePointer.cs
- ActionFrame.cs
- ModelVisual3D.cs
- BindingContext.cs
- GridViewColumnCollectionChangedEventArgs.cs
- WebServiceClientProxyGenerator.cs
- BitmapMetadata.cs
- FixedPageStructure.cs
- DataGridColumnCollection.cs
- ProfileGroupSettingsCollection.cs
- InputReferenceExpression.cs
- GridLength.cs
- MeshGeometry3D.cs
- unitconverter.cs
- GridViewDeletedEventArgs.cs
- PropertyTabAttribute.cs
- FrameworkElement.cs
- ClientSponsor.cs
- FlowDocument.cs
- Crypto.cs
- WorkflowMarkupSerializationManager.cs
- ScriptBehaviorDescriptor.cs
- ZipIOModeEnforcingStream.cs
- ButtonFieldBase.cs
- WebAdminConfigurationHelper.cs
- CriticalFinalizerObject.cs
- FontEmbeddingManager.cs
- MouseCaptureWithinProperty.cs
- DataViewListener.cs
- SqlConnectionHelper.cs
- EnumerationRangeValidationUtil.cs
- UserPrincipalNameElement.cs
- StringSource.cs
- mediapermission.cs
- ContextMarshalException.cs
- mda.cs
- newinstructionaction.cs
- ServiceModelInstallComponent.cs
- CategoryAttribute.cs
- ImportContext.cs
- DataSourceHelper.cs
- AttributeUsageAttribute.cs
- DataTemplateKey.cs
- CompositeActivityCodeGenerator.cs
- ConfigurationLocationCollection.cs
- SoapHeaderException.cs
- PropertyGridEditorPart.cs
- XamlWriterExtensions.cs
- DocumentGrid.cs
- ImpersonateTokenRef.cs
- ObfuscationAttribute.cs
- SizeConverter.cs