Created
November 13, 2014 10:00
-
-
Save JubbaSmail/b7a275e7852edfc1a53a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#if define UNICODE | |
#define FindWindow FindWindowW | |
#else | |
#define FindWindow FindWindowA | |
#endif | |
void Hide() | |
{ | |
/* Retrieves a handle to the top-level window whose class name and window name match the specified strings. | |
1st Parmeter lpClassName: ConsoleWindowClass - Class Name | |
2nd Parameter lpWindowName: parameter is NULL, all window names match. | |
If the function succeeds, the return value is a handle to the window that has the specified class name and window name. | |
If the function fails, the return value is NULL. | |
*/ | |
HANDLE stealth = FindWindow("ConsoleWindowClass", NULL); | |
if (stealth != INVALID_HANDLE_VALUE) | |
{ | |
ShowWindow(stealth, FALSE); | |
Sleep(3000); | |
ShowWindow(stealth, TRUE); | |
} | |
} | |
int main(int argc, LPTSTR argv[]) | |
{ | |
Hide(); | |
while (TRUE) | |
{ | |
Sleep(100); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment