cygload.c File Reference

Loader for Asterisk under Cygwin/windows. Open the dll, locate main, run. More...

#include <unistd.h>
#include <dlfcn.h>
#include <stdio.h>

Include dependency graph for cygload.c:

Go to the source code of this file.

Typedefs

typedef int(* main_f )(int argc, char *argv[])

Functions

int main (int argc, char *argv[])


Detailed Description

Loader for Asterisk under Cygwin/windows. Open the dll, locate main, run.

Definition in file cygload.c.


Typedef Documentation

typedef int(* main_f)(int argc, char *argv[])

Definition at line 27 of file cygload.c.


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 29 of file cygload.c.

References NULL.

00030 {
00031    main_f ast_main = NULL;
00032    void *handle = dlopen("asterisk.dll", 0);
00033    if (handle)
00034       ast_main = (main_f)dlsym(handle, "main");
00035    if (ast_main)
00036       return ast_main(argc, argv);
00037    fprintf(stderr, "could not load Asterisk, %s\n", dlerror());
00038    return 1;   /* there was an error */
00039 }


Generated on Thu Apr 16 06:30:32 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6