2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
8 #include <aros/debug.h>
9 #include <aros/libcall.h>
10 #include <aros/symbolsets.h>
11 #include <proto/exec.h>
12 #include <proto/hostlib.h>
13 #include "battclock_intern.h"
15 static const char *Symbols
[] = {
22 static int BattClock_Init(struct BattClockBase
*BattClockBase
)
27 HostLibBase
= OpenResource("hostlib.resource");
28 D(bug("[battclock] HostLibBase = 0x%08lX\n", HostLibBase
));
30 BattClockBase
->Lib
= HostLib_Open("kernel32.dll", NULL
);
31 if (BattClockBase
->Lib
) {
32 BattClockBase
->KernelIFace
= (struct KernelInterface
*)HostLib_GetInterface(BattClockBase
->Lib
, Symbols
, &r
);
33 D(bug("[battclock] KernelIFace = 0x%08lX\n", BattClockBase
->KernelIFace
));
34 if (BattClockBase
->KernelIFace
) {
37 HostLib_DropInterface((APTR
)BattClockBase
->KernelIFace
);
39 HostLib_Close(BattClockBase
->Lib
, NULL
);
45 ADD2INITLIB(BattClock_Init
, 0)