taviso / loadlibrary

Porting Windows Dynamic Link Libraries to Linux
GNU General Public License v2.0
4.34k stars 377 forks source link

Getting started - able to use a custom windows dll on linux? #35

Open magick93 opened 7 years ago

magick93 commented 7 years ago

Hello

My story is - I have a windows dll (a client for a web service) that I am currently using on Ubuntu with aid of Wine. This works fine-ish.

However I am interested in a more lightweight solution that can be used in containers.

I tried to get started but I'm not sure how I should use loadlibrary.

I tried: ./mpclient service_client.dll And got:

main(): Scanning  service_client.dll...
EngineScanCallback(): Scanning input
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
EngineScanCallback(): Scanning archive member !Themida
y

Can you let me know if loadlibrary is able to provide a wrapper, or a way to run my dll on Linux? Any guidance is appreciated.

Thanks

taviso commented 7 years ago

Hey, do you have header files for this dll? This project provides a framework for using Windows DLLs in native Linux code, it's not really possible to automate this process - it just provides the tools to dlopen() the DLL and call routines in it.

If you don't have header files, it would still be possible but would require good knowledge of windows internals.

magick93 commented 7 years ago

Yes I do have the headerfile.

On 30 September 2017 at 05:19, Tavis Ormandy notifications@github.com wrote:

Hey, do you have header files for this dll? This project provides a framework for using Windows DLLs in native Linux code, it's not really possible to automate this process - it just provides the tools to dlopen() the DLL and call routines in it.

If you don't have header files, it would still be possible but would require good knowledge of windows internals.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/taviso/loadlibrary/issues/35#issuecomment-333171642, or mute the thread https://github.com/notifications/unsubscribe-auth/ACEpHesRllgi9X7QDvJHqshF0UHn7kr3ks5snRilgaJpZM4Pdl9H .

ricebus commented 6 years ago

@taviso is it possible to use a DLL that calls functions from other DLLs? i.e.: HelloWorld.dll calls functions from PrintFunc.dll. both are windows DLLs.

magick93 commented 6 years ago

Hi @taviso

Can you give an example of how to call methods in the dll? As mentioned, I do have the header file.

rafaelsales commented 4 years ago

@magick93 did you manage to make that work? I'm on the same boat

magick93 commented 4 years ago

No, unfortunately I didnt.

On Wed, 11 Dec 2019 at 12:44, Rafael Sales notifications@github.com wrote:

@magick93 https://github.com/magick93 did you manage to make that work? I'm on the same boat

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/taviso/loadlibrary/issues/35?email_source=notifications&email_token=AAQSSHIO5EZK7ILF2YIWMM3QYASVJA5CNFSM4D3WL5D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGRLG3I#issuecomment-564310893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQSSHNJPPPAV3NTJMCEJXDQYASVJANCNFSM4D3WL5DQ .