Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/framework/interop/deploying-an-interop-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ An interop application typically includes a .NET client assembly, one or more in
### Private Assemblies
To install an assembly to be used privately, both the application executable and the interop assembly that contains imported COM types must be installed in the same directory structure. The following illustration shows an unsigned interop assembly to be used privately by Client1.exe and Client2.exe, which reside in separate application directories. The interop assembly, which is called LOANLib.dll in this example, is installed twice.

![Directory structure and Windows registry](media/comdeployprivate.gif "comdeployprivate")
Directory structure and registry entries for a private deployment
![Directory structure and Windows registry](./media/deploying-an-interop-application/com-private-deployment.gif "Directory structure and registry entries for a private deployment")

All COM components associated with the application must be installed in the Windows registry. If Client1.exe and Client2.exe in the illustration are installed on different computers, you must register the COM components on both computers.

Expand Down
17 changes: 6 additions & 11 deletions docs/framework/interop/interop-marshaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ ms.author: "ronpet"

Both platform invoke and COM interop use interop marshaling to accurately move method arguments between caller and callee and back, if required. As the following illustration shows, a platform invoke method call flows from managed to unmanaged code and never the other way, except when [callback functions](callback-functions.md) are involved. Even though platform invoke calls can flow only from managed to unmanaged code, data can flow in both directions as input or output parameters. COM interop method calls can flow in either direction.

![Platform invoke](./media/interopmarshaling.png "interopmarshaling")
Platform invoke and COM interop call flow
![Platform invoke](./media/interop-marshaling/interop-marshaling-invoke-and-com.png "Platform invoke and COM interop call flow")

At the lowest level, both mechanisms use the same interop marshaling service; however, certain data types are supported exclusively by COM interop or platform invoke. For details, see [Default Marshaling Behavior](default-marshaling-behavior.md).

Expand All @@ -61,8 +60,7 @@ Platform invoke and COM interop call flow

Because the client and server are in the same apartment, the interop marshaling service automatically handles all data marshaling. The following illustration shows the interop marshaling service operating between managed and unmanaged heaps within the same COM-style apartment.

![Interop marshaling](./media/interopheap.gif "interopheap")
Same-apartment marshaling process
![Interop marshaling between managed and unmanaged heaps](./media/interop-marshaling/interop-heaps-managed-and-unmanaged.gif "Same-apartment marshaling process")

If you plan to export a managed server, be aware that the COM client determines the apartment of the server. A managed server called by a COM client initialized in an MTA must ensure thread safety.

Expand All @@ -78,8 +76,7 @@ Same-apartment marshaling process

When a managed client and unmanaged server are in the same apartment, the interop marshaling service handles all data marshaling. However, when client and server are initialized in different apartments, COM marshaling is also required. The following illustration shows the elements of a cross-apartment call.

![COM marshaling](./media/singleprocessmultapt.gif "singleprocessmultapt")
Cross-apartment call between a .NET client and COM object
![COM marshaling](./media/interop-marshaling/single-process-across-multi-apartment.gif "Cross-apartment call between a .NET client and COM object")

For cross-apartment marshaling, you can do the following:

Expand All @@ -104,14 +101,12 @@ Cross-apartment call between a .NET client and COM object

The following illustration shows how interop marshaling and COM marshaling provide communications channels across process and host boundaries.

![COM marshaling](./media/interophost.gif "interophost")
Cross-process marshaling
![COM marshaling](./media/interop-marshaling/interop-and-com-marshaling.gif "Cross-process marshaling")

### Preserving Identity
The common language runtime preserves the identity of managed and unmanaged references. The following illustration shows the flow of direct unmanaged references (top row) and direct managed references (bottom row) across process and host boundaries.

![COM callable wrapper and runtime callable wrapper](./media/interopdirectref.gif "interopdirectref")
Reference passing across process and host boundaries
![COM callable wrapper and runtime callable wrapper](./media/interop-marshaling/interop-direct-ref-across-process.gif "Reference passing across process and host boundaries")

