How to prevent UWP application load a normal Windows DLL, when I call SetWindowsHookEx to do DLL injection.

  • Thread starter Thread starter sethq
  • Start date Start date
S

sethq

Guest
My problem is a little bit complex.

I'm using SetWindowsHookEx to do DLL injection. This works fine for desktop applications. But for one application installed from Microsoft AppStore, when I call SetWindowsHookEx to do DLL injection, there will be an Error dialog say something like

"SomeApp.exe -- Bad Image
xxxxxx\xxxxx\myDll.dll is either not designed to run on Windows or it contains an error........ Error status 0xc000012f".

After searching in Google, I know something about UWP. And this error should be caused by the incompatible between Microsoft UWP application and normal desktop application. My question is, since Microsoft designed the isolation between UWP application and normal desktop applications, why 'SetWindowsHookEx' will still cause my normal desktop version DLL being loaded by an UWP application?

How can I prevent my normal Windows desktop DLL being loaded by application from Microsoft AppStore, when I call SetWindowsHookEx?


Thanks in advance!
seth



1476134.png

Continue reading...
 
Back
Top