[Gtk-sharp-list] GtkPrint on Windows

Christian Hoff christian_hoff at gmx.net
Sun Sep 6 14:45:43 EDT 2009


Milton Pividori wrote:
> Hi Christian, thank you for your reply. I tried with a simpler example,
> but I got the same exception:
>
> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.EntryPointNotFoundException: gtk_enumerate_printers
>   at (wrapper managed-to-native) Gtk.Printer:gtk_enumerate_printers (GtkSharp.Pr interFuncNative,intptr,GLib.DestroyNotify,bool)
>
> It doesn't seem to be a recursion issue. The same code works on Linux,
> but fails on Windows. This is the code I wrote:
>
> <code>
> ...
> public bool WritePrinterName(Gtk.Printer printer)
> {
> 	Console.WriteLine(printer.Name);
> 	return false;
> }
>
> protected virtual void OnEnumeratePrinters (object sender, System.EventArgs e)
> {
> 	Gtk.Printer.EnumeratePrinters(this.WritePrinterName, false);
> }
> ...
> </code>
>
> I tried changing the bool parameter in Gtk.Printer.EnumeratePrinters
> function, but it doesn't work either.
>
> Any ideas?
>   
None so far. The function should also be available on Windows and the 
code on the Gtk# side seems correct.

Could you file a bug report (www.mono-project.com/Bugs)?


Christian


More information about the Gtk-sharp-list mailing list