1, note: When writing the C#dll class library, it is best not to appear the same namespace, or in C + + may be called a compilation error.
2. Copy C # Source-generated "DLL" files to the debug directory in C + + project
3. Set C + + project properties to common language runtime support
4. Import DLL files and reference militia space in the project
#using". /debug/xxx.dll"usingnamespace xxxx;
5. Instantiate C # object: Cl ^CL = gcnew cl ();
6. Method of calling C # with out string[] Parameters: Intpoweroff (out string[] frameary)
array<string^>^ frameary = gcnew array<string^> (0); int result = cl->PowerOff (frameary);p rintf (" Uplink message:%s", frameary[ 0]);
7. Calling methods with int type and string type
int r = cl->initsetting (1"193.168.18.11 "1000420000);
8, call the method with int[], single[] type parameter: boolsetharmonic (int phase,int[] Int_xtswitch, single[] sng_value, single[] Sng_phase,out String[] frameary)
array<string^>^ frameary = gcnew array<string^> (0); array<float>^ Floatarray = gcnew array<float> (1); array<int> ^ Intarray = gcnew array<int> (1); int n = cl->setharmonic (1, Intarray, Floatarray, Floatarray, frameary);
DLL written in C # in C + + projects using CLR