Yun Peng | a93e9de | 2016-06-30 14:27:38 +0000 | [diff] [blame] | 1 | #include <stdio.h> |
2 | #include <windows.h> | ||||
3 | |||||
4 | #ifdef __cplusplus | ||||
5 | extern "C" { | ||||
6 | #endif | ||||
7 | |||||
8 | #include <time.h> | ||||
9 | |||||
10 | __declspec(dllexport) char *get_time() { | ||||
11 | time_t ltime; | ||||
12 | time(<ime); | ||||
13 | return ctime(<ime); | ||||
14 | } | ||||
15 | |||||
16 | __declspec(dllexport) void say_hello(char *message) { | ||||
17 | printf("Hello from dll!\n%s", message); | ||||
18 | } | ||||
19 | |||||
20 | #ifdef __cplusplus | ||||
21 | } | ||||
22 | #endif | ||||
23 |