[*.c]
int value;
void point() {…};
[*.h]
extern “C” __declspec(dllimport) int value;
extern ”C” __declspec(dllimport) void point();
將這build 成dll後,在C#上引用,如下:
[DllImport (DLL_PATH, EntryPoint = “point”)]
private static extern void point();
只會引用function(void point()),
請問單純全域變數(value) 要如何引用呢?