|
-
Jun 10th, 2006, 09:49 PM
#1
Thread Starter
Frenzied Member
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
Magiaus
If I helped give me some points.
-
Jun 11th, 2006, 11:56 AM
#2
Re: help plz
What's the compiler output?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jun 12th, 2006, 10:24 AM
#3
Thread Starter
Frenzied Member
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
Magiaus
If I helped give me some points.
-
Jun 12th, 2006, 10:27 AM
#4
Re: help plz
The textual compiler output.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|