Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8098 | superturbo | 1 | #include |
2 | |||
3 | /*Using the "coff" library in ktcc using "inputbox.obj" as an example*/ |
||
4 | |||
5 | unsigned (*InputBox)(void* Buffer, char* Caption, char* Prompt, char* Default, unsigned long Flags, unsigned long BufferSize, void* RedrawProc); |
||
6 | |||
7 | void *InputBoxLib; |
||
8 | |||
9 | void load_coff() |
||
10 | { |
||
11 | InputBoxLib = dlopen("/sys/lib/inputbox.obj", RTLD_GLOBAL); |
||
12 | InputBox = dlsym(InputBoxLib,"InputBox"); |
||
13 | } |
||
14 | |||
15 | int main() |
||
16 | { |
||
17 | load_coff(); |
||
18 | char buffer[256]; |
||
19 | InputBox(buffer, "Hay!", "How do you do?", "Hmm?", 10, 256, 0); |
||
20 | dlclose(InputBoxLib); |
||
21 | } |