I'm trying to import a function exported by a dll. So far:
#pragma comment(lib, "hookHop.lib")
extern "C" void hhPostMessageA(HWND Hwn, UINT Msg, WPARAM WParam, LPARAM LParam);
extern "C" LPARAM CursorPosTolParam(VOID);
The lib and dll are in my project directory and my dll is in my debug directory. I get the following linker error when I build:
main.obj : error LNK2019: unresolved external symbol _hhPostMessageA referenced in function "void __cdecl SendKey(char)" (?SendKey@@YAXD@Z)
main.obj : error LNK2019: unresolved external symbol _CursorPosTolParam referenced in function "long __cdecl getCursPos(void)" (?getCursPos@@YAJXZ)
Unfortunately the person who did it only uses assembly lol. Here's what's in the .def file:
LIBRARY hookHop
EXPORTS CursorPosTolParam
EXPORTS hhPostMessageA
he did release the source. here's hhPostMessageA's func defintion:
hhPostMessageA proc hWnd:HWND, Msg:UINT, wParam:WPARAM, lParam:LPARAM
cmp dword ptr ds:[boolVersion], 01h
jz @f
mov edi, edi
push ebp
mov ebp, esp
jmp dword ptr ds:[adrPostMessage]
@@:
mov dword ptr [eax], 01234h
ret
hhPostMessageA endp
Help?