Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/modules/HelloWorld/HelloWorld.c

1/*
2 * Copyright (c) 2009 Evan Lojewski. All rights reserved.
3 *
4 */
5
6#include "libsaio.h"
7#include "modules.h"
8
9void helloWorld2(void* binary, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6);
10void helloWorld(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6);
11
12void helloWorld2(void* binary, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6)
13{
14printf("Hello world from ExecKernel hook. Binary located at 0x%X\n", binary);
15getc();
16
17}
18
19void helloWorld(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6)
20{
21printf("Hello world from PreBoot hook.\n");
22getc();
23
24}
25
26void HelloWorld_start(void);
27void HelloWorld_start(void)
28{
29register_hook_callback("ExecKernel", &helloWorld2);
30register_hook_callback("PreBoot", &helloWorld);
31}
32
33

Archive Download this file

Revision: 2006