In this illustration:

Expand All @@ -127,7 +122,7 @@ Reference passing across process and host boundaries
### Managed Remoting
The runtime also provides managed remoting, which you can use to establish a communications channel between managed objects across process and host boundaries. Managed remoting can accommodate a firewall between the communicating components, as the following illustration shows.

![SOAP or TcpChannel](./media/interopremotesoap.gif "interopremotesoap")
![SOAP or TcpChannel](./media/interop-marshaling/interop-remote-soap-or-tcp.gif "Remote calls across firewalls using SOAP or the TcpChannel class")
Remote calls across firewalls using SOAP or the TcpChannel class

Some unmanaged calls can be channeled through SOAP, such as the calls between serviced components and COM.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ This topic describes how to create a long-running workflow service. Long running

1. Under **Start Action** select **Specific Page** and specify `Service1.xamlx`.

![Workflow Service Project Web Properties](../../../../docs/framework/wcf/feature-details/media/startaction.png "StartAction")
![Workflow Service Project Web Properties](./media/creating-a-long-running-workflow-service/start-action-specific-page-option.png "Create the web hosted workflow service - Specific Page option")

2. Under **Servers** select **Use Local IIS Web server**.

![Local Web Server Settings](../../../../docs/framework/wcf/feature-details/media/uselocalwebserver.png "UseLocalWebServer")
![Local Web Server Settings](./media/creating-a-long-running-workflow-service/use-local-web-server.png "Create the web hosted workflow service - Use Local IIS Web Server option")

> [!WARNING]
> You must run Visual Studio 2012 in administrator mode to make this setting.
Expand All @@ -57,73 +57,73 @@ This topic describes how to create a long-running workflow service. Long running
> [!NOTE]
> If CorrelationHandle is not in the Variable Type drop-down, select **Browse for types** from the drop-down. Type CorrelationHandle in the **Type name** box, select CorrelationHandle from the listbox and click **OK**.

![Add Variables](../../../../docs/framework/wcf/feature-details/media/addvariables.gif "AddVariables")
![Add Variables](./media/creating-a-long-running-workflow-service/add-variables-sequential-service-activity.gif "Add variables to the Sequential Service activity.")

6. Drag and drop a **ReceiveAndSendReply** activity template into the **Sequential Service** activity. This set of activities will receive a message from a client and send a reply back.

1. Select the **Receive** activity and set the properties highlighted in the following illustration.

![Set Receive Activity Properties](../../../../docs/framework/wcf/feature-details/media/setreceiveproperties.png "SetReceiveProperties")
![Set Receive Activity Properties](./media/creating-a-long-running-workflow-service/set-receive-activity-properties.png "Set the Receive activity properties.")

The DisplayName property sets the name displayed for the Receive activity in the designer. The ServiceContractName and OperationName properties specify the name of the service contract and operation that are implemented by the Receive activity. For more information about how contracts are used in Workflow services see [Using Contracts in Workflow](../../../../docs/framework/wcf/feature-details/using-contracts-in-workflow.md).

2. Click the **Define...** link in the **ReceiveStartOrder** activity and set the properties shown in the following illustration. Notice that the **Parameters** radio button is selected, a parameter named `p_customerName` is bound to the `customerName` variable. This configures the **Receive** activity to receive some data and bind that data to local variables.

![Setting the data received by the Receive activity](../../../../docs/framework/wcf/feature-details/media/setreceivecontent.png "SetReceiveContent")
![Setting the data received by the Receive activity](./media/creating-a-long-running-workflow-service/set-properties-for-receive-content.png "Set the properties for data received by the Receive activity.")

3. Select The **SendReplyToReceive** activity and set the highlighted property shown in the following illustration.

