3 #include <aros/debug.h>
4 #include <aros/libcall.h>
5 #include <aros/symbolsets.h>
6 #include <proto/exec.h>
7 #include <proto/hostlib.h>
8 #include "battclock_intern.h"
10 static const char *Symbols
[] = {
17 static int BattClock_Init(struct BattClockBase
*BattClockBase
)
22 HostLibBase
= OpenResource("hostlib.resource");
23 D(bug("[battclock] HostLibBase = 0x%08lX\n", HostLibBase
));
25 BattClockBase
->Lib
= HostLib_Open("kernel32.dll", NULL
);
26 if (BattClockBase
->Lib
) {
27 BattClockBase
->KernelIFace
= (struct KernelInterface
*)HostLib_GetInterface(BattClockBase
->Lib
, Symbols
, &r
);
28 D(bug("[battclock] KernelIFace = 0x%08lX\n", BattClockBase
->KernelIFace
));
29 if (BattClockBase
->KernelIFace
) {
32 HostLib_DropInterface((APTR
)BattClockBase
->KernelIFace
);
34 HostLib_Close(BattClockBase
->Lib
, NULL
);
40 ADD2INITLIB(BattClock_Init
, 0)