Loader for Asterisk under Cygwin/windows. Open the dll, locate main, run. More...
#include <unistd.h>#include <dlfcn.h>#include <stdio.h>
Go to the source code of this file.
Typedefs | |
| typedef int(* | main_f )(int argc, char *argv[]) |
Functions | |
| int | main (int argc, char *argv[]) |
Loader for Asterisk under Cygwin/windows. Open the dll, locate main, run.
Definition in file cygload.c.
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 29 of file cygload.c.
{
main_f ast_main = NULL;
void *handle = dlopen("asterisk.dll", 0);
if (handle)
ast_main = (main_f)dlsym(handle, "main");
if (ast_main)
return ast_main(argc, argv);
fprintf(stderr, "could not load Asterisk, %s\n", dlerror());
return 1; /* there was an error */
}
1.7.1