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: Possible to use pinvoke to call DLL built with cygwin


Hey guys,
  I really appreciate all the help.  I made some changes to the
cygload.cc program by adding a changing the main method into a
init_cygwin_lib method and building it as a shared library.  My C#
application now calls this init_cygwin_lib, but when it does the
application just mysteriously exits when the
cygwin1.dll:cygwin_dll_init() is called.  I suspect the funky stack
pointer logic is corrupting some memory:

Connecting to cygwin...
Warning!  Stack base is 0xdb0000.  padding ends at 0xdaf844.  Delta is
1980.  St
ack variables could be overwritten!
Loading cygwin1.dll...
Initializing cygwin...
Before cygwin_dll_init call.

Is there anything else I can try? Thanks!

Regards,
Sammy

On 11/1/06, Larry Hall (Cygwin) <reply-to-list-only-lh@cygwin.com> wrote:
Sammy Yu wrote:
> Hey guys,
>   Thanks for the quick response.  I've tried calling the
> cygwin_dll_init method but I'm still getting the same error.  I think
> it's because of the 4K scratch space on stack size limitation
> mentioned here:
> http://sourceware.redhat.com/cygwin/faq/faq-nochunks.html.   Is this
> correct?  Being relative new to C#, I am not aware of anyway of
> changing the stack size.  This is probably wrong news group to ask,
> but has anybody ported over the winsup.api code into a C# version?
>


Not that I know of, no.


You can always call into C code to do what's necessary if C# can't do
what's needed.


-- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746

--
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/



-- 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]