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
- UnsafeNativeMethods.cs
- ProfessionalColors.cs
- MasterPageParser.cs
- ManipulationDeltaEventArgs.cs
- TextFormatterHost.cs
- ObjectStateManager.cs
- milexports.cs
- FloaterParagraph.cs
- TextEditorDragDrop.cs
- TemplateFactory.cs
- TcpTransportSecurityElement.cs
- Authorization.cs
- VerificationException.cs
- WindowsRichEdit.cs
- RawMouseInputReport.cs
- ServiceModelConfigurationSectionCollection.cs
- HasCopySemanticsAttribute.cs
- login.cs
- StylusPointPropertyId.cs
- CssClassPropertyAttribute.cs
- SecurityUniqueId.cs
- GcSettings.cs
- CommonGetThemePartSize.cs
- EntityRecordInfo.cs
- SafeNativeMethods.cs
- prefixendpointaddressmessagefiltertable.cs
- HostingEnvironmentSection.cs
- ToolBarOverflowPanel.cs
- ResourceAttributes.cs
- RotateTransform3D.cs
- SmiContext.cs
- ErrorView.xaml.cs
- IISMapPath.cs
- SafeNativeMethodsCLR.cs
- DragSelectionMessageFilter.cs
- DrawItemEvent.cs
- Trace.cs
- EditorPartChrome.cs
- HtmlMeta.cs
- InfiniteTimeSpanConverter.cs
- GlobalItem.cs
- Utils.cs
- SwitchExpression.cs
- InnerItemCollectionView.cs
- BCLDebug.cs
- TabOrder.cs
- NavigationCommands.cs
- TabControlCancelEvent.cs
- InkCanvasAutomationPeer.cs
- XmlToDatasetMap.cs
- RootBrowserWindowAutomationPeer.cs
- TemplateFactory.cs
- DataGridItemEventArgs.cs
- TimeoutException.cs
- CodeThrowExceptionStatement.cs
- ClientUrlResolverWrapper.cs
- PageAdapter.cs
- WebEventCodes.cs
- LogFlushAsyncResult.cs
- PartManifestEntry.cs
- PngBitmapDecoder.cs
- LinkUtilities.cs
- CodeGenerator.cs
- WsdlBuildProvider.cs
- MissingMemberException.cs
- ChooseAction.cs
- IISUnsafeMethods.cs
- ThemeInfoAttribute.cs
- CodeSnippetCompileUnit.cs
- ServiceRoute.cs
- HashSetDebugView.cs
- PrivilegeNotHeldException.cs
- UnsafeNativeMethods.cs
- ObjectPropertyMapping.cs
- ConstructorExpr.cs
- ForeignKeyConstraint.cs
- ArrayExtension.cs
- SmtpFailedRecipientsException.cs
- HierarchicalDataSourceControl.cs
- SqlFormatter.cs
- CursorConverter.cs
- UnmanagedMemoryStreamWrapper.cs
- TypeLoadException.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- X509ChainElement.cs
- AbandonedMutexException.cs
- ClientSettings.cs
- SystemIPGlobalStatistics.cs
- CodeEntryPointMethod.cs
- PropVariant.cs
- CompareInfo.cs
- GridViewRowCollection.cs
- DataColumnCollection.cs
- TraceSwitch.cs
- UIElementHelper.cs
- CurrencyManager.cs
- XhtmlBasicSelectionListAdapter.cs
- ImageKeyConverter.cs
- ApplicationContext.cs
- SerializationStore.cs