<DIV>
<DIV>Hello Roderick,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you for your answering.</DIV>
<DIV>Actually, now I&nbsp;am trying to use WINE to&nbsp;port an windows application to linux.</DIV>
<DIV>But&nbsp;if I use program loader provided by WINE to directly run the exe file under linux,</DIV>
<DIV>some of the functionalities are involved with IPC between WINE and other local</DIV>
<DIV>X processes, which&nbsp;is not supported by WINE.</DIV>
<DIV>&nbsp;</DIV>
<DIV>So, I need to rewrite the&nbsp;local&nbsp;codes for them, as Mike explained before,</DIV>
<DIV>&nbsp;</DIV>
<DIV>"What you can do is rewrite only the parts that need rewriting and turn<BR>them into shared libraries. Then you can use WineLib to combine the<BR>Win32 code and the Linux code into one program."</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here, I am glad to learn from you there seems a more easy way:</DIV>
<DIV>(As my understanding, the other way you mentioned is the same one as Mike's)</DIV>
<DIV><BR>"An easy way is to put this <BR>X functionality in a winelib dll. This dll can then be used by your app. The <BR>advantage of a winelib dll is that it can use win32 api's but also native <BR>Linux api's."</DIV>
<DIV>&nbsp;</DIV>
<DIV>Could you please make sure whether this method can meet the need to "find any process's window info", not only "windows under WINE" ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>And could you please give some more implementation details about that?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks a lot!</DIV>
<DIV>&nbsp;</DIV>
<DIV>-Lechun</DIV>
<DIV><BR><B><I>Roderick Colenbrander &lt;thunderbird2k@gmx.net&gt;</I></B> wrote:</DIV>
<DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid; WIDTH: 100%">Hi,<BR><BR>As I understand it you have a Windows app that needs to have access to some X <BR>stuff. To access that you somehow need to extend your app with some X <BR>functionality. There are several ways to do that. An easy way is to put this <BR>X functionality in a winelib dll. This dll can then be used by your app. The <BR>advantage of a winelib dll is that it can use win32 api's but also native <BR>Linux api's. The other option is to completely build your app using winelib <BR>and also add the native code. Personally I think the dll is the easiest way.<BR><BR>Roderick<BR><BR>On Thursday 10 July 2003 23:36, dd jj wrote:<BR>&gt; Hello Mike,<BR>&gt;<BR>&gt; So as my understanding, even recompile the original windows codes using<BR>&gt; WINELIB will not work, am I correct?<BR>&gt;<BR>&gt; Since finding window info under cursor is only one of the functionality in<BR>&gt; this
 application, it will be a huge work to rewrite all the codes for X<BR>&gt; window. Is there any Avenue to port such a windows application to Linux?<BR>&gt; Using Visual Mainwin or Win/U is better choices? or any other comments on<BR>&gt; it?<BR>&gt;<BR>&gt; Thanks a lot!<BR>&gt;<BR>&gt; -Lechun<BR>&gt;<BR>&gt; Mike Hearn <MIKE@THEORETIC.COM>wrote:<BR>&gt; Programs run under emulation are only aware of other Wine programs. If<BR>&gt; you want to write an app like that, you'd need to rewrite it for Linux.<BR>&gt;<BR>&gt; BTW, you might want to talk to a guy named Bill Haneman (i think that's<BR>&gt; the spelling). He does Gnome accessibility, and i think they have an app<BR>&gt; that can read info about stuff under the mouse cursor.<BR>&gt;<BR>&gt; On Thu, 2003-07-10 at 20:41, dd jj wrote:<BR>&gt; &gt; Thank you for response. The following is my further question:<BR>&gt; &gt;<BR>&gt; &gt; Here is my case:<BR>&gt; &gt;<BR>&gt; &gt; Now I am trying to run our own developed application
 under wine, the<BR>&gt; &gt; original function of this app is working as a background daemon<BR>&gt; &gt; without GUI who is trying to figure out some window information under<BR>&gt; &gt; the current cursor, such as the window title, class name using<BR>&gt; &gt; GetWindowTitle, GetClassName ... WIN32 API calls.<BR>&gt; &gt;<BR>&gt; &gt; When I run this under WINE, it can't "see" any other Local X<BR>&gt; &gt; application windows such as Xterm, Xclock... which don't run under<BR>&gt; &gt; WINE.<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; I am wondering whether I can recompile the codes to generate a lcoal X<BR>&gt; &gt; application using winelib to solve this problem, or I must write X11<BR>&gt; &gt; based codes?<BR>&gt; &gt;<BR>&gt; &gt; Thanks a lot!<BR>&gt; &gt;<BR>&gt; &gt; -Lechun<BR>&gt; &gt;<BR>&gt; &gt; Mike Hearn wrote:<BR>&gt; &gt; &gt; fixme:class:get_class_ptr reading from class of other<BR>&gt; &gt;<BR>&gt; &gt; process window<BR>&gt; &gt;<BR>&gt; &gt; &gt; 0x2002a<BR>&gt;
 &gt; &gt; err:win:WIN_FindWndPtr window 0x2003a belongs to other<BR>&gt; &gt;<BR>&gt; &gt; process<BR>&gt; &gt;<BR>&gt; &gt; Well these two are known problems. I think it's something<BR>&gt; &gt; Alexandre will<BR>&gt; &gt; be working on at some point, inter-process window<BR>&gt; &gt; communication isn't<BR>&gt; &gt; really implemented well in Wine at present.<BR>&gt; &gt;<BR>&gt; &gt; &gt; Also I found other errors when I launch my window appication<BR>&gt; &gt;<BR>&gt; &gt; under<BR>&gt; &gt;<BR>&gt; &gt; &gt; wine:<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; err:module:import_dll No implementation for<BR>&gt; &gt;<BR>&gt; &gt; USER32.dll.GetTitleBarInfo<BR>&gt; &gt;<BR>&gt; &gt; &gt; imported from C:\ping\exe\ping.exe, setting to 0xdeadbeef<BR>&gt; &gt; &gt; err:module:import_dll No implementation for<BR>&gt; &gt;<BR>&gt; &gt; USER32.dll.GetMenuBarInfo<BR>&gt; &gt;<BR>&gt; &gt; &gt; imported from C:\ping\exe\ping.exe, setting to 0xdeadbeef<BR>&gt; &gt;<BR>&gt; &gt; Unless the program
 actually uses them, this isn't a problem.<BR>&gt; &gt; If it does,<BR>&gt; &gt; the app will crash, at which point we'd need to write those<BR>&gt; &gt; functions or<BR>&gt; &gt; stub them out.<BR>&gt; &gt;<BR>&gt; &gt; thanks -mike<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; ______________________________________________________________________<BR>&gt; &gt; Do you Yahoo!?<BR>&gt; &gt; SBC Yahoo! DSL - Now only $29.95 per month!<BR>&gt;<BR>&gt; ---------------------------------<BR>&gt; Do you Yahoo!?<BR>&gt; SBC Yahoo! DSL - Now only $29.95 per month!<BR></BLOCKQUOTE></DIV></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/">SBC Yahoo! DSL</a> - Now only $29.95 per month!