我在做一個hook的dll 比方講捕捉mouse動作 按照hook定義中處理函數的聲名該是
LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam);
我在dll中也這樣聲明
#ifdef __cplusplus
#define EXPORT extern "C" __declspec (dllexport)
#else
#define EXPORT __declspec (dllexport)
#endifEXPORT LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam);但是在別的exe中GetProcAddress()這個dll中的這個函數時 返回零 試了幾次 把函數聲明改為
EXPORT int MouseProc(int nCode, WPARAM wParam, LPARAM lParam);
倒可以工作了 這是為什麼呢 難道LRESULT CALLBACK 與dll的導出有衝突?