Tag Archives: function

Custom prolog and epilog for a function in C++

Traditionally, the compiler is responsible for creating the prolog and epilog of a function. However, custom prolog and epilog code can be written if a function has been declared with the naked attribute. The snippet below demonstrates a naked function with custom prolog and epilog code. __declspec(naked) void foo(){ // Prolog __asm { push ebp [...]

Posted in Assembler, C++ | Also tagged , , , , , , , , , , , , , | Leave a comment

Hooking with the Microsoft Detours library in C++

The DLL Injection example described how to inject a DLL into an existing process. The snippets below demonstrate a combination of hooking and DLL injection in C++ with the Microsoft Detours library. Quote: In computer programming, the term hooking covers a range of techniques used to alter or augment the behavior of an operating system, [...]

Posted in C++ | Also tagged , , , , , , , , , , , , , , , | 5 Comments

(jQuery) jQuery input value text toggle

This is a jQuery custom function used for clearing the default input values of input fields without having to add a class or inline javascript like onclick or onblur. Just write your input and give it a value like you normally would and then add this function and you’re good to go.

Posted in JavaScript | Also tagged , , , , , , , | Leave a comment