I want to implement a Mongoose (http://code.google.com/p/mongoose/) Binding in C#. There are some examples, but they don't work with the current version.
This is my current function call:
[DllImport("_mongoose",CallingConvention=CallingConvention.Cdecl)] private static extern IntPtr mg_start(int zero, Nullable, string options);
The (working) C equivalent would be:
const char *options[] = {
"document_root", "/var/www",
"listening_ports", "80,443s",
NULL
};
struct mg_context *ctx = mg_start(&my_func, NULL, options);
where mg_start is defined as:
struct mg_context *mg_start(mg_callback_t callback, void *user_data,
const char **options);
You can find the whole C example here: https://svn.apache.org/repos/asf/incubator/celix/trunk/remote_services/remote_service_admin_http/private/include/mongoose.h
How do I transfer the const char *options[]
to c#?
Thank you