Results 1 to 15 of 21

Threaded View

  1. #1
    simranwsingh's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    3
    My Mood
    Amused

    Change Window Names

    So, as you guys know that aIW has now added some sort of Anti-Cheat, one feature is changing the Window names.



    Well, using this stops you from doing stuff to the game....

    So using some Win API's you can change the name of the Game Windows.



    I used .NET to change the names, while the API's also work in C/CLI/C++

    As you see that the MW2 Game Window isn't changed, the reason being that the MW2 Window is a Child Window to the Parent Window(Console Window), I'm working to get that work..

    This is my code:
    Code:
    Imports System.RuntimeInteropServices
    
    Public Class Changer
    
        Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Integer, ByVal lpString As String) As Integer
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            Dim procList() As Process = Process.GetProcessesByName("iw4mp") 'Gets the Process, But only the Parent Window
            Dim p As Process
            Dim hwnd As Integer
            For Each p In procList
                hwnd = p.MainWindowHandle 'Gets The Main Handle
            Next
            SetWindowText(hwnd, "IW4 Console") 'Changes Text
        End Sub
    End Class
    The steam_api.dll also uses these API's Which are in C++

    I looked at the dll in IDA Pro and found this


    These are Win API's And, also looking at the dll in a decompiler I found this

    Code:
    public private: static void __gc* modopt(CallConvCdecl __gc*) ResetWindowTitle()
    {
        HWND__ __gc** hwnd__Ptr = <Module>::FindWindowA(0x6f396c, 0);
        if (hwnd__Ptr != 0)
        {
            <Module>::SetWindowTextA(hwnd__Ptr, 0x7859c0);
        }
    }
      VB.NET Translated Version:
    Friend Shared Sub ResetWindowTitle()
        Dim hwnd__Ptr As HWND__* = <Module>.FindWindowA(&H6F396C, Nothing)
        If (Not hwnd__Ptr Is Nothing) Then
            <Module>.SetWindowTextA(hwnd__Ptr, &H7859C0)
        End If
    End Sub
    SetWindowTextA is the same API I use to change the Window Title.
    FindWindowA is an API to find a specific Window.

    The game starts of with normal names but since it loads the steam_api.dll it changes the Window title. So, when the game starts with normal names then the dll uses FindWindowA to find the game's title the changes it.

    -- Simran

  2. The Following 3 Users Say Thank You to simranwsingh For This Useful Post:

    ♪~ ᕕ(ᐛ)ᕗ (08-11-2010),deoxyribonucleicacid (08-09-2010),jabbathehutt (08-09-2010)

Similar Threads

  1. [HOWTO] Change the name of the window
    By ♪~ ᕕ(ᐛ)ᕗ in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 7
    Last Post: 10-29-2010, 09:08 AM
  2. [Tutorial] How to change Windows XP Start-up Screen
    By HazedUp in forum Programming Tutorials
    Replies: 5
    Last Post: 05-03-2009, 06:12 PM
  3. COD4 - Change your name to ANYTHING you want ingame
    By icuigorz in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 3
    Last Post: 07-11-2008, 11:48 AM
  4. Replies: 20
    Last Post: 07-01-2008, 02:19 AM
  5. changeing my name
    By Gourav2122 in forum General
    Replies: 18
    Last Post: 08-22-2007, 09:25 PM