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