Milton Pividori wrote: > Hi! I have an application which runs well on Linux but fails on Windows > XP. I tried with Gtk# installer (latest) with .NET 3.5, and with Mono > 2.4.3, but I get the same exception: > > System.EntryPointNotFoundException: gtk_enumerate_printers > at (wrapper managed-to-native) Gtk.Printer:gtk_enumerate_printers > (GtkSharp.PrinterFuncNative,intptr,GLib.DestroyNotify,bool) > at Gtk.Printer.EnumeratePrinters (Gtk.PrinterFunc func, Boolean wait) > [0x00000] > at StratosClient.ServicioFacturacion.SolapaServicioImpresion..ctor () > [0x00000] > at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke > (object,object[],System.Exception&) > at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags > invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, > System.Globalization.CultureInfo culture) [0x00000] : gtk_enumerate_printers > > at (wrapper managed-to-native) Gtk.Printer:gtk_enumerate_printers > (GtkSharp.PrinterFuncNative,intptr,GLib.DestroyNotify,bool) > at Gtk.Printer.EnumeratePrinters (Gtk.PrinterFunc func, Boolean wait) > [0x00000] > at StratosClient.ServicioFacturacion.SolapaServicioImpresion..ctor () > [0x00000] > at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke > (object,object[],System.Exception&) > at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags > invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, > System.Globalization.CultureInfo culture) [0x00000] > > I tried to use the latest bundle of Gtk+ but the same exception is > thrown. I suspect if Gtk Print works ok on Windows. > Looking into the stack trace, the problem seems that your code is infinetly recurse:
SolapaServicioImpresion..ctor -> calls EnumeratePrinters -> calls solapaServicioImpresion..ctor-> calls EnumeratePrinters -> .... You can also see that gtk_enumerate_printers was already called earlier. No idea why you get the EntryPointNotFoundException, but I suspect it to be related to the recursion issue. This is for sure not a problem in Gtk#. Christian _______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
