0

With this code:

    auto wintrust = ::LoadLibrary(_T("wintrust.dll"));
    typedef LONG (WINAPI *LPWINVERIFYTRUST)(HWND hwnd, GUID *pgActionID, LPVOID pWVTData);
    auto WinVerifyTrust_I = LPWINVERIFYTRUST( GetProcAddress(wintrust, "WinVerifyTrust") );

I get the warning message:

fff.cpp:741: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'LPWINVERIFYTRUST' {aka 'long int (*)(HWND__*, _GUID*, void*)'} [-Wcast-function-type]
fff.cpp: In static member function 'static bool FiFlexDll::VerifyDigitalSigning(LPCTSTR)':
fff.cpp:741:90: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'LPWINVERIFYTRUST' {aka 'long int (*)(HWND__*, _GUID*, void*)'} [-Wcast-function-type]
     auto WinVerifyTrust_I = LPWINVERIFYTRUST( GetProcAddress(wintrust, "WinVerifyTrust") );
                                                                                          ^

I do not understand it. It's an x64 build, if that matters.

KungPhoo
  • 516
  • 4
  • 18

0 Answers0