Jump to content

How to change this name


favini

Recommended Posts

  • 3 weeks later...
13 hours ago, dead-end said:

This means that is not possible to change it?

 

That's means what it HARDCODED and can't be edited via edition another files. Only DIRECT or HOOK changes.

Link to comment
Share on other sites

you can do with dll.

example:

main.cpp (its good or no idk, but its working fine.)

#include "main.h"
#include "Winuser.h"
#include <process.h>


void TitleReplaceHookThread(void *param)
{
    DWORD pid = 0;
    DWORD current_pid = GetCurrentProcessId();
	while(true)
	{
		Sleep(50);
		HWND hWnd = FindWindow(NULL, "Lineage II");
		GetWindowThreadProcessId(hWnd,&pid);
		if(hWnd&&current_pid==pid)
        {
        SetWindowText(hWnd, "My Server Name");
        break;
        }
	}
}

extern "C" DLL_EXPORT BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    switch (fdwReason)
    {
        case DLL_PROCESS_ATTACH:
             HANDLE hThread;
            hThread = (HANDLE)_beginthread(TitleReplaceHookThread, 0, NULL);
            CloseHandle(hThread);
            break;
    }
    return TRUE;
}

main.h

#ifndef __MAIN_H__
#define __MAIN_H__

#include <windows.h>

#ifdef BUILD_DLL
    #define DLL_EXPORT __declspec(dllexport)
#else
    #define DLL_EXPORT __declspec(dllimport)
#endif

#endif

compile and put ur dll file to ur l2 system folder. to compile you can use simple tool `CodeBlocks`

 

and then use CFF Explorer

1. Open window.dll
2. Click Import Adder
3. Add dll file.
4. Select Exported function `DllMain@` and click Import by Name and then click Rebuild Import table.
5. save window.dll
done.

Edited by wongerlt
  • Like 1
  • Upvote 1
Link to comment
Share on other sites

http://prntscr.com/26puoez

 

try open your compiled dll with cff explorer and check export table.

https://drive.google.com/file/d/16aF3PkU738rtx-bia9O_rUATL6zwDFH8/view?usp=sharing this ex. For interlude

Edited by wongerlt
Link to comment
Share on other sites

20 hours ago, splicho said:

It always reverts to "lineage II" when I switch windows.

 

For example, Lineage - Discord - Lineage and it's back to normal.

 

explorer-juvw-Oo-Yx-S3.gif

Try use simple while or try catch event on title change, just google it. `c++ window title change event` 

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...