0

I want to use my c# dll in a java project. Now I need to create a wrapper library for my c# code.

My C#-Method has this signature

    public static String scanFile(String path)

now how can I call this from my wrapper c++ class?

String scanFile(const System::String path){
    return CardScan32::Scanner::scanFile(path);
}

Currently I try this but its not working, because it cannot be called with this argument list

Al Phaba
  • 6,545
  • 12
  • 51
  • 83
  • you might fin this [this](http://stackoverflow.com/questions/13293888/how-to-call-a-c-sharp-library-from-native-c-using-c-cli-and-ijw) discussion useful – Al.exe Mar 25 '15 at 22:37

1 Answers1

0

You should use System::String^ path in your c++ cli wrapper. You should remove the const too.

KooKoo
  • 451
  • 3
  • 20