Re: Cygwin dll from C# Application

2008-07-24 Thread Christopher Faylor
On Wed, Jul 23, 2008 at 11:38:17PM -0700, Stefano Facchetti wrote: >Following the tutorial, I modify my code.. But when I call a dll >method from C# application, it immediatly freeze. I'm not surprised. Loading Cygwin dynamically like this is iffy at best with GNU compilers. If you're using a M

RE: Cygwin dll from C# Application

2008-07-23 Thread Stefano Facchetti
Following the tutorial, I modify my code.. But when I call a dll method from C# application, it immediatly freeze. Here the code: faddll.h #include #include #include namespace cygwin { class padding { public: padding (); ~padding (); private: std::vector< char > _backup;

RE: Cygwin dll from C# Application

2008-07-23 Thread Stefano Facchetti
I'm new on C++ programming.. Can you write an example of 4K scratch space at the bottom of stack on my simple code: #include #include #define DllExport extern "C" __declspec(dllexport) DllExport int Somma(int a,int b); int Somma(int a, int b) { HMODULE h = LoadLibrary("cygwin1.dll");

RE: Cygwin dll from C# Application

2008-07-23 Thread Dave Korn
Stefano Facchetti wrote on 23 July 2008 19:08: > The FAQ tell to read the document: winsup/cygwin/how-cygtls-works.txt > I'm using cygwin under windows vista. Where I can find the document..? The path refers to a location in the sourceware.org CVS repository. You could check out the winsup mod

Re: Cygwin dll from C# Application

2008-07-23 Thread Stefano Facchetti
The FAQ tell to read the document: winsup/cygwin/how-cygtls-works.txt I'm using cygwin under windows vista. Where I can find the document..? Thanks, Fad Brian Dessent wrote: > > > That is not sufficient to dynamically load the library. You need to > re-read the part of the FAQ that explains

Re: Cygwin dll from C# Application

2008-07-23 Thread Brian Dessent
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