Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Mixing Managed and Unmanaged code

, 30 May 2001
C++ managed code introduced us a new string type, namely System.String. You can imagine though, that some conversion functions are needed to work with this new string type when mixing managed and unmanaged code in your project.
managed_unmanaged_src.zip
My Projects
CodeProject - Contest
StringSampleCSharp
StringSample
#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

Share

About the Author

Nick Van den Abbeele
Web Developer
Belgium Belgium
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 31 May 2001
Article Copyright 2001 by Nick Van den Abbeele
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid