Hello mike, > I've thought about this before. The primary problem is that you'd need > some custom IPC mechanism, as simply instantiating an ActiveX control > and embedding it in a window isn't terribly useful, you generally want > to call its methods and set its properties. Yes, and for this I have a done something, see attach. (I have to test the properties and methods access)
> I've pondered using DBUS for that. A simple DBUS<->COM bridge would be > handy, though COM doesn't really map to DBUS very well, so it wouldn't > be quite the same as using normal COM/DCOM. if I make DBUS bridge with my attach will be not efficient? > I already put some basic support for processing XEMBED messages into > Wine with my system tray patch, that isn't merged yet. You might want to > take a look at that first. I have patched your work in my wine src, it works very well :). But for the moment, it's too abstract. I don't understand how to simulate a GtkSocket creation, how to send the windows handle to another process window??? This part is very strange, like magical, hahaha. but maybe I just need to send the same messages as Gtksocket to GtkPlug? The ATL is a C++ toolkit, beyond that I know little about it. The > easiest way to embed an ActiveX control is to turn a program into a > WineLib app. At that point the problem becomes one of internally using > XEMBED to synchronize the Wine toolkit and GTK. That sort of thing > shouldn't be very hard, I expect a simple Wine extension to Win32 would > work here (setting an extended window style or something). For my tests I try all in wine application (embed activex and to use methods). After this, I will work for the magical xembed mechanism and at the end I will implement DBUS bridge. thank you very much for your help. Olivier ------------------ www.programmers.ch
/* * $Id: Exp $ * $Author: $ * * module: ComObject * manage the properties and methods of COM component * * TODO * managing the visual part without atl.dll *--------------------------------------------------------------------- * * Copyright (C) 2003 by Olivier Evalet, programmers.ch * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * * $Source: $ * $Revision: $ * $Date: $ * $State: Exp $ */ #ifndef __com_object_h #define __com_object_h //#define STRICT #include <windows.h> #include <ocidl.h> #include <tchar.h> typedef struct _ComObjet{ int count_ref; HWND hwnd_comp; IDispatch *pDisp; }ComObjet; /** * memory managment */ ComObjet *com_create (); void com_destroy (ComObjet *component); /** * I'm not sure of this way to get the Visual part * ------------------------------------------------------------ * create a the visual part of COM Component. * return an ComObject to manage properties and method. * * ------------------------------------------------------------ * exemple of ActiveX instance * "MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>" * "MSCAL.Calendar" * "DHTMLEdit.DHTMLEdit" */ int *com_construct_window (ComObjet *component, HWND parent, LPOLESTR application); /** * different way to create instance of COM component * like "Word.Application" */ int *com_construct_from_string (ComObjet *component, LPOLESTR application); int *com_construct_sub_object (ComObjet *component, LPOLESTR subObject); /** * add ref of ComObject */ ComObjet *com_addref (ComObjet* component); /** * return NULL after removing the last ref */ ComObjet *com_remref (ComObjet* component); /** * properties method access */ int com_get_property (ComObjet* component, LPOLESTR property, VARIANT* pvResult); int com_put_property (ComObjet* component, LPOLESTR property, VARIANT* pvValue); int com_call_method (ComObjet* component, LPOLESTR method, VARIANT* pvResult, UINT cArgs, VARIANTARG* rgVarParams); #endif