Results 1 to 7 of 7

Thread: Tracking Clipboard Paste

Threaded View

  1. #2
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: Tracking Clipboard Paste

    I don't know how exactly you're wanting to go about a function hook, but if we're talking C:
    Code:
    #include <windows.h>
    #pragma comment(lib, "detours.lib")
    #include "detours.h" // Detours for everything else
    
    HANDLE (WINAPI *origGetClipboardData)(UINT uFormat);
    HANDLE WINAPI hookGetClipboardData(UINT uFormat) {
    	// Do whatever
    
    	// Call original
    	return origGetClipboardData(uFormat);
    }
    void doHooking() {
    	origGetClipboardData = (HANDLE (__stdcall *)(UINT))DetourFunction((PBYTE)GetClipboardData, (PBYTE)hookGetClipboardData);
    }
    Last edited by RudiVisser; Jun 3rd, 2008 at 06:15 PM.
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

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