Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TypedTableGenerator.cs
- SymbolMethod.cs
- MimeMultiPart.cs
- ActionItem.cs
- XmlException.cs
- BinaryMethodMessage.cs
- WebPartVerbsEventArgs.cs
- TransformerConfigurationWizardBase.cs
- GlyphRunDrawing.cs
- CursorConverter.cs
- HitTestFilterBehavior.cs
- FolderBrowserDialog.cs
- ZipIOBlockManager.cs
- AspNetHostingPermission.cs
- ResourceKey.cs
- SafeThemeHandle.cs
- EUCJPEncoding.cs
- SpecialNameAttribute.cs
- Variable.cs
- ClientApiGenerator.cs
- ProviderCollection.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- ReachDocumentSequenceSerializerAsync.cs
- TraceEventCache.cs
- BinaryWriter.cs
- ProjectionCamera.cs
- ContentPathSegment.cs
- EventSetterHandlerConverter.cs
- DataRelation.cs
- TaiwanLunisolarCalendar.cs
- RawStylusSystemGestureInputReport.cs
- autovalidator.cs
- ToolStripStatusLabel.cs
- SharedPerformanceCounter.cs
- GridViewColumnHeader.cs
- ToolStripLabel.cs
- XpsThumbnail.cs
- Msmq3PoisonHandler.cs
- ReadContentAsBinaryHelper.cs
- AnimationClock.cs
- NetMsmqSecurityMode.cs
- SlotInfo.cs
- TraceListener.cs
- PolygonHotSpot.cs
- SQLInt16Storage.cs
- Glyph.cs
- wmiprovider.cs
- _ScatterGatherBuffers.cs
- XmlSerializerNamespaces.cs
- TripleDES.cs
- SecurityException.cs
- ListItemParagraph.cs
- CounterCreationDataCollection.cs
- BaseProcessor.cs
- ObfuscationAttribute.cs
- MethodToken.cs
- IpcClientManager.cs
- ListMarkerLine.cs
- ClientApiGenerator.cs
- SoapSchemaMember.cs
- ClientRuntimeConfig.cs
- TreeNodeMouseHoverEvent.cs
- CreateUserWizardDesigner.cs
- PeerEndPoint.cs
- BuilderElements.cs
- StructuredTypeEmitter.cs
- DurationConverter.cs
- AppSettingsReader.cs
- XmlDocumentSerializer.cs
- ErrorsHelper.cs
- NetworkInformationPermission.cs
- ValidationSummary.cs
- SoapDocumentMethodAttribute.cs
- StaticDataManager.cs
- ItemsControlAutomationPeer.cs
- TemplateManager.cs
- DbgCompiler.cs
- TreeNodeEventArgs.cs
- UInt32.cs
- ConnectionsZone.cs
- ConnectorSelectionGlyph.cs
- EmptyElement.cs
- RecognizerBase.cs
- CalendarKeyboardHelper.cs
- DrawingContextWalker.cs
- SerializableTypeCodeDomSerializer.cs
- WebPartTracker.cs
- BoolExpression.cs
- ProgressBar.cs
- WinInet.cs
- PropVariant.cs
- XPathNodeInfoAtom.cs
- MergeFilterQuery.cs
- StronglyTypedResourceBuilder.cs
- CompilationLock.cs
- SecurityTokenProvider.cs
- XPathScanner.cs
- DecimalAnimation.cs
- ParameterCollection.cs
- Variable.cs