netbus tech

Started by
4 comments, last by z_yang 22 years, 8 months ago
ok, i want my game server to be able to launch an application on one of the clients remotely, which is kinda like the netbus. the things is, i know how to do the net work stuff, but i just have no clue how to use the windows commands to launch applications, at least that''s what i think how it works. maybe i was wrong, im just guessing, so if you understand the netbus technology(i watch too much startreck), please help the brother out
Big Z the ChickenChoker
Advertisement
Try searching for the ShellExecute API. I would know how to launch something with parameters in VB, but in C++, I wouldn''t know.
www.persistentrealities.com for Inline ASM for VB, VB Fibre, and other nice code samples in C++, PHP, ASP, etc.<br/>Play Yet Another Laser Game!<br/>
i found a function name ShellExecute(), but it''s not an API though,
Big Z the ChickenChoker
ShellExecute IS part of the win32 API.

(link shellapi.lib)
#include

BOOL ShellExecuteEx(
LPSHELLEXECUTEINFO lpExecInfo
);


If you are programming windows you probably have access to online help to see the SHELLEXECUTEINFO structure, so I''m not going to post it here, seeing as how MS won''t like me copying straight from MSDN.
This call is the accepted standard way to spawn executables in win32 environments for the purpose you describe.

Hope this helps,

Tim
Sorry, I posted the previous anonymous by accident, then couldn''t edit it grrrrr....

The include statement should include shellapi.h.

regards,

Tim
You can also use the WinExec() function:

  UINT WinExec(  LPCSTR lpCmdLine,  // address of command line  UINT uCmdShow      // window style for new application);Example:WinExec("c:\\myapp.exe",1);  

Courtesy of Microsoft

It is mainly for 16-bit code though. You can use it, but Microsoft recommends you use CreateProcess() for 32-bit.

Check out the MSDN help for more information.

LostLogicwww.GamerOutfit.comXBox 360 Community Games Reviews and NewsExisled - 2D/3D Shooter for XBox 360

This topic is closed to new replies.

Advertisement