static const wchar_t* GetHelloString() { return L"Hello"; } typedef const wchar_t* (*helloStrPtr)(void); extern "C" __declspec(dllexport) void GetFuncPtr(helloStrPtr* outFuncPtr) { *outFuncPtr = &GetHelloString; }