-
help plz
OK, I am using the VC that comes VS 2005
I created a new empy Win32 project setup for dll
Code:
/********************************************************
*
* El Hooko
*
*********/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
extern "C" __declspec(dllexport) void SetHook();
extern "C" __declspec(dllexport) void ReleaseHook();
extern "C" __declspec(dllexport) __w64 long __stdcall HProc(int nCode, WPARAM wParam, LPARAM lParam);
HHOOK _hook = NULL;
HINSTANCE _hInst = NULL;
extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
_hInst = hInstance; //store HINSTANCE
return true; //continue
}
extern "C" __declspec(dllexport) void SetHook()
{
//find guild wars
LPCWSTR cls = (LPCWSTR)"WNDCLASS";
HWND hWnd = FindWindow(cls, NULL);
DWORD pid = NULL;
DWORD tid = GetWindowThreadProcessId(hWnd, &pid);
_hook = SetWindowsHookEx(WH_CALLWNDPROC, HProc, _hInst, tid);
}
extern "C" __declspec(dllexport) void ReleaseHook()
{
UnhookWindowsHookEx(_hook);
}
extern "C" __declspec(dllexport) __w64 long __stdcall HProc(int nCode, WPARAM wParam, LPARAM lParam)
{
return CallNextHookEx(_hook, nCode, wParam, lParam);
}
it compiles fine except no dll is out put....
help plz
-
Re: help plz
What's the compiler output?
-
Re: help plz
it creates the .obj for the file and the mainefest, the pdb
there is just the one file inserted into an empty win32 dll project..
I am pretty sure I know the easy way to fix it is to create an new non empty dll project set to export symbols and let vs write the code
I'm just curious what is going on here.. I went over and over all the compiler and linker options but nothing jumped out at me
-
Re: help plz
The textual compiler output.