Information Systems



Why doesn't Journal Playback work with Vista?

First of all, you need to disable UAC from command line:msconfig. Go to the Tools tab to disable. There may be a way of doing this using manifests and and application permissions, but nobody seems to know how to do it judging by the dialog on the web.

Before going on, though. You're better of using SendInput than hooks for playback on Windows. Playback hooks just barely work on Vista and work marginally on XP. There are major problems with popping modal dialogs.

The 2nd thing you need to know is that there's a bug in Vista that doesn't process any playback events from the Journal Playback function unless the function returns 0. A workaround is to Sleep for the time you would have returned and return 0.

For instance:

LRESULT CALLBACK JournalPlaybackFunc (int nCode, WPARAM wParam, LPARAM lParam )
{
....
switch(nCode)
{
case HC_GETNEXT:
{
....
if ( lReturnValue < 0L )
{
lReturnValue = 0L;
lpEvent->time = GetTickCount();

else
{
Sleep(lReturnValue);
}
// return ( (DWORD) lReturnValue );
return 0;
}
...