Пытаюсь вызвать message box из dll, учебное задание.
typedef int (WINAPI* _MessageBoxA)(HWND, LPTSTR, LPTSTR, UINT);
HMODULE user32 = (*LoadLibraryAPointer)("user32.dll");
PDWORD Address = (PDWORD)((LPBYTE)user32 + pIED->AddressOfFunctions);
PDWORD Name = (PDWORD)((LPBYTE)user32 + pIED->AddressOfNames);
PDWORD Ordinal = (PWORD)((LPBYTE)user32 + pIED->AddressOfNameOrdinals);
_LoadLibraryA LoadLibraryAPointer;
_MessageBoxA MessageBoxPointer;
for (int i = 0; i < pIED->AddressOfFunctions; i++)
{
if (!hashComparatorA(MESSAGE_BOX_HASH, (char*)user32 + Name[i]))
{
MessageBoxPointer = (user32 + Address[Ordinal[i]]);
break;
}
}
Возникает ошибка
error C2440: '=' : cannot convert from 'HMODULE' to '_MessageBoxA'