Page 1 of 1

Converting a C/C++ Project to batch

Posted: 04 Aug 2017 09:57
by hacxx
Hi,

I have been wondering for a while if it's possible to convert a c/c++/... language project to batch or any open source language.

I want to provide a easy to use program that gives all the freedom to users with the possibility of editing the tool by them. The idea is convert a full c/c++ project into batch. I have a few questions, one of them is how will i run the c/c++ dependency libraries? Possibly envoking rundll32.exe.

Any comment on this is welcome and some references aswell

Thanks

Re: Converting a C/C++ Project to batch

Posted: 04 Aug 2017 10:23
by aGerman
hacxx wrote:possible to convert a c/c++/... language project to batch
No.

hacxx wrote:or any open source language
There are most likely hundreds of languages. I have no idea what you mean with "open source language". If you provide the source code of a C or C++ project it's open source. So what's wrong with C or C++? All that users need to edit the project is a text editor and a compiler. (And knowledge in C or C++ as they would need for any other programming language you might have in mind.)

Steffen

Re: Converting a C/C++ Project to batch

Posted: 04 Aug 2017 11:17
by ShadowThief
It REALLY depends on what the project does. There's no 1-to-1 translation of commands, but some functionality should exist in both languages. I won't give as hard of a "no" as aGerman did, but I will give a "don't get your hopes up; the closest you'll most likely get is a batch script that gives the same end result but gets there a different way. "

In terms of using rundll32.exe, I've seen it done, but PowerShell does it more easily.

Re: Converting a C/C++ Project to batch

Posted: 04 Aug 2017 12:29
by hacxx
Thanks ShadowThief

Re: Converting a C/C++ Project to batch

Posted: 04 Aug 2017 13:16
by penpen
You could use platform invocation to include nearly any c++ functionality (see DllImport sections), example:
http://www.dostips.com/forum/viewtopic.php?p=34649#p34649

This also might help you (although you sometimes might want to use other variables/...):
http://www.pinvoke.net/

penpen