<DIV>
<DIV>Hello Roderick,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have nother question about the usage of dll:</DIV>
<DIV>&nbsp;</DIV>
<DIV>Can I use visual studio in windows to generate a windows dll to implement all the functionalities I need, then transfer it directly to linux using under WINE?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Maybe it can't work for IPC stuffs discussed before, right?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Many thanks</DIV>
<DIV>&nbsp;</DIV>
<DIV>-Lechun<BR><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%">What Mike meant is the same as I said. Look at the winelib docs at the wine <BR>page. I'm not sure if they are up2date. A new but easier way to use winelib <BR>is to use "winegcc" a frontend to gcc which handles all difficult wine <BR>linking stuff. The syntax is similar to gcc and it supports various mingw <BR>options.<BR><BR>All dlls wine uses are winelib dlls. It are linux libraries but with a similar <BR>structure as native windows dlls. Because of this structure you can easily <BR>replace a native dll of your app with a winelib dll.<BR><BR>The advantage of winelib is that you can use all libraries you have on windows <BR>and all you have on windows.<BR><BR>So I would move the linux functionality you need inside a winelib dll. Using <BR>this way you don't need to recompile all the source of your app using winelib <BR>which can be a pain. This way is used by lots of companies since
 it is easy <BR>and gives good performance.<BR><BR>I hope this helps and good luck,<BR>Roderick<BR><BR><BR>On Friday 11 July 2003 18:44, you wrote:<BR>&gt; Hello Roderick,<BR>&gt;<BR>&gt; Thank you for your answering.<BR>&gt; Actually, now I am trying to use WINE to port an windows application to<BR>&gt; linux. But if I use program loader provided by WINE to directly run the exe<BR>&gt; file under linux, some of the functionalities are involved with IPC between<BR>&gt; WINE and other local X processes, which is not supported by WINE.<BR>&gt;<BR>&gt; So, I need to rewrite the local codes for them, as Mike explained before,<BR>&gt;<BR>&gt; "What you can do is rewrite only the parts that need rewriting and turn<BR>&gt; them into shared libraries. Then you can use WineLib to combine the<BR>&gt; Win32 code and the Linux code into one program."<BR>&gt;<BR>&gt; Here, I am glad to learn from you there seems a more easy way:<BR>&gt; (As my understanding, the other way you mentioned is the
 same one as<BR>&gt; Mike's)<BR>&gt;<BR>&gt; "An easy way is to put this<BR>&gt; X functionality in a winelib dll. This dll can then be used by your app.<BR>&gt; The advantage of a winelib dll is that it can use win32 api's but also<BR>&gt; native Linux api's."<BR>&gt;<BR>&gt; Could you please make sure whether this method can meet the need to "find<BR>&gt; any process's window info", not only "windows under WINE" ?<BR>&gt;<BR>&gt; And could you please give some more implementation details about that?<BR>&gt;<BR>&gt; Thanks a lot!<BR>&gt;<BR>&gt; -Lechun<BR>&gt;<BR>&gt; Roderick Colenbrander <THUNDERBIRD2K@GMX.NET>wrote:<BR>&gt; Hi,<BR>&gt;<BR>&gt; As I understand it you have a Windows app that needs to have access to some<BR>&gt; X stuff. To access that you somehow need to extend your app with some X<BR>&gt; functionality. There are several ways to do that. An easy way is to put<BR>&gt; this X functionality in a winelib dll. This dll can then be used by your<BR>&gt; app. The
 advantage of a winelib dll is that it can use win32 api's but also<BR>&gt; native Linux api's. The other option is to completely build your app using<BR>&gt; winelib and also add the native code. Personally I think the dll is the<BR>&gt; easiest way.<BR>&gt;<BR>&gt; Roderick<BR>&gt;<BR>&gt; On Thursday 10 July 2003 23:36, dd jj wrote:<BR>&gt; &gt; Hello Mike,<BR>&gt; &gt;<BR>&gt; &gt; So as my understanding, even recompile the original windows codes using<BR>&gt; &gt; WINELIB will not work, am I correct?<BR>&gt; &gt;<BR>&gt; &gt; Since finding window info under cursor is only one of the functionality<BR>&gt; &gt; in this application, it will be a huge work to rewrite all the codes for<BR>&gt; &gt; X window. Is there any Avenue to port such a windows application to<BR>&gt; &gt; Linux? Using Visual Mainwin or Win/U is better choices? or any other<BR>&gt; &gt; comments on it?<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; Programs run under emulation are only aware of other Wine programs. If<BR>&gt; &gt; you want to write an app like that, you'd need to rewrite it for Linux.<BR>&gt; &gt;<BR>&gt; &gt; BTW, you might want to talk to a guy named Bill Haneman (i think that's<BR>&gt; &gt; the spelling). He does Gnome accessibility, and i think they have an app<BR>&gt; &gt; that can read info about stuff under the mouse cursor.<BR>&gt; &gt;<BR>&gt; &gt; On Thu, 2003-07-10 at 20:41, dd jj wrote:<BR>&gt; &gt; &gt; Thank you for response. The following is my further question:<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Here is my case:<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Now I am trying to run our own developed application under wine, the<BR>&gt; &gt; &gt; original function of this app is working as a background daemon<BR>&gt; &gt; &gt; without GUI who is trying to figure out some window information under<BR>&gt; &gt; &gt; the current cursor, such as the window title, class name using<BR>&gt; &gt;
 &gt; GetWindowTitle, GetClassName ... WIN32 API calls.<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; When I run this under WINE, it can't "see" any other Local X<BR>&gt; &gt; &gt; application windows such as Xterm, Xclock... which don't run under<BR>&gt; &gt; &gt; WINE.<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; I am wondering whether I can recompile the codes to generate a lcoal X<BR>&gt; &gt; &gt; application using winelib to solve this problem, or I must write X11<BR>&gt; &gt; &gt; based codes?<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Thanks a lot!<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; -Lechun<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Mike Hearn wrote:<BR>&gt; &gt; &gt; &gt; fixme:class:get_class_ptr reading from class of other<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; process window<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; 0x2002a<BR>&gt; &gt; &gt; &gt; err:win:WIN_FindWndPtr window 0x2003a belongs to other<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; process<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Well these
 two are known problems. I think it's something<BR>&gt; &gt; &gt; Alexandre will<BR>&gt; &gt; &gt; be working on at some point, inter-process window<BR>&gt; &gt; &gt; communication isn't<BR>&gt; &gt; &gt; really implemented well in Wine at present.<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; Also I found other errors when I launch my window appication<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; under<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; wine:<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; err:module:import_dll No implementation for<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; USER32.dll.GetTitleBarInfo<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; imported from C:\ping\exe\ping.exe, setting to 0xdeadbeef<BR>&gt; &gt; &gt; &gt; err:module:import_dll No implementation for<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; USER32.dll.GetMenuBarInfo<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; imported from C:\ping\exe\ping.exe, setting to 0xdeadbeef<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Unless the program actually uses them,
 this isn't a problem.<BR>&gt; &gt; &gt; If it does,<BR>&gt; &gt; &gt; the app will crash, at which point we'd need to write those<BR>&gt; &gt; &gt; functions or<BR>&gt; &gt; &gt; stub them out.<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; thanks -mike<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; ______________________________________________________________________<BR>&gt; &gt; &gt; Do you Yahoo!?<BR>&gt; &gt; &gt; SBC Yahoo! DSL - Now only $29.95 per month!<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!