This fragment is about to be reported (you'll remain on this page):

You can enter a comment to clarify the mistake if you would like to:

Posts composed at February 2012 RSS20

Download useful Delphi packages

Direct downloads for highly useful free and standalone Delphi classes and packages.

Download useful Delphi packages

Seeing in the statistics that many people search for TPNGObject and other stuff I've decided to write this download page-article with direct links to useful 3rd party packages I use dialy in my Delphi 7 projects.

All classes are freeware and open source (licenses included). Links are provided for classes I remember the source I've got them from. Most packages work well below Delphi 7.

See also my standalone Delphi 7 eXtension library.

PNGImage (TPNGObject)

«…»

No comments yet | Read rest of this entry »

D7X – Delphi 7 eXtension library

A collection of most used lightweight & standalone Delphi 7 classes, VCL components and functions.

During my long and fruity friendship with Delphi, particularly the 7th version, I have colelcted a large number of helpful standalone classes, VCL components and functions that I've been using in various projects. Not so long ago I decided to put them in a separate build which I called D7X (aka «Delphi 7 eXtension» library).

One of the main points behind D7X is complete Unicode support in each and every component. You will see that pascalString's are extremely rare in the code.

It is available from this SVN repository:

«…»

No comments yet | Read rest of this entry »

Hooking functions using prologue rewriting

Explains how to hook any WinAPI or other function using prologue rewriting technique in Delphi 7.

This article is written based on a test project that I had made before creating ApiHook – Win32 API hooking tool not so long ago. It demonstrates how to hook library functions – the technique that lies in the very core of ApiHook.

The basics

Let's start with the basic idea. Why we might want to hook, say, a WinAPI function?

Simply enough: if a target process calls that function it will essentially call ours. Then we can decide what we do: we can bypass the call normally but probably record some function arguments; we can also change the return valuefor example, if you've hooked explorer.exe and want to hide certain files from the desktop; we can modify parameters to let the original function do something else that the target program intended to. We can even decide not to call any API function or call a different one – because we actually control the execution from the moment the target calls (our) function and until we return from it.

«…»

No comments yet | Read rest of this entry »

Fixing Java screen rendering under VMware 8

Fixing Java screen rendering under VMware 8

Some month ago I've bought a new PC (HP DC7800 Ultra Slim Desktop) and while moving from my old desktop PC (1xAMD64 Athlon 3000+ 2.22 GHz) to this brand new silent nettop I've upgraded a lot of my old programs (starting with Firefox 3.6). Among those was VMware 6 Workstation.

After upgrading to VMware 8 I noticed nothing problematic until I've installed latest Java JRE 6.30 on the fresh setup of Windows XP SP3 Russian. Previously Java had worked as fine as any other program but this time it did something very weird – when I would start any Java-powered application the virtual display would «scatter» into colorful pieces that would change occasionally when I moved the mouse or attempted to do anything.

As short Google investigation has showed it was likely the problem of new VMware display driver or one of the recent Java version. This post explains how to fix it in two ways:

  • Turn Hardware Acceleration to None under Display Properties → Settings → Advanced → Troubleshooting. Not recommended since presumably this is useful for other stuff.
  • Set the global environment variable J2D_D3D to false inside the guest OS. Using reskit tools this is setx J2D_D3D false -m. According to Sun, this setting is used to turn off the Java 2D system's use of Direct3D in Java 1.4.1_02 and later.

I haven't tried the first option but the second (setting J2D_D3D to false) has fixed my problem instantly – I even didn't have to restart the guest OS.

This forum thread describing the problem might be of interest as well.

No comments yet | Show this entry »

Give users no chance to choose

Give users no chance to choose

This is a real screenshot resulted after my attempt to start ApiHook – Win32 API hooking tool in full DEP mode (for system and programs). Both buttons says «Yes» and «Yes» – the Microsoft's way of asking user :)

No comments yet | Show this entry »

Сырой компот

Очень простой и вкусный неварёный сыроедческий компот из сушёной вишни с урюком без сахара.

Это очередной рецепт, который я то ли где-то прочитал, то ли услышал и который на удивление органично вписался в мою кухнюрецепт сыроедческого компота.

Собственно, «рецептом» его можно весьма условно назвать, как и прочие сырые рецепты. Всё, что вам потребуется – сушёная вишня и урюк. И вода, разумеется.

Вообще говоря в таком виде разница между соком и компотом исчезает начисто.

Наверное, таким и был изначальный компот – раньше я их не очень любил, так как там было нмого воды, а вкус весьма слабо чувствовался. То ли дело неварёный компот, как этот – концентрация такая, что можно его жевать и удовольствия куда больше. И опять же вода сырая.

«…»

No comments yet | Read rest of this entry »

ApiHook – Win32 API hooking tool

A full-featured console WinAPI hooking tool written in Delphi 7. Freeware. Open source. Public domain.

ApiHook – Win32 API hooking tool

ApiHook is a freeware (public domain) open-source program written in Delphi 7 for hooking library calls in Win32 systems. In fact, it can be used to hook any snippet of assembly code in a single EXE file as well but this needs a bit of source code tweaking.

ApiHook lets you track and view information about what functions and how exactly the target program calls. It is implemented in two parts: loader and library. The first injects the ApiHook library into the target process (starting it or attaching to an already running one) while the second does the actual work.

ApiHook lets you examine values of registers the called routine was passed and also capture its parameters (using stored asmESP value) and returned value through them.

The mechanics is simple: you write a script file specifying what actions must be performed when a specific function is called; actions receive the snapshot of the call-time registers and can log them, dump memory blocks or do something else.

«…»

No comments yet | Read rest of this entry »