Click here to Skip to main content
15,881,812 members
Articles / Programming Languages / C#

Using the .NET managed TCP/IP classes in a managed C++ appplication

Rate me:
Please Sign up or sign in to vote.
4.67/5 (3 votes)
15 Oct 20012 min read 82.3K   2.3K   21  
This sample demonstrates a basic technique of networking using the TCP/IP protocol in a managed C++ application by implementing a simple POP3 client.
#using <mscorlib.dll>

using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;

//
// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[__assembly::AssemblyTitleAttribute("")];
[__assembly::AssemblyDescriptionAttribute("")];
[__assembly::AssemblyConfigurationAttribute("")];
[__assembly::AssemblyCompanyAttribute("")];
[__assembly::AssemblyProductAttribute("")];
[__assembly::AssemblyCopyrightAttribute("")];
[__assembly::AssemblyTrademarkAttribute("")];
[__assembly::AssemblyCultureAttribute("")];		

//
// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Revision
//      Build Number
//
// You can specify all the value or you can default the Revision and Build Numbers 
// by using the '*' as shown below:

[__assembly::AssemblyVersionAttribute("1.0.*")];

//
// In order to sign your assembly you must specify a key to use. Refer to the 
// COM+ 2.0 documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing. 
//
// Notes: 
//   (*) If no key is specified - the assembly cannot be signed.
//   (*) KeyName refers to a key that has been installed in the Crypto Service
//       Provider (CSP) on your machine. 
//   (*) If the key file and a key name attributes are both specified, the 
//       following processing occurs:
//       (1) If the KeyName can be found in the CSP - that key is used.
//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
//           in the file is installed into the CSP and used.
//   (*) Delay Signing is an advanced option - see the COM+ 2.0 documentation for 
//       more information on this.
//
[__assembly::AssemblyDelaySignAttribute(false)];
[__assembly::AssemblyKeyFileAttribute("")];
[__assembly::AssemblyKeyNameAttribute("")];

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions