Hook w visalu debug

0

witam. Mam pytanie czemu kiedy kompiluje ta dllke w debug mode to wszystko dziala, a kiedy w release to jak uzywam getprocaddress to zwraca mi 0?

//============================================================================
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>

//============================================================================

__declspec(dllexport) LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam)
{
	if(nCode == HC_ACTION)
	{
		// Is this a message for Notepad?
		MSG* pMsg = (MSG*)lParam;

		if ((pMsg->message == 111) && ((pMsg->lParam > 0) && (pMsg->lParam < 111) ))
		{
			HWND x = FindWindow(NULL, "xxx");

			  SendMessage(x, 1111, pMsg->wParam, pMsg->lParam);

		}
	}
	return CallNextHookEx(NULL, nCode, wParam, lParam);
}
0

problem rozwiazany, w mod release w dll properties linker->input -> "module definition file" wpisalem exports.def

1 użytkowników online, w tym zalogowanych: 0, gości: 1