Just create a delegate in managed C# code and then pass that delegate via PInvoke to a C function. The C function will view the delegate as a function pointer. The C function can invoke the function pointer which will call the delegates invocation list and the appropriate managed methods will be called.
Cheers, Adam --- Urs Muff <[EMAIL PROTECTED]> wrote: > Show me how you would right a C function that calls a method of a .Net > object. First of all, try to get a reference of a .Net object. > > - URS C. MUFF > SYSTEMS ARCHITECT - RESEARCH LAB > > > -----Original Message----- > > From: Jeroen Janssen [mailto:[EMAIL PROTECTED]] > > Sent: Monday, January 06, 2003 9:43 AM > > To: mono-list > > Subject: Re: [Mono-list] Will COM be supported? > > > > Urs Muff wrote: > > > > >COM is one of the only ways right now to call back into managed code from > > >legacy/unmanaged code. Will there be another way on mono to interoperate > > >with legacy code, or is COM supported? > > > > > > > > > > Oh, what about delegates? Isn't it also possible to use delegates to > > callback into managed code? > > --- > > Jeroen Janssen > > > > > > _______________________________________________ > > Mono-list maillist - [EMAIL PROTECTED] > > http://lists.ximian.com/mailman/listinfo/mono-list > > _______________________________________________ > Mono-list maillist - [EMAIL PROTECTED] > http://lists.ximian.com/mailman/listinfo/mono-list __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
