C # эквивалент C const char **
Я хочу реализовать привязку Mongoose (http://code.google.com/p/mongoose/) в C #. Есть несколько примеров, но они неработать с текущей версией.
Это мой текущий вызов функции:
[DllImport("_mongoose",CallingConvention=CallingConvention.Cdecl)] private static extern IntPtr mg_start(int zero, Nullable, string options);
(Рабочий) C эквивалент будет:
const char *options[] = {
"document_root", "/var/www",
"listening_ports", "80,443s",
NULL
};
struct mg_context *ctx = mg_start(&my_func, NULL, options);
где mg_start определяется как:
struct mg_context *mg_start(mg_callback_t callback, void *user_data,
const char **options);
Вы можете найти весь пример C здесь:https://svn.apache.org/repos/asf/incubator/celix/trunk/remote_services/remote_service_admin_http/private/include/mongoose.h
Как я могу передатьconst char *options[]
к с #?
Спасибо