Hi, I need to create an DLL. Simple, just to make some conversions, calculations. But, is necessary to be inside a DLL not an open file. Is possible?
Best
Edu
Hi, I need to create an DLL. Simple, just to make some conversions, calculations. But, is necessary to be inside a DLL not an open file. Is possible?
Best
Edu
Hi, I need to create an DLL.
For what? The Arduino can't use a DLL.
edurocha:
Hi, I need to create an DLL. Simple, just to make some conversions, calculations. But, is necessary to be inside a DLL not an open file. Is possible?
DLLs are used in the Microsoft WINDOWS operating systems.
If you need to create a DLL, use a programming language for MS WINDOWS!
Your questions is completely OFF-TOPIC HERE!
Here in this forum you may ask questions about Arduino microcontroller programming, but questions about MSWindows PC programming are OFF-TOPIC!
jurs:
DLLs are used in the Microsoft WINDOWS operating systems.If you need to create a DLL, use a programming language for MS WINDOWS!
Your questions is completely OFF-TOPIC HERE!
Here in this forum you may ask questions about Arduino microcontroller programming, but questions about MSWindows PC programming are OFF-TOPIC!
Hi, I completely understand this is a forum about Arduino and choose exactly for this reason. I wrote DLL because this is my world (I made some jobs in Visual Studio using C#), but I need to insert some calculation hidden, just returning the result.
If not DLL, there's any other way to hidden my calculation?
PaulS:
For what? The Arduino can't use a DLL.
Hi, I need to insert some hidden calculation, just returning the result.
If not DLL, there's any other way to hidden my calculation, just returning the answer?
Your question just doesn't make sense.
Please try to explain how you see an Arduino fit in what you want to achieve?
Can you please explain exactly what you are trying to do.
You can write functions that take arguments, do calculations and return the result. Is that the sort of thing that you had in mind ? The functions will be part of the source code for the project and so will be visible if you distribute it. However, once loaded onto the Arduino the workings of the functions, and the code as a whole is much more difficult to retrieve and recreate.
edurocha:
If not DLL, there's any other way to hidden my calculation, just returning the answer?
Web service.
If the end-user can touch any form of your code then it is no longer a secret.
How about we look at this from a different angle? HOW would you suspect someone to see how a function is working on your Arduino?
-jim lee
UKHeliBob:
"You can write functions that take arguments, do calculations and return the result. Is that the sort of thing that you had in mind?"
Exactly.
"The functions will be part of the source code for the project and so will be visible if you distribute it."
Here is my problem. Part can be visible, others, can't.
"However, once loaded onto the Arduino the workings of the functions, and the code as a whole is much more difficult to retrieve and recreate."
But I need to distribute the souce, but not all. part need to be hidden.
jimLee:
How about we look at this from a different angle? HOW would you suspect someone to see how a function is working on your Arduino?-jim lee
Part of the code must to be public, but others can't.
Part of the code must to be public, but others can't.
No way to do that on an Arduino. It's an all-or-nothing device.
The best that you can do would be to make the workings of the code obscure.
Single letter function and variable names would be a start, or perhaps function and variable names that, whilst they look reasonable, have no relation to their purpose. You would, of course, give pins names that obfuscate their purpose and use variables with the same name with both global and local scope. Add in a few gotos to help things along and you could write some really awkward to understand.
None of this is difficult, as testified by the number of times that code like that is posted here.
I still wonder how you see an Arduino fit in whatever you try to achieve.
UKHeliBob:
The best that you can do would be to make the workings of the code obscure.Single letter function and variable names would be a start, or perhaps function and variable names that, whilst they look reasonable, have no relation to their purpose. You would, of course, give pins names that obfuscate their purpose and use variables with the same name with both global and local scope. Add in a few gotos to help things along and you could write some really awkward to understand.
None of this is difficult, as testified by the number of times that code like that is posted here.
In other words, do everything you can to make the code un-maintainable
In other words, do everything you can to make the code un-maintainable
I didn't say that it was a practical solution !
I haven’t tried this, but I assume you could leave the comfortable confines of the Arduino ecosystem all together. You would distribute your .c, .cpp, and .h files as regular ASCII. Probably also have to distribute all the required code from the standard Arduino library and board support packages. Then, distribute your “secret” code as compiled binary files or maybe compiled libraries.
Now, it would be incumbent upon your users to manually put together the entire tool chain required to compile the source code, link the binaries, and download the executable to the target device. They’d have to do this for every different target processor they want to use.
Seems like a lot of work.
edurocha:
But I need to distribute the souce, but not all. part need to be hidden.
The alternative to a "dynamically linked library (DLL), to be loaded at runtime of a (Windows) application into PC memory is a plain "library", which will be linked statically (at compile time") to the executable application.
Linking a static library code to your application is not enough? Why not?
Linking static libraries to executable code works on any platform supporting C/C++ language and compiled code. Including Arduino, of course.
Do you need to modify the calculation code AFTER the application is compiled and distributed/uploaded to the Arduino?
Why does your code need to be kept secret?
If it is worth a significant amount of money, then someone WILL crack it. Even if you are a professional cryptographer. No Arduino application can ever be secure.
You should conduct a threat analysis.
jremington:
Even if you are a professional cryptographer.
Especially then.