Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / ComponentModel / COM2Interop / OleStrCAMarshaler.cs / 1305376 / OleStrCAMarshaler.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 CALPOLESTR struct given /// from native code. /// internal class OleStrCAMarshaler: BaseCAMarshaler { public OleStrCAMarshaler(NativeMethods.CA_STRUCT caAddr) : base(caAddr) { } ////// /// Returns the type of item this marshaler will /// return in the items array. In this case, the type is string. /// public override Type ItemType { get { return typeof(string); } } protected override Array CreateArray() { return new string[Count]; } ////// /// Override this member to perform marshalling of a single item /// given it's native address. /// protected override object GetItemFromAddress(IntPtr addr) { string item = Marshal.PtrToStringUni(addr); // free the memory Marshal.FreeCoTaskMem(addr); return item; } } } // 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
- EntityDesignerUtils.cs
- MimeTextImporter.cs
- InfoCardX509Validator.cs
- WizardStepBase.cs
- MessageProtectionOrder.cs
- SizeValueSerializer.cs
- IndexedGlyphRun.cs
- DynamicQueryStringParameter.cs
- ResourceDescriptionAttribute.cs
- WebBrowserNavigatingEventHandler.cs
- arclist.cs
- XmlWhitespace.cs
- ObjectQueryProvider.cs
- ConfigurationException.cs
- NullableBoolConverter.cs
- InterleavedZipPartStream.cs
- MostlySingletonList.cs
- TemplateContentLoader.cs
- ExecutionEngineException.cs
- SafeViewOfFileHandle.cs
- HTTPNotFoundHandler.cs
- SafeEventLogWriteHandle.cs
- FieldTemplateUserControl.cs
- BindingContext.cs
- ADConnectionHelper.cs
- OracleConnectionString.cs
- TypeToken.cs
- GridItemPattern.cs
- DefinitionBase.cs
- StorageComplexPropertyMapping.cs
- WebPartZoneCollection.cs
- SqlCommand.cs
- HeaderCollection.cs
- SizeConverter.cs
- ExceptionDetail.cs
- prompt.cs
- X500Name.cs
- PagePropertiesChangingEventArgs.cs
- MobileTextWriter.cs
- MetaDataInfo.cs
- ListView.cs
- RequiredFieldValidator.cs
- TypeConverterHelper.cs
- SqlNodeAnnotation.cs
- Point3DCollection.cs
- LoadWorkflowByKeyAsyncResult.cs
- LassoHelper.cs
- RadioButton.cs
- DesignerOptionService.cs
- ComplexTypeEmitter.cs
- PersistenceProviderBehavior.cs
- DataGridTextBox.cs
- OdbcErrorCollection.cs
- Control.cs
- AutomationPropertyChangedEventArgs.cs
- ProjectedSlot.cs
- DefaultParameterValueAttribute.cs
- ReflectEventDescriptor.cs
- DictionaryGlobals.cs
- SignerInfo.cs
- SqlClientPermission.cs
- SettingsProperty.cs
- XmlText.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- XmlCDATASection.cs
- CommandHelper.cs
- HtmlInputHidden.cs
- SafeProcessHandle.cs
- SID.cs
- Rotation3DKeyFrameCollection.cs
- Shape.cs
- TrustLevelCollection.cs
- VisualProxy.cs
- TreeView.cs
- FocusTracker.cs
- DefaultValueAttribute.cs
- PageEventArgs.cs
- CachedResourceDictionaryExtension.cs
- BrowsableAttribute.cs
- CursorInteropHelper.cs
- HttpRequestTraceRecord.cs
- SoapEnumAttribute.cs
- ThemeDirectoryCompiler.cs
- Italic.cs
- IndentTextWriter.cs
- HwndStylusInputProvider.cs
- GridViewRowCollection.cs
- DataSourceGroupCollection.cs
- _KerberosClient.cs
- EventMappingSettingsCollection.cs
- Range.cs
- log.cs
- BridgeDataReader.cs
- ImmutableCollection.cs
- BorderSidesEditor.cs
- CodeIterationStatement.cs
- HttpCookiesSection.cs
- RC2.cs
- RelatedCurrencyManager.cs
- FileSystemInfo.cs