![Setting the properties of the SendReply activity](../../../../docs/framework/wcf/feature-details/media/setreplyproperties.png "SetReplyProperties")
![Setting the properties of the SendReply activity](./media/creating-a-long-running-workflow-service/set-properties-for-reply-activities.png "SetReplyProperties")

4. Click the **Define...** link in the **SendReplyToStartOrder** activity and set the properties shown in the following illustration. Notice that the **Parameters** radio button is selected; a parameter named `p_orderId` is bound to the `orderId` variable. This setting specifies that the SendReplyToStartOrder activity will return a value of type string to the caller.

![Configuring the SendReply activity content data](../../../../docs/framework/wcf/feature-details/media/setreplycontent.png "SetReplyContent")
![Configuring the SendReply activity content data](./media/creating-a-long-running-workflow-service/setreplycontent-for-sendreplytostartorder-activity.png "Configure setting for SetReplyToStartOrder activity.")

5. Drag and drop an Assign activity in between the **Receive** and **SendReply** activities and set the properties as shown in the following illustration:

![Adding an assign activity](../../../../docs/framework/wcf/feature-details/media/addassign.png "AddAssign")
![Adding an assign activity](./media/creating-a-long-running-workflow-service/add-an-assign-activity.png "Add an assign activity.")

This creates a new order ID and places the value in the orderId variable.

6. Select the **ReplyToStartOrder** activity. In the properties window click the ellipsis button for **CorrelationInitializers**. Select the **Add initializer** link, enter `orderIdHandle` in the Initializer text box, select Query correlation initializer for the Correlation type, and select p_orderId under the XPATH Queries dropdown box. These settings are shown in the following illustration. Click **OK**. This initializes a correlation between the client and this instance of the workflow service. When a message containing this order ID is received it is routed to this instance of the workflow service.

![Adding a correlation initializer](../../../../docs/framework/wcf/feature-details/media/addcorrelationinitializers.png "AddCorrelationInitializers")
![Adding a correlation initializer](./media/creating-a-long-running-workflow-service/add-correlationinitializers.png "Add a correlation initializer.")

7. Drag and drop another **ReceiveAndSendReply** activity to the end of the workflow (outside the **Sequence** containing the first **Receive** and **SendReply** activities). This will receive the second message sent by the client and respond to it.

1. Select the **Sequence** that contains the newly added **Receive** and **SendReply** activities and click the **Variables** button. Add the variable highlighted in the following illustration:

![Adding new variables](../../../../docs/framework/wcf/feature-details/media/addorderitemidvariable.png "AddOrderItemIdVariable")
![Adding new variables](./media/creating-a-long-running-workflow-service/add-the-itemid-variable.png "Add the ItemId variable.")

2. Select the **Receive** activity and set the properties shown in the following illustration:

![Set the Receive acitivity properties](../../../../docs/framework/wcf/feature-details/media/setreceiveproperties2.png "SetReceiveProperties2")
![Set the Receive acitivity properties](./media/creating-a-long-running-workflow-service/set-receive-activities-properties.png "Set the Receive activities properties.")

3. Click the **Define...** link in the **ReceiveAddItem** activity and add the parameters shown in the following illustration:This configures the receive activity to accept two parameters, the order ID and the ID of the item being ordered.

![Specifying parameters for the second receive](../../../../docs/framework/wcf/feature-details/media/addreceive2parameters.png "AddReceive2Parameters")
![Specifying parameters for the second receive](./media/creating-a-long-running-workflow-service/add-receive-two-parameters.png "Configure the receive activity to receive two parameters.")

4. Click the **CorrelateOn** ellipsis button and enter `orderIdHandle`. Under **XPath Queries**, click the drop down arrow and select `p_orderId`. This configures the correlation on the second receive activity. For more information about correlation see [Correlation](../../../../docs/framework/wcf/feature-details/correlation.md).

![Setting the CorrelatesOn property](../../../../docs/framework/wcf/feature-details/media/correlateson.png "CorrelatesOn")
![Setting the CorrelatesOn property](./media/creating-a-long-running-workflow-service/correlateson-setting.png "Set the CorrelatesOn property.")

