views:

357

answers:

2

keybd_event() is not working in ACTIVEX module with PROTECTED MODE - I am using activex that simulates keypress but it simply does nothing with new IE8.

  keybd_event(VK_SPACE, MapVirtualKey(VK_SPACE, 0), 0, 0);
  keybd_event(VK_SPACE, MapVirtualKey(VK_SPACE, 0), KEYEVENTF_KEYUP, 0);

is there a trick to get around this issue?

+1  A: 

I'm afraid not. To offer improved security, IE8 now hosts tabs and add-ons loaded in separate processes with limited permissions. Much like Chrome does and the new FireFox 4 will do.

Stijn Sanders
A: 

I have the same problem with a BHO. It works initially, then it stops, and also sometimes crashes the iexplore.exe tab instance.

I have found that IE8 version of ieframe.dll seems to be using the Detours library to hook several Windows APIs, including SendInput & keybd_event.

Bevan Collins