BOOL (WINAPI *gmse)(LPMEMORYSTATUSEX) = GetProcAddress(
kernel32, "GlobalMemoryStatusEx");
これは .cpp ファイルにあります。上記のコードをコンパイルしているときに、以下のエラーが発生します。
error C2440: 'initializing' : cannot convert from 'FARPROC' to 'BOOL (__cdecl *)(LPMEMORYSTATUSEX)'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
GetProcAddress
関数を何にキャストする必要があるのか わからないようです。誰かが私を正しい方向に向けることができますか?
ありがとう