| 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
In Solution Explorer, right-click the COMClient project, and clicking Properties.
Open the Configuration Properties folder and click Debug.
In the command line Arguments property, enter a name.
Click OK.
On the Debug menu, click Start Without Debugging.
To build and run the "COM Interop Part Two" sample from the command line
-
Use the Change Directory command to go to the Cominteroppart2\comclient directory.
-
Copies C # server code into the COMClient directory:
copy: \csharpserver\csharpserver.cs |
-
Compile server:
csc/target:library Csharpserver.csre Gasm csharpserver.dll/tlb:csharpserver.tlb |
-
Compile the client (make sure that the vcvars32.ba Path and environment variables are set correctly in T:
-
Run client:
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)