From: frederico s. <fre...@gm...> - 2008-09-11 21:33:06
|
Hello, I need import some functions of a .dll on linux. I using kernel 2.6.24, Ubuntu 8.04 server edition. tanks |
From: Chris M. <lor...@gm...> - 2008-09-11 21:56:03
|
On Sep 11, 2008, at 2:32 PM, frederico schardong wrote: > Hello, > > I need import some functions of a .dll on linux. I using kernel > 2.6.24, Ubuntu 8.04 server edition. Linux doesn't use DLL files. You will want a .so file instead, or cross-compile to a .so file. Registered Linux Addict #431495 http://profile.xfire.com/mrstalinman | John 3:16! http://www.fsdev.net/ | http://lordsauron.wordpress.com/ |
From: hhh h. <the...@ho...> - 2008-09-13 10:26:40
|
Hello, I'll assume that you know that nealy all functions inside a DLL use Windows API, an that Windows API is not supported in Linux kernel. Bear in mind that even if you have the source code, and it has known functions... ( e.g.: malloc()... ) in the compiled version, the result.dll, the malloc call is assembled into the windows-spefic malloc implementation, that calls a function like _mzAlloc (or something like that), that actually performs all the mem allocation tasks. Obviosly, linux kernel malloc implementation( compiled version) probably will not have the same function name and other aspects ( reside on the same address, uses the same number of args, etc, etc ). So, assuming you considered the above and the code that resides in the .DLL is a very simple one, you *can* parse the header, load the symbol table, resolve it, load it to a buffer, witch allows you to execute code, and "jmp" to that location. It is... very hard work, and even if you can do it, the code in the dll, must be very simple( even function calls inside the parsed come, must be in the same calling covention to execute right... and you'll have to resolve the code address all hiover again). I would not bother without a very good reason... mind you, even if you pull this off, it'll be a hogger of a code.... Date: Thu, 11 Sep 2008 18:32:59 -0300From: fre...@gm...To: dev...@li...Subject: [Dev-C++] dll / linux Hello,I need import some functions of a .dll on linux. I using kernel 2.6.24, Ubuntu 8.04 server edition.tanks _________________________________________________________________ Receba GRÁTIS as mensagens do Messenger no seu celular quando você estiver offline. Conheça o MSN Mobile! http://mobile.live.com/signup/signup2.aspx?lc=pt-br |
From: Per W. <pw...@ia...> - 2008-09-13 11:17:58
|
And then there is Wine. By the way - there are a couple of media players that are making use of Windows DLL files just to be able to use Windows codecs. But in this case, the bit problem is that the post is just a request for using a dll file, without any motivation why. Because of knowing that a dll file is the Windows name for the concept while actually intending to use a *.so dynamic library? Because the dll file contains important functions to use? Because the dll is supposed to contain important functions, but the functions already existing for Linux, if we just knew what the dll does? It is always hard - often impossible - to help someone who are not ready to write a lot of information about the what and the why. /pwm |
From: hhh h. <the...@ho...> - 2008-09-17 06:25:32
|
Sorry, I missed your point, isn't Wine a Windows Emulator of some sort? Why would someone need to "link" a dll to a process that uses Linux code ( as the original poster said ) inside a windows emulator? You kinda lost me there pwm. Refering to the media players that read win codecs... well, as I said, it *is* possible. But as I also said, its doubtfull that the code is as smooth one. The aformention media player has to resolve many things in process, when linking to the DLL. Even if the module dll is implicitly linked to the process, it still loses much to a native format ( *.so ) that has all the dragging parser code and resolver code done by the OS. I do not want to deny your claim, but I do not see the point in a media player ( A good one, at that ) to use this techniquee. Anyway, apart from diferent technical views, Yes you are right, when one does not have all the needed information, it is hard to anyone to help in a significant way. > Date: Sat, 13 Sep 2008 13:17:38 +0200 > From: pw...@ia... > To: the...@ho... > CC: fre...@gm...; dev...@li... > Subject: Re: [Dev-C++] dll / linux > > And then there is Wine. > > By the way - there are a couple of media players that are making use of > Windows DLL files just to be able to use Windows codecs. > > But in this case, the bit problem is that the post is just a request for > using a dll file, without any motivation why. Because of knowing that a > dll file is the Windows name for the concept while actually intending to > use a *.so dynamic library? Because the dll file contains important > functions to use? Because the dll is supposed to contain important > functions, but the functions already existing for Linux, if we just knew > what the dll does? > > It is always hard - often impossible - to help someone who are not ready > to write a lot of information about the what and the why. > > /pwm > _________________________________________________________________ Instale a Barra de Ferramentas com Desktop Search e ganhe EMOTICONS para o Messenger! É GRÁTIS! http://www.msn.com.br/emoticonpack |
From: Per W. <pw...@ia...> - 2008-09-17 06:37:34
|
No, Wine was one alternative where a Linux machine could use DLL files. My example with a Linux program using Windows codecs was another reference where Windows DLL files are used on a Linux machine. One example is the XBMP (XBox Media Player): http://en.wikipedia.org/wiki/Xbox_Media_Player /pwm On Wed, 17 Sep 2008, hhh hhh wrote: > > Sorry, I missed your point, isn't Wine a Windows Emulator of some sort? Why would someone need to "link" a dll to a process that uses Linux code ( as the original poster said ) inside a windows emulator? > You kinda lost me there pwm. > > Refering to the media players that read win codecs... well, as I said, it *is* possible. But as I also said, its doubtfull that the code is as smooth one. > The aformention media player has to resolve many things in process, when linking to the DLL. Even if the module dll is implicitly linked to the process, it still loses much to a native format ( *.so ) that has all the dragging parser code and resolver code done by the OS. > I do not want to deny your claim, but I do not see the point in a media player ( A good one, at that ) to use this techniquee. > > > Anyway, apart from diferent technical views, Yes you are right, when one does not have all the needed information, it is hard to anyone to help in a significant way. > > > > Date: Sat, 13 Sep 2008 13:17:38 +0200 > > From: pw...@ia... > > To: the...@ho... > > CC: fre...@gm...; dev...@li... > > Subject: Re: [Dev-C++] dll / linux > > > > And then there is Wine. > > > > By the way - there are a couple of media players that are making use of > > Windows DLL files just to be able to use Windows codecs. > > > > But in this case, the bit problem is that the post is just a request for > > using a dll file, without any motivation why. Because of knowing that a > > dll file is the Windows name for the concept while actually intending to > > use a *.so dynamic library? Because the dll file contains important > > functions to use? Because the dll is supposed to contain important > > functions, but the functions already existing for Linux, if we just knew > > what the dll does? > > > > It is always hard - often impossible - to help someone who are not ready > > to write a lot of information about the what and the why. > > > > /pwm > > > > _________________________________________________________________ > Instale a Barra de Ferramentas com Desktop Search e ganhe EMOTICONS para o Messenger! É GRÁTIS! > http://www.msn.com.br/emoticonpack |