I found a solution and posted it into another forum:

http://www.codeguru.com/forum/showthread.php?t=442396