Re: Is it possible to directly call a function in a dlopen library

2006-12-23 Thread andy wang
Brain, Thanks for the very useful details. I think such tricky technics will be normal in the future. automatically load the dynamic library on the fly is the job the better loader will do. But now I should find a way myself to do that tricky and dirty way which may be common and normal way in t

Re: Is it possible to directly call a function in a dlopen library

2006-12-22 Thread Brian Dessent
andy wang wrote: > So maybe it is possible on Linux? I asked this question because I find > this kind of logic in asterisk! the main program will load the .so > using dlopen. i.e. module1.so and module2.so, and I notice that > module2.so will call directly (without dlsym, just func1( ... ) which >

Re: Is it possible to directly call a function in a dlopen library

2006-12-22 Thread andy wang
Hi, Brain: Your answer is always the guide. Thanks a lot! So maybe it is possible on Linux? I asked this question because I find this kind of logic in asterisk! the main program will load the .so using dlopen. i.e. module1.so and module2.so, and I notice that module2.so will call directly (witho

Re: Is it possible to directly call a function in a dlopen library

2006-12-22 Thread Brian Dessent
andy wang wrote: > On the module2.dll, I just want to directly call myfunc1 without using > dlsym(), is that possible? I was just wondering that I just dlopen > module1 and module2, then directly call the function without dlsym(). > I know that it is not a strictly cygwin-related question :-) It

Re: Is it possible to directly call a function in a dlopen library

2006-12-22 Thread andy wang
Hi, Larry, Thanks for the reply. > i.e. > module1.dll > { > int myfunc1() { do something; } > } > > module2.dll > { > int myfunc2() { myfunc1(); do other things;} > } > > main.exe > { > dlopen("module1.dll") > dlopen("module2.dll") > some tricky and mystery procedure. > myfunc2(); /

Re: Is it possible to directly call a function in a dlopen library

2006-12-22 Thread Larry Hall (Cygwin)
andy wang wrote: Hi, All: Is it possible in cygwin to call a function in a dlopen library? i.e. module1.dll { int myfunc1() { do something; } } module2.dll { int myfunc2() { myfunc1(); do other things;} } main.exe { dlopen("module1.dll") dlopen("module2.dll") some tricky and mystery

Is it possible to directly call a function in a dlopen library

2006-12-21 Thread andy wang
Hi, All: Is it possible in cygwin to call a function in a dlopen library? i.e. module1.dll { int myfunc1() { do something; } } module2.dll { int myfunc2() { myfunc1(); do other things;} } main.exe { dlopen("module1.dll") dlopen("module2.dll") some tricky and mystery procedure. myfun