Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / RpcResponse.cs / 1 / RpcResponse.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace Microsoft.InfoCards
{
using System;
using IS = System.Runtime.InteropServices;
internal struct RpcResponse
{
public int Length;
public IntPtr Data;
public IntPtr Marshal()
{
return Create( Data, Length );
}
public static IntPtr Create(
IntPtr data,
int length )
{
RpcResponse response = new RpcResponse();
IntPtr nativeType = IS.Marshal.AllocHGlobal( IS.Marshal.SizeOf( typeof( RpcResponse ) ) );
try
{
response.Length = length;
response.Data = data;
IS.Marshal.StructureToPtr( response, nativeType, false );
return nativeType;
}
catch
{
if( null != nativeType )
{
IS.Marshal.FreeHGlobal( nativeType );
}
throw;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DocobjHost.cs
- OptimizerPatterns.cs
- UseLicense.cs
- ActivityTypeResolver.xaml.cs
- WebPartConnectionsCancelVerb.cs
- DrawListViewSubItemEventArgs.cs
- RoutedUICommand.cs
- WebServiceAttribute.cs
- RoutedPropertyChangedEventArgs.cs
- IdentityElement.cs
- DoubleAnimationUsingKeyFrames.cs
- WorkflowDebuggerSteppingAttribute.cs
- XmlILConstructAnalyzer.cs
- TranslateTransform3D.cs
- TextEndOfParagraph.cs
- OrderByQueryOptionExpression.cs
- StringUtil.cs
- FormConverter.cs
- XappLauncher.cs
- StrongNamePublicKeyBlob.cs
- SmtpAuthenticationManager.cs
- KeyConstraint.cs
- GreenMethods.cs
- sqlnorm.cs
- AsyncPostBackTrigger.cs
- DataBindingCollection.cs
- ApplicationActivator.cs
- DirectoryGroupQuery.cs
- ContractSearchPattern.cs
- SqlTriggerContext.cs
- Tag.cs
- ItemChangedEventArgs.cs
- ScriptServiceAttribute.cs
- ComponentDesigner.cs
- DataGridViewRowsRemovedEventArgs.cs
- Utils.cs
- DaylightTime.cs
- Message.cs
- ThreadStartException.cs
- Socket.cs
- WebPageTraceListener.cs
- ConstraintCollection.cs
- PermissionListSet.cs
- FormViewDeleteEventArgs.cs
- ViewGenerator.cs
- FixUp.cs
- StrokeCollection2.cs
- InplaceBitmapMetadataWriter.cs
- WebPartDisplayModeEventArgs.cs
- Point.cs
- XsdDataContractImporter.cs
- NumericUpDownAcceleration.cs
- PathData.cs
- Dictionary.cs
- InvokeMemberBinder.cs
- AncestorChangedEventArgs.cs
- xmlglyphRunInfo.cs
- ConcurrentQueue.cs
- WindowsGraphics2.cs
- ToolStripOverflowButton.cs
- WorkflowViewElement.cs
- ReadContentAsBinaryHelper.cs
- ResourceCollectionInfo.cs
- _WinHttpWebProxyDataBuilder.cs
- ResourceReader.cs
- WindowsComboBox.cs
- DrawingGroup.cs
- HostingPreferredMapPath.cs
- DoubleLink.cs
- ToolStripSystemRenderer.cs
- ThicknessKeyFrameCollection.cs
- WebPartEditorCancelVerb.cs
- FreezableDefaultValueFactory.cs
- MLangCodePageEncoding.cs
- TypeInformation.cs
- CatalogZoneBase.cs
- IPGlobalProperties.cs
- VectorCollectionValueSerializer.cs
- XmlSchemaExporter.cs
- ClickablePoint.cs
- EncryptedKey.cs
- StylusShape.cs
- ExceptionHandlersDesigner.cs
- SingleKeyFrameCollection.cs
- EditorAttribute.cs
- AttributeAction.cs
- ServiceOperationInfoTypeConverter.cs
- ServiceProviders.cs
- OlePropertyStructs.cs
- FrameworkElement.cs
- MSAAEventDispatcher.cs
- EntityContainer.cs
- ValueProviderWrapper.cs
- PerformanceCountersElement.cs
- XamlWriter.cs
- ReflectTypeDescriptionProvider.cs
- datacache.cs
- ExpressionNormalizer.cs
- CharacterBufferReference.cs
- ShutDownListener.cs