Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

i created a visual C# project(windows application) and i added an existing project (a visual C++ project). The project in c++ is actually a library with a lot of functions and structures.

 

Now, i don't know how to access the functions in c# from the c++ project.

An ideea was to include a lib file in the c# project (windows application), but i don't know how.

Another ideea was to make a dll file and include this one in the c# project. The problem is that all the functions have as parameters structures defined in that lib/dll file (and i don't know how to access them).

 

Please, help me with a solution on how to resolv this problem.

 

Thanks

  • *Experts*
Posted

Is that a managed C++ dll?

If yes then in your C# project go solution explorer, expand your project, and go to references and browse for your dll and add it.

Posted

Is that the terminator, mutant?

 

I am pretty sure you can put something like this above your unmanaged c++ function:

[DllImport("user32.dll")]

"Your function goes here"

C#
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...