netbus tech
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
Try searching for the ShellExecute API. I would know how to launch something with parameters in VB, but in C++, I wouldn''t know.
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
(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
The include statement should include shellapi.h.
regards,
Tim
You can also use the WinExec() function:
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement