At this point, you should be able to understand each of the array entries of HookArray[]. The NktFunctionWrapper objects encapsulate the hook handler function and the function to be intercepted.
In turn, ApiHookPtr pointers are reference-counted pointers a. In our project code, you can see how the hooks defined in HookArray[] are 'activated', specifically in the AttachHook and AttachHookArray functions defined in the hooking. With this overview of Trappola in hand, we are ready to begin our first hacking of the Windows Live Messenger: menu additions through subclassing.
You may think that menus in the WLM are standard Win32 menu resources, and you're right, but this is an exception, because most controls of the WLM are not standard, but owner-drawn.
And, not just owner-drawn, but drawn with a custom UI called DirectUI , which is completely undocumented. The drawing surface for a DirectUI interface control is contained in its own window class, the child of the top-level window class where the menu resides. For this reason, an overview of the window-classes involved in the Windows Live Messenger application is detailed below. Anyway, we are not going to execute DirectUI functions directly, but modify the resources read by the DirectUI parser.
If you are interested, the DirectUI functionality is contained in msncore. Surely, a reversing task on this code could be very interesting, although of limited applicability since future versions of the Windows Live Messenger are likely to be based on WPF code, as a Web search about the latest 9. The Windows Live Messenger does not dynamically create the application menu bars, but they are loaded from stored resources on a separate DLL, msgslang.
You can confirm this using a resource editor such as Resource Hacker , as the following screenshot displays:. For the menu modification to go, it's clear that the main window should have been created successfully.
Thus, an excellent candidate function to intercept is CreateWindowEx. And, this is applicable to most Win32 API functions. The character limitation was evident when non-English characters were used, e. To provide solid and transparent support for application and system internationalization, Microsoft introduced Unicode character sets in the NT kernel series with bits per character, also known as wide-strings.
The answer lies on the Windows API header macro:. Then, if a program is compiled as Unicode, the call is the function name plus 'W' as suffix, or 'A' if the program is compiled to use ANSI strings. Microsoft documentation is very clear on this topic, you can search it for a detailed explanation on Unicode and ANSI based applications. DLL library exports. The required descriptor entry is as follows:. For now, just remember the required signature for a Trappola function handler is:.
Don't worry now about NktHandlerParams , the practical use of this structure will be progressively devised in the article. Our approach to create the menu will be to intercept CreateWindowExW. You can see this is another use of the NktHandlerParams context member. ECX could give you the this pointer address. Therefore, when CreateWindowExW for the top-level window gets called, our hook handler stores the HWND for future reference, and subclasses the window.
What we want to do in the subclassed window procedure is to add an element to the menu bar when the window gets shown, and preferably once and forever.
We must examine what window message to process to do this. The code where the a menu element is added is as follows:. We get the menu handle from the top level menu using GetMenu , create a new popup menu with CreatePopupMenu , and through this handle, we append the entries.
This is done in the Win32 API standard way. The code skeleton could be something like:. Keep in mind that you must return the unprocessed messages to the original window procedure.
To the old window procedure, the Windows API provides the CallWindowProc function, so the default case for message handling in a window procedure switch.. You can see the details in the wndhook. As you see, we've successfully added a working menu through hooking and subclassing. In the following section, we are going to explain how the "About" and "Contact Info" windows are implemented through subclassing.
If anxiety won over you and you already tested the project successfully, you probably noted that the About window and the Contact Info windows are similar in terms of visuals and behavior, as the following capture shows:.
The name tells one of the properties that are inherited by windows based on this class: the window gets "colorized" by sampling a pixel color from the WLM top window client area, apart from getting a rounded shape using a round-rectangle region. Keep in mind that we won't give all the details about, e. Window classes allow a form of inheritance of attributes and functionality to subclassed windows. Subclassed windows can override, accept, or ignore the window messages that are part of the default window class procedure.
They are conceptually similar , but window subclassing is a Windows programming technique, not an implementation or application of a particular programming paradigm.
With that potential confusion cleared out, let's continue. Opening the source file clrzwind. In many Windows API applications, you will find this member set to zero. But remember that, we want all windows based on this class to share a common background color, so this visual aspect is class-dependent, not window-dependent. Instead of using a global variable, we are going to store this color information in the window class itself: that's the reason we are reserving the number of bytes needed to store an RGBA-color which is the size of a COLORREF.
A last word on class extra bytes is that a maximum of 40 bytes can be allocated, so the rule of thumb is to store a pointer if you want to refer to bigger data structures. Now, both windows 'About' and 'Contact Information' are created the same way. The technique to subclass both windows is the same we've seen before: we change the window procedure of each subclassed window to a specialized one where we can override the messages that are handled by the "parent" class window procedure, handle new ones, or even "reject" messages this is the same as overriding, but we simply return from the window procedure without doing anything.
The code structure of the subclassed window procedures involved should clarify this. Let's see the "About" window procedure first:. Let's analyze this procedure. The reason is that you can't. However, it's possible to change the window procedure of the Colorized window class using SetClassLongPtr before the window is created, although this is not recommended since it can affect the remaining windows based on the class.
We do this through a simple SendMessage call:. These troubleshooting steps are listed in the recommended order of execution.
After the software has been fully uninstalled, restart your PC and reinstall Windows Live Essentials software. When the first two steps haven't solved your issue, it might be a good idea to run Windows Update.
Many wlmail. To run Windows Update, please follow these easy steps:. If Windows Update failed to resolve the wlmail. Please note that this final step is recommended for advanced PC users only. If none of the previous three troubleshooting steps have resolved your issue, you can try a more aggressive approach Note: Not recommended for amateur PC users by downloading and replacing your appropriate wlmail. Please follow the steps below to download and properly replace you file:.
If this final step has failed and you're still encountering the error, you're only remaining option is to do a clean installation of Windows To avoid data loss, you must be sure that you have backed-up all of your important documents, pictures, software installers, and other personal data before beginning the process. If you are not currently backing up your data, you need to do so immediately.
Microsoft typically does not release Windows Live Essentials EXE files for download because they are bundled together inside of a software installer. The installer's task is to ensure that all correct verifications have been made before installing and placing wlmail. An incorrectly installed EXE file may create system instability and could cause your program or operating system to stop functioning altogether.
Proceed with caution. You are downloading trial software. Subscription auto-renews at the end of the term Learn more. Your email address will not be published. Windows messenger 7 — Free download tommorow Windows live messenger messenger for windows 7 will be available for download tomorrow June 24 as part of the brand new windows live essentials.
What is new in windows messenger 7? Windows live essentials beta — Download tommorow. Download MSN Messenger 8.
Download Yahoo Messenger 10 for Windows. Download Windows live messenger Full Version. Yahoo Messenger — Download. Removable drives. The worm enumerates drives on your computer, looking for removable drives that are not A: and B:. If it finds any, it makes a copy of itself, such as the following, with ' hidden ' and ' system ' file attributes:. It then writes an Autorun configuration file named " autorun.
When the drive is accessed from a computer supporting the Autorun feature, the worm is launched automatically. If the worm finds any folders on the removable drive, it sets the 'hidden' attribute for those and creates a shortcut file with the name of the folder. THis shortcut file points to another worm copy stored in a hidden folder. Windows Live Messenger.
A checks to see if Windows Live Messenger is installed on your computer. The URL points to a worm copy. The message can be one of several different phrases, and is dependent on the locale and system language of the infected computer.
Some examples of the message can be seen below:. Changes security settings. The worm changes your computer's security settings by making changes to the registry; by doing so, it adds itself to the list of trusted processes that are authorized to access your network.
0コメント