"Example Native Method Declaration"

static const wchar_t* GetHelloString() {
	return L"Hello";
}

typedef const wchar_t* (*helloStrPtr)(void);

extern "C" __declspec(dllexport) void GetFuncPtr(helloStrPtr* outFuncPtr) {
	*outFuncPtr = &GetHelloString;
}


Code snippet taken from "Two Decades of C#: A Reference - C# 9".