Cygwin dll from C# Application
Brian Dessent
brian@dessent.net
Wed Jul 23 17:54:00 GMT 2008
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/
More information about the Cygwin
mailing list