Results 1 to 4 of 4

Thread: help plz

  1. #1

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    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.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    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.

  3. #3

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    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.

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    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
  •  



Click Here to Expand Forum to Full Width