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
- JsonReaderDelegator.cs
- CqlIdentifiers.cs
- arabicshape.cs
- SingleKeyFrameCollection.cs
- InputMethod.cs
- JournalNavigationScope.cs
- ParserExtension.cs
- XPathAncestorQuery.cs
- Internal.cs
- CodeCompiler.cs
- SerializationFieldInfo.cs
- XamlPoint3DCollectionSerializer.cs
- SamlDelegatingWriter.cs
- RectAnimationUsingKeyFrames.cs
- AdornerDecorator.cs
- ArrayListCollectionBase.cs
- ReflectEventDescriptor.cs
- CompilerHelpers.cs
- comcontractssection.cs
- ModelFunction.cs
- SlotInfo.cs
- __FastResourceComparer.cs
- StringUtil.cs
- SqlEnums.cs
- WizardPanel.cs
- RemoteWebConfigurationHostStream.cs
- ToolboxComponentsCreatingEventArgs.cs
- Table.cs
- TcpProcessProtocolHandler.cs
- StateMachine.cs
- LicenseProviderAttribute.cs
- SQLResource.cs
- WebPartHeaderCloseVerb.cs
- ControlBuilder.cs
- SafeTokenHandle.cs
- MatrixAnimationUsingKeyFrames.cs
- GetResponse.cs
- QuestionEventArgs.cs
- CacheForPrimitiveTypes.cs
- PageParser.cs
- DescendentsWalkerBase.cs
- CodeTypeConstructor.cs
- DelegatingChannelListener.cs
- MemberCollection.cs
- TraceRecord.cs
- MatrixTransform.cs
- SQLSingleStorage.cs
- DiscardableAttribute.cs
- DirtyTextRange.cs
- securitycriticaldataformultiplegetandset.cs
- SearchForVirtualItemEventArgs.cs
- InternalConfigHost.cs
- FunctionQuery.cs
- VariableBinder.cs
- CopyAction.cs
- OutputScopeManager.cs
- Version.cs
- PerformanceCounter.cs
- RepeatBehavior.cs
- PageClientProxyGenerator.cs
- ArglessEventHandlerProxy.cs
- ProfileGroupSettingsCollection.cs
- FormsAuthenticationConfiguration.cs
- ApplicationServiceHelper.cs
- UrlAuthorizationModule.cs
- DataGridViewElement.cs
- Stroke.cs
- PixelShader.cs
- XmlReaderSettings.cs
- WorkerRequest.cs
- OleDbEnumerator.cs
- TreeNode.cs
- GeneralTransform2DTo3DTo2D.cs
- SystemBrushes.cs
- FontStretches.cs
- UserControlCodeDomTreeGenerator.cs
- SystemFonts.cs
- ProviderManager.cs
- SinglePageViewer.cs
- AstTree.cs
- ThicknessKeyFrameCollection.cs
- GridErrorDlg.cs
- MDIWindowDialog.cs
- ServiceDescription.cs
- LazyTextWriterCreator.cs
- Typeface.cs
- SafeRightsManagementPubHandle.cs
- StringUtil.cs
- ObjectContext.cs
- ImageList.cs
- Compilation.cs
- TimelineClockCollection.cs
- Zone.cs
- EventMappingSettingsCollection.cs
- EdmComplexPropertyAttribute.cs
- DetailsViewDeletedEventArgs.cs
- Query.cs
- Frame.cs
- ProxyDataContractResolver.cs
- MergeFilterQuery.cs