Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi all,

I wanted to write a function in unmanaged code (VC++) that should be called through managed VC++ code.
What all i need to do this task? What all namespaces I need to include in the files?

Piece of code would be really helpful.

Thanks.


Regards,
Joy
Posted
Updated 11-Feb-13 22:09pm
v2

See managed, unmanaged[^] section of MSDN.
 
Share this answer
 
You don't need to do something special. Suppose you have a pair of .h/.cpp with native code where you implement these functions/classes, make sure they are added to the project (the source mainly), include the header in your C++/CLI source file and just call the method. There is nothing special in calling methods than what you know from C++.
 
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