Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / MULTI_QI.cs / 1 / MULTI_QI.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System.Collections;
using System.Configuration;
using System.Configuration.Internal;
using System.Web;
using System.Web.Util;
using System.Security;
using System.IO;
using System.Web.Hosting;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Collections.Specialized;
using System.Xml;
using System.Security.Principal;
using System.Threading;
using System.Globalization;
[StructLayout(LayoutKind.Sequential, Pack = 4)]
internal struct MULTI_QI : IDisposable
{
internal MULTI_QI(IntPtr pid) {
piid = pid;
pItf = IntPtr.Zero;
hr = 0;
}
internal IntPtr piid; // 'Guid' can't be marshaled to GUID* here? use IntPtr buffer trick instead
internal IntPtr pItf;
internal int hr;
void IDisposable.Dispose()
{
if (pItf != IntPtr.Zero)
{
Marshal.Release(pItf);
pItf = IntPtr.Zero;
}
if (piid != IntPtr.Zero)
{
Marshal.FreeCoTaskMem(piid);
piid = IntPtr.Zero;
}
GC.SuppressFinalize(this);
}
}
[StructLayout(LayoutKind.Sequential, Pack = 4)]
internal struct MULTI_QI_X64 : IDisposable
{
internal MULTI_QI_X64(IntPtr pid)
{
piid = pid;
pItf = IntPtr.Zero;
hr = 0;
padding = 0;
}
internal IntPtr piid; // 'Guid' can't be marshaled to GUID* here? use IntPtr buffer trick instead
internal IntPtr pItf;
internal int hr;
#pragma warning disable 0649
internal int padding;
#pragma warning restore 0649
void IDisposable.Dispose()
{
if (pItf != IntPtr.Zero) {
Marshal.Release(pItf);
pItf = IntPtr.Zero;
}
if (piid != IntPtr.Zero) {
Marshal.FreeCoTaskMem(piid);
piid = IntPtr.Zero;
}
GC.SuppressFinalize(this);
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InputScopeAttribute.cs
- StructureChangedEventArgs.cs
- ComponentCollection.cs
- ToolStripContainer.cs
- MeasureData.cs
- FrameworkObject.cs
- CharEnumerator.cs
- ReflectPropertyDescriptor.cs
- DomainUpDown.cs
- PolicyStatement.cs
- ManualResetEvent.cs
- PageVisual.cs
- BasicExpressionVisitor.cs
- DataGridViewCellPaintingEventArgs.cs
- ConvertersCollection.cs
- EncodingTable.cs
- VirtualizingPanel.cs
- Interlocked.cs
- CompilerTypeWithParams.cs
- TraceContextEventArgs.cs
- NegationPusher.cs
- SemanticBasicElement.cs
- PathFigure.cs
- TargetParameterCountException.cs
- EpmSourceTree.cs
- CapabilitiesAssignment.cs
- OdbcConnectionFactory.cs
- DesignTimeTemplateParser.cs
- UnsettableComboBox.cs
- TraceListener.cs
- DesignTimeParseData.cs
- CustomAttributeFormatException.cs
- DataGridViewCellMouseEventArgs.cs
- TypeHelpers.cs
- AccessDataSourceWizardForm.cs
- Baml2006SchemaContext.cs
- DiscoveryServiceExtension.cs
- DomainConstraint.cs
- Model3DGroup.cs
- cryptoapiTransform.cs
- ContentAlignmentEditor.cs
- RuleSettingsCollection.cs
- Pkcs7Signer.cs
- PassportIdentity.cs
- UnmanagedMarshal.cs
- MetafileHeader.cs
- FormViewUpdatedEventArgs.cs
- SudsWriter.cs
- OdbcTransaction.cs
- ImportContext.cs
- List.cs
- CodeNamespaceCollection.cs
- DataGridItemAutomationPeer.cs
- DebuggerAttributes.cs
- CodeTypeMember.cs
- DockAndAnchorLayout.cs
- CodeIndexerExpression.cs
- ClientCultureInfo.cs
- EncryptedHeader.cs
- ipaddressinformationcollection.cs
- sqlmetadatafactory.cs
- ApplicationFileParser.cs
- FormViewInsertedEventArgs.cs
- PersonalizationProviderCollection.cs
- SoapReflectionImporter.cs
- WebConfigurationManager.cs
- PageRequestManager.cs
- AuthorizationSection.cs
- ProxyAttribute.cs
- JavaScriptObjectDeserializer.cs
- FactoryMaker.cs
- ServiceRouteHandler.cs
- CalendarDateChangedEventArgs.cs
- DynamicMethod.cs
- ErrorWebPart.cs
- ObjectItemConventionAssemblyLoader.cs
- iisPickupDirectory.cs
- MsmqIntegrationInputChannel.cs
- CorrelationActionMessageFilter.cs
- SiteMapDataSource.cs
- ExpressionParser.cs
- DataRelationPropertyDescriptor.cs
- FontNameConverter.cs
- TrackBar.cs
- AnnouncementDispatcherAsyncResult.cs
- DbQueryCommandTree.cs
- TextBox.cs
- InkCanvasAutomationPeer.cs
- DefaultAssemblyResolver.cs
- ManipulationPivot.cs
- DropDownButton.cs
- EncoderFallback.cs
- AsymmetricSignatureFormatter.cs
- WebPartConnection.cs
- ActivityCodeDomSerializationManager.cs
- Win32PrintDialog.cs
- PropertyRecord.cs
- Crypto.cs
- ComPlusTraceRecord.cs
- PrimitiveCodeDomSerializer.cs