Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
In the VS2015 , I want to call my standard C++ codes in the C++ CRL class library, and then creat DLL given the C# . I don't know to setting this files and exchange parameter. Can you give me some examples about it? thank you very much.

What I have tried:

In the VS2015 , I want to call my standard C++ codes in the C++ CRL class library, and then creat DLL given the C# . I don't know to setting this files and exchange parameter. Can you give me some examples about it? thank you very much.
Posted
Updated 3-Nov-16 19:35pm
Comments
Suvendu Shekhar Giri 3-Nov-16 3:44am    
Not clear!
Do you want to access C# DLL in C++ project or C++ assemblies from C# project?
Angelo.wan 3-Nov-16 9:12am    
I want to write the implementation level of a program module with native C++, the interface level with C++ CLR,and then to create a DLL by them. Finally , I call the DLL through C#.

I'm a newer, don't know how to design it. And how to transmit struct and class between them?

Thank you!
Harpreet05Kaur 3-Nov-16 6:19am    
Please elaborate your question. Its not understandable.
Angelo.wan 3-Nov-16 9:11am    
I want to write the implementation level of a program module with native C++, the interface level with C++ CLR,and then to create a DLL by them. Finally , I call the DLL through C#.

I'm a newer, don't know how to design it. And how to transmit struct and class between them?

Thank you!

1 solution

Hi,

Its simple , Create your logic dll from c++ . Simply use DLLImport class in c# to use your c++ dll methods in c#.

Read about DllImport and how to implement it.

Happy coding
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900