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
- ProtectedConfigurationProviderCollection.cs
- BindingElementExtensionElement.cs
- AppSettingsReader.cs
- ChannelTerminatedException.cs
- TextSegment.cs
- PropertyDescriptor.cs
- EmptyCollection.cs
- CompilerTypeWithParams.cs
- WindowsPrincipal.cs
- Rect3D.cs
- SqlCommandSet.cs
- Events.cs
- GraphicsContainer.cs
- AssemblyBuilderData.cs
- Encoding.cs
- BookmarkCallbackWrapper.cs
- BypassElementCollection.cs
- FirewallWrapper.cs
- AnnouncementClient.cs
- BoolExpr.cs
- PropertyMapper.cs
- InvalidComObjectException.cs
- AssemblyUtil.cs
- OracleCommandSet.cs
- PersonalizationEntry.cs
- CommentAction.cs
- LoadedOrUnloadedOperation.cs
- FontWeights.cs
- ZipQueryOperator.cs
- ListViewHitTestInfo.cs
- MetadataItemCollectionFactory.cs
- SafeMILHandle.cs
- CatalogPart.cs
- ImpersonationContext.cs
- QilNode.cs
- PageParserFilter.cs
- WebPartEditorApplyVerb.cs
- HtmlTextArea.cs
- precedingsibling.cs
- RuleSettingsCollection.cs
- ScaleTransform.cs
- CacheVirtualItemsEvent.cs
- Nullable.cs
- ScriptManager.cs
- ISO2022Encoding.cs
- _HelperAsyncResults.cs
- TTSEngineProxy.cs
- SqlNotificationRequest.cs
- SimpleType.cs
- RelationshipType.cs
- NavigationCommands.cs
- InvokeGenerator.cs
- JournalEntryListConverter.cs
- InheritablePropertyChangeInfo.cs
- PaginationProgressEventArgs.cs
- BindingsSection.cs
- FilterQuery.cs
- HttpPostProtocolReflector.cs
- BitmapSourceSafeMILHandle.cs
- DataGridColumnReorderingEventArgs.cs
- ProviderUtil.cs
- SelectionProviderWrapper.cs
- SQLResource.cs
- DataDocumentXPathNavigator.cs
- ReferenceList.cs
- ExpressionParser.cs
- DrawItemEvent.cs
- PrintEvent.cs
- Pair.cs
- TextPatternIdentifiers.cs
- WebPartZone.cs
- NativeMethodsCLR.cs
- SqlDataSourceDesigner.cs
- ThreadLocal.cs
- FlowDocumentPaginator.cs
- HtmlForm.cs
- XpsFixedDocumentReaderWriter.cs
- ComMethodElement.cs
- WebHostedComPlusServiceHost.cs
- AddDataControlFieldDialog.cs
- BitArray.cs
- BoolExpr.cs
- DesignerOptionService.cs
- httpapplicationstate.cs
- QuaternionAnimation.cs
- LinkTarget.cs
- ExpandCollapsePattern.cs
- OutputScopeManager.cs
- ItemsPanelTemplate.cs
- WebPermission.cs
- ReadContentAsBinaryHelper.cs
- PropertyGridEditorPart.cs
- SelectedDatesCollection.cs
- ArraySubsetEnumerator.cs
- TypeElement.cs
- StylusShape.cs
- CalendarButton.cs
- SmtpAuthenticationManager.cs
- ServiceNameElementCollection.cs
- StorageRoot.cs