Freigeben über


Using the UIPIEnableCustomMsgs Fix

Applies To: Windows 7, Windows Vista

This section includes information about using the UIPIEnableCustomMsgs compatibility fix, including the usage and API-related information.

Note

This compatibility fix differs from UIPIEnableStandardMsgs because it first calls RegisterWindowMessageA before calling ChangeWindowMessageFilter.

UIPIEnableCustomMsgs

The User Interface Process Isolation (UIPI) feature blocks Windows® messages from being delivered from less-trusted to more-trusted processes. Messages with a value less than WM_USER (0x0400) can pass through this filter, while other messages that are not included in the filter's pre-defined list, or are coming from less-trusted processes, can be removed and never delivered. This compatibility fix allows you to add additional messages to the pre-defined list of Windows messages, allowing the messages to pass through the filter successfully. You might need to use this fix if:

  • You are communicating between two processes by using Windows messages.

  • You are using Windows hooks to receive notifications from other processes, which are delivered via Windows messages.

  • You have more than one application calling the RegisterWindowMessage function prior to communicating with each other. This is because the same string will always return the same, system-unique Windows message value per login, but the value may vary between runs.

Investigating the Issue

Initially, you must determine if the two application processes are running at different integrity levels. You can view this information in the Integrity column of the Process Explorer tool. Next, you must determine that Windows messages are the source of the failure, which you can examine by using the Spy++ utility that is distributed with Microsoft® Visual Studio®. Unlike UIPIEnableStandardMsgs, the message number may vary with each run. The easiest way to determine the message string is to use a debugger tool to set a breakpoint on the RegisterWindowMessage function, inspect the lpString argument that is passed to that function, and then use that string to configure this compatibility fix.

Intercepted APIs

None. The window message filter is configured when the application loads.

UIPIEnableCustomMsgs Command-Line Options

The UIPIEnableCustomMsgs compatibility fix uses the following syntax to specify the matching criteria.

msg1 msg2 msg3...

The messages are added in string format and are space-delimited.

Included and Excluded Modules

The following table provides details for the modules that are included and excluded by the UIPIEnableCustomMsgs compatibility fix.

Module name Included or excluded

.exe

Included

*

Excluded

Fixing Your Code

You have two options to fix this code. First, you can update the applications to use a mechanism other than Windows messages for communication. This enables you to set up security-enabled cross-process communication. Alternatively, you can call the ChangeWindowMessageFilter API immediately after you call the RegisterWindowMessage function, which is what this compatibility fix does.

See Also

Concepts

Windows Vista and Windows 7 Operating Systems