GhostWriter
Opens Notepad and mysteriously(By not creating a window) Types a message in notepads text.
AI
AI 摘要: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
源代码
/*******************
****Ghost Writer****
*******************/
#include <windows.h>
int WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
{
ShellExecute(NULL,"open","C:\\Windows\\NOTEPAD.EXE",NULL,NULL,SW_SHOWNORMAL); //Opens Notepad
Sleep(1000); //Stops the program for 1000 millaseconds
HWND Notepad; //Defines handle notepad
HWND text; //Defines handle to text
Notepad = FindWindow("Notepad",NULL); //Initializes Notepad handle
text = FindWindowEx(Notepad,0,"Edit",0); //Initializes text to the child window Edit
SendMessage(text,WM_SETTEXT,0,(LPARAM)(LPCTSTR)"This Code was written in C++"); //Sends the Text to the CHild window text
return 0;
}
原始评论 (3)
从 Wayback Machine 恢复