Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用char**作为C#DLLImport参数_C#_C++_Interop_Marshalling_Dllimport - Fatal编程技术网

使用char**作为C#DLLImport参数

使用char**作为C#DLLImport参数,c#,c++,interop,marshalling,dllimport,C#,C++,Interop,Marshalling,Dllimport,我正在尝试使用.NET应用程序中的以下函数 int mysql_library_init(int argc, char **argv, char **groups) 在传递argv和groups参数的地方,请执行以下操作 static char *server_args[] = { "this_program", /* this string is not used */ "--datadir=.", "--key_buffer_size=32M" }; static

我正在尝试使用.NET应用程序中的以下函数

int mysql_library_init(int argc, char **argv, char **groups)
在传递argv和groups参数的地方,请执行以下操作

static char *server_args[] = {
  "this_program",       /* this string is not used */
  "--datadir=.",
  "--key_buffer_size=32M"
};
static char *server_groups[] = {
  "embedded",
  "server",
  "this_program_SERVER",
  (char *)NULL
};

如何在C#中实现这一点?

只需将参数声明为字符串[]


Pinvoking MySql本机接口既痛苦又不必要。使用它。

请检查本文-检查“为调用构建参数”部分下的帮助器方法。非常有用!我正在尝试安装嵌入式MySQL服务器,这些可以吗?我不知道。给他们打个电话,这就是这些人谋生的方式。只要它是嵌入式的,为什么要关心它的实现呢?SqlLite和SQLCompact具有优秀的.NET包装器。