extern "C" _declspec(dllexport) void fun();
void _declspec(dllexport) fun()
{
MessageBoxW(NULL,TEXT("hello!!!"), TEXT("demo"), MB_OK);
}
MessageBoxW(NULL,TEXT("hello!!!"), TEXT("demo"), MB_OK);
不加TEXT会出现
error C2664 cannot convert parameter 2 from 'const char [9]' to 'LPCWSTR'错误
加上TEXT()就可以解决