"I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008
"the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010
No my project is not to create a maleware, and yes i do not got much knowledge in c++, if i already knew how to do this then i woud not post howto woud i ?
Firstly, everything you've asked for relies on specific support from the operating system, and are not in the scope of C/C++.
However, while there are valid reasons that one program may wish to start another without multiple instances (and the techniques to do that have been described), your post asking how to hide a process, or modifying one to do what you want, rang alarm bells. Such things are firmly in the realm of malware. Even operating system services - one of the few types of application that might justifiably be hidden from users - don't do that.
Can somone just help me, it shoud not take several days or what ?
You have received help. Elysia in post 10 has pointed you to the EnumWindows() and Mike_ in post 12 has pointed you to the FindWindow() function. Those address the requirement of finding a window, which you need. Read the documentation for them for a description of their use.
As to other aspects, which are things only malware will do, you will not get an answer here.
bind mutex app into the exe works for it to only run once, but then the command to open script get confused so need another method.
However on the microsoft sample are you supose to change anything in there i get error messages when i try to compile it.
bind mutex app into the exe works for it to only run once, but then the command to open script get confused so need another method.
However on the microsoft sample are you supose to change anything in there i get error messages when i try to compile it.
Here is my failure attempt to add it in the code:
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <iostream>
#include <stdlib.h>
int main() {
HWND btr, script;
HWND hWnd = GetConsoleWindow();
btr = FindWindow(NULL, "window name");
if(FindWindow(NULL, "window name") then
abort;
while(FindWindow(NULL, "Window name")) {
Sleep(2);
}
return 0;
}
i think the find window command is wrong also, is abort really the command witch will break the code if what so ever statement is true ?
Last edited by tom1; 03-09-2010 at 06:23 AM.
I figured in c++ then
begin
end.
is equal to this
i want to learn, im no black hat programmer.Code:int main() { }
In this forum you are supose to ask for help if there is something you are wondering of am i right? because thats exactly what i did, nothing to be suspecious about.
Last edited by tom1; 03-09-2010 at 02:54 PM.