mr4th-dynamic-linking/win32_load_time/win32_plugin.c

18 lines
410 B
C

// declare base_func; mark it as a load-time imported symbol
__declspec(dllimport) void base_func(void);
// declare plugin_func; mark it as an exported symbol
__declspec(dllexport) void plugin_func(void);
// define plugin_func
#include <stdio.h>
__declspec(dllexport) void
plugin_func(void){
printf("provided by plugin: {\n");
printf(" ");
base_func();
printf(" ");
base_func();
printf("}\n");
}