Arduino Forum

Forum 2005-2010 (read only) => Hardware => Interfacing => Topic started by: ribuck on Sep 19, 2009, 11:47 pm

Title: convert windows DLL to to C library for Arduino
Post by: ribuck on Sep 19, 2009, 11:47 pm
Hi All,

I've been looking on google and i've seen a few programs that can apparently take a windows dll and convert it to a static c libaray.

Has anyone tried this yet or can anyone recommend any software they have used.

Rich.
Title: Re: convert windows DLL to to C library for Arduino
Post by: Coding Badly on Sep 20, 2009, 02:49 am
It's absolutely impossible to get the code from a Windows DLL, in any form, to work on an Arduino.

What functionality are you trying to get working on an Arduino?
Title: Re: convert windows DLL to to C library for Arduino
Post by: ribuck on Sep 20, 2009, 11:06 am
Can i ask why it is impossible, as Arduino uses static library's in C, and there are Windows DLL convertors available which can convert Windows dynamic library files to Static C library files.

In this instance, C shouldn't know any difference

Title: Re: convert windows DLL to to C library for Arduino
Post by: mem on Sep 20, 2009, 11:29 am
The issue more about operating system than language.

A Windows DLL will make calls to Windows core functions that don't exist on the Arduino platform. Even if you could find a DLL that did not make any Windows calls, The environment is so different (RAM availability, (lack of) threading, calling conventions, data types ?) that the code is unlikely to work.

What is it you want to do?
Title: Re: convert windows DLL to to C library for Arduino
Post by: ribuck on Sep 20, 2009, 12:02 pm
Ahh darn it, thought you might say something like that.

I was just looking to see if i could convert a windows dll, instead of having to re-write all the functions within the Arduino.

It's basically to read  the motor encoders of a Robotic telescope mount to get their position. Someone's already done a windows dll to do all that and was just hoping to use it and save me typing loads of code.
Title: Re: convert windows DLL to to C library for Arduino
Post by: mem on Sep 20, 2009, 12:30 pm
It wouldn't surprise me if someone has already done something like that for Arduino. Why not post the details of the motor mount to see if anyone has any advice.  Did you try a google search with the name of the motor mount and arduino as kewords?