Author Topic: WinAPI > Executing a program  (Read 790 times)

Offline Hachem

  • Single posting newcomer
  • *
  • Posts: 3
WinAPI > Executing a program
« on: December 16, 2018, 02:46:36 pm »
Hello,
i don't how to begin i've  a lot of problem and i've been searching for more than a month (everyday) i'm really tired so i'm gonna ask maybe some of you would help me and it will be really appreciated. Anyways i'm just gonna say one problem. I wanna execute a program from Window i mean u know with stdio.h normal C program i get the .exe file when i do my prog but in windows.h i don't get it the .exe file and idk where to type my prog.
I have feeling that it's something related  to createProcess function but i don't know how to use it and where to put the pogram. For now i just want that .exe file appears and it shows a simple second like printf. I hope that you got what i meant, i'm really in need of your help, thanks.


Offline stahta01

  • Lives here!
  • ****
  • Posts: 6507
    • My Best Post
Re: WinAPI > Executing a program
« Reply #2 on: December 16, 2018, 07:07:51 pm »
I would try to run the command below to figure where you set the working directory in Code::Blocks project.
Or just read the manual links posted above.

Code: [Select]
echo %CD%
Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Hachem

  • Single posting newcomer
  • *
  • Posts: 3
Re: WinAPI > Executing a program
« Reply #3 on: December 16, 2018, 08:16:00 pm »
Thank your for replies but yeah i know the basics of Codeblocks i'm always using it but now i'm trying somethign new to create a window filled with programs etc. That's my project. It has to be in C and not C++. i made a window and attached to it some animations etc but the purpose of my project is missing which is executing programs like for example i want to enter some I/O like i want to read a variable N that's it for now but i don't actually know how to do.
When i execute my program a window appears i want now for example when i press Left arrow i get a a .exe file that tells me to enter a variable 'N'.
Conclusion: i want to combine a normal C program with my window. Hope that you get it, thank you for your help.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6507
    • My Best Post
Re: WinAPI > Executing a program
« Reply #4 on: December 16, 2018, 08:54:42 pm »
Please read and follow the rules for this website http://forums.codeblocks.org/index.php/topic,9996.0.html

I see no Code::Blocks question in your last post!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Hachem

  • Single posting newcomer
  • *
  • Posts: 3
Re: WinAPI > Executing a program
« Reply #5 on: December 16, 2018, 09:30:22 pm »
ah, yeah i didn't notice the first rule. Ugh i'm just in need of someone's help thought that i can ask about it on this forum, cuz i can't find any useful one, thanks anyways...