Answer the question
In order to leave comments, you need to log in
How to pass a char pointer to a dll function so that it can be further parsed into an array?
Hello.
I work in the environment: C# - main project, C++ - library.
I will shorten my code to point out the problem.
What, in fact, is the question, is there a dll in C ++ with such a function
LaunchJavaApplet(char* JVMOptions[]){
...
JavaVMOption *Options = new JavaVMOption[JVMOptionsCount];
for (int i = 0; i < JVMOptionsCount; i++) {
Options[i].optionString = (char*)(JVMOptions[i]);
}
...
}
Options[0].optionString = "-Xmx512m";
Options[1].optionString = "-Xms1024m";
Answer the question
In order to leave comments, you need to log in
[DllImport("вашалиба.dll", CharSet = Ansi, CallingConvention = CallingConvention.Cdecl)]
public void LaunchJavaApplet([In] string[] JVMOptions);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question