View previous topic :: View next topic |
Author |
Message |
banshee
Joined: 22 Aug 2005 Posts: 10 Location: Behind you
|
Posted: Wed Sep 07, 2005 6:26 pm Post subject: citu programmu atveershana |
|
es gribbeju pajautaat kaa ir iespeejams runtaimaa atveert citu programmu(exe failu) zinu, ka tur bij paaris rindinjas, bet esmu aizmirsis kaadas _________________ If you hear me screaming- you'll be dead |
|
Back to top |
|
|
GiGa Indago Uzvarētājs
Joined: 25 Sep 2003 Posts: 887
|
Posted: Wed Sep 07, 2005 6:37 pm Post subject: |
|
Ja runa iet par Windows un viss, ko vajag, ir vienkaarshi palaist citu programmu, tad visvienkaarshaakais veids ir:
Code: |
system("start C:/mydir/myprog.exe");
|
un neaizmirsti iekljaut stdlib.h |
|
Back to top |
|
|
banshee
Joined: 22 Aug 2005 Posts: 10 Location: Behind you
|
Posted: Wed Sep 07, 2005 8:07 pm Post subject: |
|
o.k. thx
Un nevareetu pateikt arii kaa ieguut vietu no kuras programma(taa kas ir atveerta)atrodas -
t.i. lai vareetu rakstiit Code: |
char buffer[512];
char path[128];
char path1[] = // Baazes programmas atrashanaas vieta (shito arii vaig :oops: )
char path2[] = "/mydir/myprog.exe"
sprintf(path,"%s%s",path1,path2);
sprintf(buffer, "start %s ", path); |
_________________ If you hear me screaming- you'll be dead |
|
Back to top |
|
|
qwerty Guest
|
Posted: Tue Sep 13, 2005 10:11 pm Post subject: |
|
HMODULE hModule;
hModule = GetModuleHandle("my.exe");
if (hModule)
{
GetModuleFileName(hModule, lpFilename, MAX_PATH);
} |
|
Back to top |
|
|
|