Thread: Using other programs in mine

  1. #1
    Or working on it anyways mramazing's Avatar
    Join Date
    Dec 2005
    Location
    Lehi, UT
    Posts
    121

    Using other programs in mine

    Ok i want to know how to use other files in my programs so i can change them with my programs. Like fixed .exe or just controlling another program with mine would be nice. Any help in the direction i should go would be nice.

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    There is a FAQ about running other programs from inside your own.

  3. #3
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    What do you mean by 'change' and 'control'.

  4. #4
    Or working on it anyways mramazing's Avatar
    Join Date
    Dec 2005
    Location
    Lehi, UT
    Posts
    121
    like controling xfire with a program. Or stuff of that nature. not necisarily my code.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Control - like a debugger can control the execution of the program, modify variables, kill the program etc?

    Control - like you control say cmd.exe by typing in valid commands like "dir" and obtaining a set of results?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Or working on it anyways mramazing's Avatar
    Join Date
    Dec 2005
    Location
    Lehi, UT
    Posts
    121
    control like a debugger. so I would be able to replace variables in a prompt with my program.
    such as place info in a text box on xfire or msn. (not my intended purpose) but i would like to know. I know im being a bit vague and im sorry i dont really kno how to explain it.

  7. #7
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    Hijacking programs? Now I hate to say this but you don't quite seem to be anywhere near that level yet...
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  8. #8
    Or working on it anyways mramazing's Avatar
    Join Date
    Dec 2005
    Location
    Lehi, UT
    Posts
    121
    i know i am very low level, i still want to know how to do it tho. any info would help other than "you are not good enough" just lead me in the right direction plz.

  9. #9
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Right direction hmm... hard when you seem to want to go the wrong direction.

    Ok... anyways, this is more or less the list of things you need to learn...

    Assembler and C and/or C++.

    Have... erm... fun.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  10. #10
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Yeah. You're probably going to want to look into debugging API's and get overwhelmed, unless those applications offer SDK's so you can interface with them in a more reasonable manner.

  11. #11
    I am me, who else?
    Join Date
    Oct 2002
    Posts
    250
    Meh, this is kinda treading on thin ice I think. This is treading very close to hacking commercial programs, and it can certainly lead to that, if you are controlling the process itself. Learn C/C++ and such, but if you want to hack anything, play with your own programs that you write.

  12. #12
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    How good are you at programming? Not just C, you know. If I give you an ELF binary string can you figure out what it does? DLLs? Now make a program which can figure out what it does. If you are not good enough to do this, then you are not good enough. You can learn and maybe in the future you'll have enough experience to get about it.

    You must think I'm rude and assuming. The thing is, by reading your previous posts it's clear you don't have much experience and skills to take on stuff like this. We're talking DECADES spending hours per day hacking x86 assembler and bash.
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  13. #13
    Or working on it anyways mramazing's Avatar
    Join Date
    Dec 2005
    Location
    Lehi, UT
    Posts
    121
    alright ty, for all your help!! i have been programming for about a year from books. It is a bit hard to learn without help. =)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Starting programs
    By Molokai in forum C Programming
    Replies: 1
    Last Post: 04-16-2009, 10:10 AM
  2. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  3. How come Dev C++ cant run some programs??
    By Sephiroth in forum C Programming
    Replies: 41
    Last Post: 09-17-2005, 05:35 AM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 03:12 AM