Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

mack

Using a program to run others

This topic is 6165 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering how in the world would you get one program to run another. Like a front end for quake or gamespy for example, they are able to run other programs then shut itself down. I''m just wondering how you do the running other programs part. I''ve read and scan through many books and the closes i''ve ever gotten was loading and storing files. Can help me?

Share this post


Link to post
Share on other sites
Advertisement
Thanks, you''ve just motiveated me to start practicing again. I stopped because i keep getting stuck.

Share this post


Link to post
Share on other sites
Ok i was looking through msdn and look at it's structure. Pretty self explanatory, but one thing. I keep getting this error when i compile:

demo3_1.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * __cdecl ShellExecute(struct HWND__ *,char const *,char const *,char const *,char const *,int)" (?ShellExecute@@YAPAUHINSTANCE__@@PAUHWND__@@PBD111H@Z)
Release/3_1.exe : fatal error LNK1120: 1 unresolved externals

My code is

ShellExecute(NULL, "open", "quake3.exe", NULL, "C:", SW_SHOWMAXIMIZED);

P.S.

I also get something about an unresolved externals when i try to use playsound in Lamothe's WGPG. I even try to compile his code and i get that error. Very strange.



Edited by - mack on November 3, 2001 1:55:52 AM

Share this post


Link to post
Share on other sites
The library doesnt show the requirements you need to use the function. Normally i see it says "header: time.h" and "library winmm.h" or something, but this function doesnt have it.

I got MSVC++ 6

Share this post


Link to post
Share on other sites
About to go crazy. No difference. If i include a prototype then it has the unresolve extrernal blah blah blah, but if i leave it out then i get an undeclared identifier. I think MY VC++ or my program is screwed. I might just reinstall it or make a bare bones program to test it later tonight. I got to get back to work in a couple so I can't do it now.

BTW the function looks like this in the library:


HINSTANCE ShellExecute(
HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
);

be back in about 3 hours...



Edited by - mack on November 3, 2001 8:24:09 PM

Share this post


Link to post
Share on other sites
hmmm... dummy program to get ShellExecute is giving me a different unresolved crap again. oh well. I''ll just quit a while and maybe when i return I''ll figure it out.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!