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
- XmlUtil.cs
- RegexGroupCollection.cs
- PeerNameRegistration.cs
- RectAnimation.cs
- PointConverter.cs
- SerializationFieldInfo.cs
- InstanceDescriptor.cs
- NameObjectCollectionBase.cs
- BasicExpandProvider.cs
- WebControl.cs
- UDPClient.cs
- ListArgumentProvider.cs
- KeyGestureConverter.cs
- TextFormatterContext.cs
- TypeConverterAttribute.cs
- UserInitiatedNavigationPermission.cs
- GridViewSelectEventArgs.cs
- InvalidTimeZoneException.cs
- CreateUserWizardStep.cs
- OledbConnectionStringbuilder.cs
- ClaimSet.cs
- CharConverter.cs
- ResourcePermissionBase.cs
- ConfigXmlText.cs
- _TimerThread.cs
- HostingEnvironmentException.cs
- ObjectSet.cs
- NullableBoolConverter.cs
- ITreeGenerator.cs
- AutomationEvent.cs
- GenericWebPart.cs
- XmlSchemaObjectCollection.cs
- DateTimeOffset.cs
- ExpressionBuilder.cs
- CryptoProvider.cs
- FirstMatchCodeGroup.cs
- MetadataCollection.cs
- ServiceHostingEnvironmentSection.cs
- BrowserDefinitionCollection.cs
- SignatureGenerator.cs
- NamespaceInfo.cs
- StrongNamePublicKeyBlob.cs
- ExpressionVisitor.cs
- TimeSpanValidatorAttribute.cs
- UriSection.cs
- DefaultTextStore.cs
- DESCryptoServiceProvider.cs
- FontStretches.cs
- TextReader.cs
- SecurityManager.cs
- ActionMessageFilterTable.cs
- BitmapFrameDecode.cs
- BulletedListEventArgs.cs
- GeneralTransform3DTo2DTo3D.cs
- ZipFileInfo.cs
- OverflowException.cs
- _NTAuthentication.cs
- BindingCompleteEventArgs.cs
- IdentifierCreationService.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- Visual3D.cs
- Helpers.cs
- XmlDomTextWriter.cs
- DoubleAnimationBase.cs
- Profiler.cs
- DataGridViewCellStyleConverter.cs
- CompilationUtil.cs
- FlowDocumentPaginator.cs
- SocketConnection.cs
- AtomEntry.cs
- XmlAnyAttributeAttribute.cs
- MessageDecoder.cs
- KeyManager.cs
- ProgressChangedEventArgs.cs
- BindableTemplateBuilder.cs
- ZoneButton.cs
- CultureTableRecord.cs
- SrgsItemList.cs
- MessageQueueInstaller.cs
- ConfigurationSchemaErrors.cs
- HashAlgorithm.cs
- NativeMethodsOther.cs
- MetadataFile.cs
- Effect.cs
- BitmapPalette.cs
- ScrollBar.cs
- SecurityContext.cs
- DictionaryChange.cs
- Classification.cs
- TextProperties.cs
- Mappings.cs
- HiddenField.cs
- ImageListImageEditor.cs
- odbcmetadatafactory.cs
- SerialPort.cs
- DataGridCommandEventArgs.cs
- ExpressionBuilderContext.cs
- TypeDefinition.cs
- SetMemberBinder.cs
- ProviderConnectionPointCollection.cs