Converting a C/C++ Project to batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
hacxx
Posts: 57
Joined: 09 Apr 2015 13:18

Converting a C/C++ Project to batch

#1 Post by hacxx » 04 Aug 2017 09:57

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

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

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

#2 Post by aGerman » 04 Aug 2017 10:23

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

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

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

#3 Post by ShadowThief » 04 Aug 2017 11:17

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.

hacxx
Posts: 57
Joined: 09 Apr 2015 13:18

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

#4 Post by hacxx » 04 Aug 2017 12:29

Thanks ShadowThief

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

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

#5 Post by penpen » 04 Aug 2017 13:16

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

Post Reply