This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin dll from C# Application


Stefano Facchetti wrote:

> int MySum(int a, int b)
> {
>    HMODULE h = LoadLibrary("cygwin1.dll");
>    void (*init)() = (void(*)()) GetProcAddress(h,"cygwin_dll_init");
>    init();
> 
>    return a+b;
> }

That is not sufficient to dynamically load the library.  You need to
re-read the part of the FAQ that explains about the scratch area at the
bottom of the stack.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]