BecauseUipi
When a high-permission process fails to receive a message when the high-permission process sends a message to the high-permission system;
Let's take a look at what uipi is: The following is taken from Baidu Encyclopedia:
Uipi refers to the user interface privilege isolation (User Interface privilege isolation), which is a Windows
A new security feature introduced after nt 6.0 (Vista) is the entireUACIt is an integral part of the mechanism. It is mainly used to intercept messages sent from processes with low mic levels.
According to Windows development specifications, user-defined messages are larger than wm_user. The default uipi rule is that a process fails to send messages higher than wm_user to a process at its Mic level, and the system filters custom messages selectively, some information, such as wm_dropfiles, is also filtered out.
So how to solve this problem, the famous Microsoft provides a life-saving function
Changewindowmessagefilter (adds
Or removes a message from the user interface privilege isolation (uipi) Message filter ~ The problem is solved naturally after filtering ~ PS: this function is in user32.dll ~
The function prototype is:
BOOL WINAPI ChangeWindowMessageFilter( _In_ UINT message, _In_ DWORD dwFlag);
Message[In]
Type:Uint
The message to be added or removed.
Dwflag[In]
Type:DWORD
Value |
Meaning |
-
Msgflt_add
-
1
|
Add to filter |
-
Msgflt_remove
-
2
|
Remove Filter |
PS:Msgflt_add/Msgflt_remove
No definition for manual 1, 2 ~
Check a chestnut (solve the Drag and Drop File )~
void InitUIPIFilter(){ typedef BOOL (WINAPI *ChangeWindowMessageFilterProc)(UINT,DWORD); HMODULE hUser = LoadLibraryA("user32.dll"); if (hUser) { ChangeWindowMessageFilterProc proc = (ChangeWindowMessageFilterProc)GetProcAddress(hUser, "ChangeWindowMessageFilter"); if(proc){proc(WM_COPYDATA,1);proc(WM_DROPFILES,1);} }}