Ylbtech-languagesamples-cominteroppart2 (COM Interop Part II)

Source: Internet
Author: User

Ylbtech-microsoft-csharpsamples:ylbtech-languagesamples-cominteroppart2 (COM Interop Part II)

1.A, example (sample) back to top
"COM Interop Part Two" example

This example demonstrates how to use a C # server with a C + + COM client.

Comments

You must have administrator privileges to run this program, and Visual C + + must be installed to compile this sample.

Safety Instructions

This code example is provided to illustrate a concept that does not represent the most secure coding practice, so you should not use this code example in an application or Web site. Microsoft assumes no responsibility for incidental or consequential damages arising from the use of this code sample for other purposes.

To build and run the "COM Interop second Part" example in Visual Studio
    1. In Solution Explorer, right-click the COMClient project, and clicking Properties.

    2. Open the Configuration Properties folder and click Debug.

    3. In the command line Arguments property, enter a name.

    4. Click OK.

    5. On the Debug menu, click Start Without Debugging.

To build and run the "COM Interop Part Two" sample from the command line
    1. Use the Change Directory command to go to the Cominteroppart2\comclient directory.

    2. Copies C # server code into the COMClient directory:

       copy: \csharpserver\csharpserver.cs 
    3. Compile server:

       csc/target:library Csharpserver.csre Gasm csharpserver.dll/tlb:csharpserver.tlb 
    4. Compile the client (make sure that the vcvars32.ba Path and environment variables are set correctly in T:

       cl COMClient.cpp 
    5. Run client:

       comclient friend 
To make suggestions or report bugs on the Help or other features of this product, visit the feedback site.
1.B, sample code back to top

1.b.1,

1.b.2,

1.B, sample code 2 (sample codes) back to top

1.b.1,

1.b.2,

1.B, sample code 3 (sample codes) back to top

1.b.1,

1.b.2,

1.C, (free Download) back to top

Ylbtech
Source: http://ylbtech.cnblogs.com/
This article is copyright to the author and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility.

Ylbtech-languagesamples-cominteroppart2 (COM Interop Part II)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.