rprtech wrote:
1. Need to write a wrapper function for that .lib file using C++/CLI file and creat a DLL.
This is true. You will need to create a new managed class library in C++ (New > Project > Visual C++ > CLR > Class Library). In this class library you will need to add a reference to the .lib file. Finally, you will have to define and create a "public ref class" that wraps the functionality of the unmanaged code. Don't forget to add the include path of the header file that defines the .lib function.
rprtech wrote:
2. Refer this DLL from C# application & achieve the result.
To reference the C++/CLI class from C# you can add a reference the C++ project. I also like to have both projects in the same solution. You can also build the C++ DLL (class library) and refernce the DLL directly.
rprtech wrote:
Need some sample on writing a wrapper function on C++/CLI .
Just create a public method (static if you like) in your C++ ref class and in the body of the function call to the unmanaged code.