본문 바로가기
IT-개발,DB

[개발/VC++/MFC] CreateProcess로 창숨기기

by SB리치퍼슨 2011. 2. 16.

#pragma comment(lib,"ws2_32")

#include <winsock2.h>
#include <windows.h>
#include <stdio.h>

void main(int argc, char *argv[])
{
        STARTUPINFO si;
     PROCESS_INFORMATION pi;

     si.cb= sizeof(STARTUPINFO);
     si.lpReserved= NULL;
     si.lpReserved2   = NULL;
     si.cbReserved2   = 0;
     si.lpDesktop = NULL;
     si.lpTitle   = NULL;
     si.dwFlags   = STARTF_USESHOWWINDOW|STARTF_USESTDHANDLES;
     si.dwX   = 0;
     si.dwY   = 0;
     si.dwFillAttribute   = 0;
     si.wShowWindow   = SW_SHOW;

    

     CreateProcess(NULL,"c:\\windows\\system32\\calc.exe",NULL,NULL,true,dwCreationFlags = DETACHED_PROCESS ,NULL,NULL,&si,&pi);

}

반응형

댓글