5. Drag and drop an **If** activity immediately after the **ReceiveAddItem** activity. This activity acts just like an if statement.

1. Set the **Condition** property to `itemId=="Zune HD" (itemId="Zune HD" for Visual Basic)`

2. Drag and drop an **Assign** activity in to the **Then** section and another into the **Else** section set the properties of the **Assign** activities as shown in the following illustration.

![Assigning the result of the service call](../../../../docs/framework/wcf/feature-details/media/resultassign.png "ResultAssign")
![Assigning the result of the service call](./media/creating-a-long-running-workflow-service/assign-result-of-service-call.png "Assign the result of the service call.")

If the condition is `true` the **Then** section will be executed. If the condition is `false` the **Else** section is executed.

3. Select the **SendReplyToReceive** activity and set the **DisplayName** property shown in the following illustration.

![Setting the SendReply activity properties](../../../../docs/framework/wcf/feature-details/media/setreply2properties.png "SetReply2Properties")
![Setting the SendReply activity properties](./media/creating-a-long-running-workflow-service/send-reply-activity-property.png "Set the SendReply activity property.")

4. Click the **Define ...** link in the **SetReplyToAddItem** activity and configure it as shown in the following illustration. This configures the **SendReplyToAddItem** activity to return the value in the `orderResult` variable.

![Setting the data binding for the SendReply activit](../../../../docs/framework/wcf/feature-details/media/replytoadditemcontent.gif "ReplyToAddItemContent")
![Setting the data binding for the SendReply activity](./media/creating-a-long-running-workflow-service/set-property-for-sendreplytoadditem.gif "Set property for SendReplyToAddItem activity.")

8. Open the web.config file and add the following elements in the \<behavior> section to enable workflow persistence.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Each cell within the <xref:System.Windows.Forms.DataGridView> control can have i

The following diagram illustrates this process.

![Properties of type DataGridViewCellStyle](../../../../docs/framework/winforms/controls/media/datagridviewcells1.gif "DataGridViewCells1")
![Properties of type DataGridViewCellStyle](./media/cell-styles-in-the-windows-forms-datagridview-control/datagridviewcells-inheritance-diagram.gif "DataGridViewCells inheritance diagram")

You can also access the styles inherited by specific rows and columns. The column <xref:System.Windows.Forms.DataGridViewColumn.InheritedStyle%2A> property inherits its values from the following properties.

Expand Down Expand Up @@ -116,7 +116,7 @@ Each cell within the <xref:System.Windows.Forms.DataGridView> control can have i

The following diagram illustrates how different <xref:System.Windows.Forms.DataGridViewCellStyle> properties can inherit their values from different places.

![DataGridView property&#45;value inheritance](../../../../docs/framework/winforms/controls/media/datagridviewcells2.gif "DataGridViewCells2")
![DataGridView property&#45;value inheritance](./media/cell-styles-in-the-windows-forms-datagridview-control/datagridviewcells-value-inheritance-diagram.gif "DataGridViewCells value inheritance diagram")

By taking advantage of style inheritance, you can provide appropriate styles for the entire control without having to specify the same information in multiple places.

Expand Down
2 changes: 1 addition & 1 deletion docs/standard/analyzers/api-analyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ When a deprecated API, such as <xref:System.Net.WebClient>, is used in a code, A

The **Error List** window contains warnings with a unique ID per deprecated API, as shown in the following example (`DE004`):

!["Screenshot of the Error List window showing warning's ID and description"](media/api-analyzer/warnings.jpg)
!["Screenshot of the Error List window showing warning's ID and description"](media/api-analyzer/warnings-id-and-descriptions.jpg "Error List window that includes warnings.")

By clicking on the ID, you go to a webpage with detailed information about why the API was deprecated and suggestions regarding alternative APIs that can be used.

Expand Down