#include // pregutl -s hklm\init :Launch1=sz:wcetrace.exe int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { // todo: add some test to abort if we detect that the previous exec crashed the device. ( like a last bootphase check ) PROCESS_INFORMATION pi; memset(&pi, 0, sizeof(pi)); CreateProcess(L"loadklib.exe", L"stackdumper.dll", 0, 0, 0, 0, 0, 0, 0, &pi); Sleep(1000); CreateProcess(L"loadhook.exe", L"-l apihookw32a.dll 20", 0, 0, 0, 0, 0, 0, 0, &pi); // Sleep(1000); // CreateProcess(L"loadhook.exe", L"-l apihookdboa.dll 9", 0, 0, 0, 0, 0, 0, 0, &pi); return 0; }