Problem Querying Bonobo_Unknown_queryInterface
Andrew Burton <[email protected]> Tue, 03 Feb 2004 21:57:38 +1100
| Newsgroups | gmane.comp.gnome.components |
|---|---|
| Message-ID | <1075805857.8745.13.camel@localhost> |
Hi list,
I am new to Bonobo, so forgive me if this question seems stupid. I
haven't been able to find an answer on the list, and the docs are a
little tricky for a newbie like me ;)
I'm trying to embed an EOG control in a window, and here is what I'm
doing so far:
Bonobo_Control mycontrol;
Bonobo_PersistStream pstream;
mycontrol = bonobo_get_object ("OAFIID:GNOME_EOG_Control",
"Bonobo/Control", &ev );
pstream = (Bonobo_PersistStream) Bonobo_Unknown_queryInterface
(mycontrol, "IDL:Bonobo/PersistStream:1.0", &ev );
if (BONOBO_EX(&ev) || (pstream == CORBA_OBJECT_NIL)) {
g_error ("Failed to get pstream"); return -1; }
For some reason, I cannot get pstream to work with the
Bonobo_Unknown_queryInterface call. If I use Bonobo_PersistFile instead,
it works correctly, but I read in the API that PersistFile is deprecated
in favour of PersistStream.
GNOME_EOG_Control implements the PersistStream interface, according to
its server file.
Any insights or suggestions would be greatly appreciated.
ADB