Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / ComponentModel / COM2Interop / Int32CAMarshaler.cs / 1305376 / 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
- ParentQuery.cs
- ImageBrush.cs
- RepeaterItem.cs
- SmtpReplyReader.cs
- Number.cs
- ReachDocumentPageSerializerAsync.cs
- UnmanagedMemoryStream.cs
- Propagator.cs
- PersonalizableAttribute.cs
- TextMessageEncoder.cs
- SimpleTypeResolver.cs
- DataSourceViewSchemaConverter.cs
- DataGridViewColumnConverter.cs
- PrintingPermission.cs
- UnknownBitmapEncoder.cs
- Classification.cs
- XmlSchemaAll.cs
- XXXInfos.cs
- KeyEvent.cs
- FontUnitConverter.cs
- SignatureHelper.cs
- SQLDateTimeStorage.cs
- FileRecordSequenceHelper.cs
- LassoHelper.cs
- sqlinternaltransaction.cs
- ToolboxItemCollection.cs
- MetadataItemSerializer.cs
- StrokeNodeEnumerator.cs
- OleAutBinder.cs
- ServiceOperationListItem.cs
- WmlPanelAdapter.cs
- SafeNativeMethods.cs
- URL.cs
- DataGridCell.cs
- RenameRuleObjectDialog.Designer.cs
- ResourceExpressionEditor.cs
- CodeNamespaceCollection.cs
- CollectionViewGroupInternal.cs
- ComPlusServiceHost.cs
- JsonSerializer.cs
- FixUp.cs
- Pens.cs
- MappingMetadataHelper.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- WrappedIUnknown.cs
- OperationAbortedException.cs
- SecUtil.cs
- WebPermission.cs
- BufferedGraphics.cs
- FolderBrowserDialog.cs
- ActivityWithResultWrapper.cs
- Vector3DCollection.cs
- DeriveBytes.cs
- ColorTransformHelper.cs
- ValidatedControlConverter.cs
- FlowDocumentFormatter.cs
- PropertyValueChangedEvent.cs
- SQLInt16Storage.cs
- DBSchemaTable.cs
- BinaryReader.cs
- EventMappingSettings.cs
- TdsParserSafeHandles.cs
- EncoderBestFitFallback.cs
- SimpleBitVector32.cs
- TrustManagerMoreInformation.cs
- PropertyMap.cs
- ResolveCriteria.cs
- WebMessageEncodingBindingElement.cs
- TouchEventArgs.cs
- DefaultObjectMappingItemCollection.cs
- ScriptDescriptor.cs
- CheckBoxBaseAdapter.cs
- TableRowGroup.cs
- HttpCachePolicy.cs
- SQLUtility.cs
- DbBuffer.cs
- XamlStream.cs
- SmiContextFactory.cs
- BoolLiteral.cs
- PropVariant.cs
- SafeFileMapViewHandle.cs
- PropertyIDSet.cs
- ProviderCollection.cs
- ConfigurationLockCollection.cs
- WebPartZoneBase.cs
- BehaviorEditorPart.cs
- FileEnumerator.cs
- DesignerView.Commands.cs
- StringToken.cs
- DebuggerAttributes.cs
- PackWebRequestFactory.cs
- BaseDataBoundControl.cs
- SQLCharsStorage.cs
- XPathNodePointer.cs
- CompModSwitches.cs
- ProxyWebPart.cs
- NumericUpDown.cs
- ScriptControlManager.cs
- Root.cs
- DSASignatureFormatter.cs