visual c++ - Creation of Interface in C# inoder to access some of the function in C# using a vc++ dll -


I have created a DLL in vc ++ and I need this dll to communicate with the C # component. # To create an interface so that I can use the C # component

I have the net framework 3.5

If your DLL is one It is a Net Library, it refers to your Net Prospect and you have the right to go. However it needs to be made with the normal LANGUAGE standard.

If your DLL is a COM library then it should be recovered in your net project and should create a net cover for it.

Otherwise, you want to type the API wrapper for each function that you want to do. It's been a while since I have done this, but some good resources on the web should be there.

If I miss that you only declare the method to specify the DLL file name with the delimport attribute , And then that method will poinvoke any call effectively if the data structure is complex, do not forget that C # reference (& amp;), dereference (*) and arrow indicator (->) Operators, who do C ++, summer Udder, but you have "unsafe" this method. The Marshalling Class (I think) also allows you to pin and free data items, so that they can not go to the address.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -