How do I call/reference a Vc++ dll from a c# windows form application?

Abhishek

You'll need to use P/Invoke which can become complicated depending on the parameters you need to pass.

You'll need to use P/Invoke which can become complicated depending on the parameters you need to pass.

Hi,

I just need to pass a string to a function in the dll. However, the dll has a number of other supporting .cpp files that use the string (which is nothing but a file path) and processes the file as needed.

I am having problems referencing the dll into my c# project. It gives some error, something to do with the dll not being a COM component.

Any suggestions?

Abhishek