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
- MediaEntryAttribute.cs
- QueuePropertyVariants.cs
- InkCanvasAutomationPeer.cs
- PnrpPeerResolverBindingElement.cs
- ControlIdConverter.cs
- URLAttribute.cs
- DecoratedNameAttribute.cs
- RewritingPass.cs
- SamlSubjectStatement.cs
- CompiledAction.cs
- DataReceivedEventArgs.cs
- NavigationProgressEventArgs.cs
- ErrorStyle.cs
- ListSortDescriptionCollection.cs
- ZipIOBlockManager.cs
- RegexCaptureCollection.cs
- GridViewDeletedEventArgs.cs
- ScrollChrome.cs
- ArgIterator.cs
- SkewTransform.cs
- IndexOutOfRangeException.cs
- PackWebRequest.cs
- StandardBindingOptionalReliableSessionElement.cs
- GacUtil.cs
- RemotingConfigParser.cs
- LogLogRecordHeader.cs
- CompositeCollection.cs
- RequestNavigateEventArgs.cs
- SingleTagSectionHandler.cs
- CodeGenerator.cs
- TraceUtils.cs
- WorkflowRuntimeServiceElementCollection.cs
- DataTemplate.cs
- InstallerTypeAttribute.cs
- DataTableReader.cs
- Int16Converter.cs
- CodeConditionStatement.cs
- TraceInternal.cs
- NavigationWindow.cs
- Version.cs
- DynamicDataResources.Designer.cs
- TextTreeUndoUnit.cs
- DataControlFieldHeaderCell.cs
- SizeConverter.cs
- HttpConfigurationSystem.cs
- AutomationEvent.cs
- CheckableControlBaseAdapter.cs
- ListViewHitTestInfo.cs
- DoWorkEventArgs.cs
- DrawingGroupDrawingContext.cs
- TextServicesHost.cs
- SetterBaseCollection.cs
- DataServiceQuery.cs
- NameValueConfigurationCollection.cs
- LocalFileSettingsProvider.cs
- ClockGroup.cs
- ObjectItemCachedAssemblyLoader.cs
- CertificateManager.cs
- CompositeScriptReference.cs
- PrintController.cs
- CounterCreationDataCollection.cs
- AsyncCodeActivityContext.cs
- ResourceReferenceKeyNotFoundException.cs
- WindowsTokenRoleProvider.cs
- LoadWorkflowAsyncResult.cs
- CollectionViewProxy.cs
- RepeatButtonAutomationPeer.cs
- CredentialManagerDialog.cs
- PartialCachingControl.cs
- EdmToObjectNamespaceMap.cs
- SizeValueSerializer.cs
- MenuBindingsEditor.cs
- SecurityTokenRequirement.cs
- IntSecurity.cs
- WebSysDescriptionAttribute.cs
- FrameAutomationPeer.cs
- MessageEncoder.cs
- HttpClientCertificate.cs
- UpdateExpressionVisitor.cs
- FileRecordSequenceCompletedAsyncResult.cs
- XmlExpressionDumper.cs
- InstanceDescriptor.cs
- SourceItem.cs
- TextDocumentView.cs
- CompoundFileDeflateTransform.cs
- ShimAsPublicXamlType.cs
- ArraySubsetEnumerator.cs
- Object.cs
- HttpResponse.cs
- WebConfigurationManager.cs
- PopupRoot.cs
- CalendarTable.cs
- ListChunk.cs
- COM2Properties.cs
- XmlObjectSerializerWriteContextComplex.cs
- SizeConverter.cs
- EntityDataSourceSelectingEventArgs.cs
- SecurityKeyIdentifier.cs
- AnnotationAdorner.cs
- CodeSubDirectory.cs