|
You last visited: Today at 08:08
Advertisement
Show notifications via dll
Discussion on Show notifications via dll within the SRO Coding Corner forum part of the Silkroad Online category.
05/05/2020, 18:03
|
#1
|
elite*gold: 0
Join Date: Feb 2017
Posts: 186
Received Thanks: 119
|
Show notifications via dll
i'm trying add to dll , but crash .
what wrong ?
thx for any help
Code:
const DWORD Blue = 0x0077B580;
const DWORD Blue2 = 0x008C9C30;
const DWORD Blue3 = 0x00EEDE90;
void Game::Blue(const wchar_t* msg)
{
void* _ecx = SroPP::detail::MemoryHack::RefPtr<void*>(0x110F80C);
__asm
{
push msg;
mov ecx, Blue3;
call Blue2;
mov ecx, _ecx;
push eax;
call Blue;
}
}
|
|
|
05/05/2020, 23:33
|
#2
|
elite*gold: 0
Join Date: Mar 2010
Posts: 566
Received Thanks: 226
|
PHP Code:
void CGInterface::ShowPinkNotify(std::wstring* msg) { reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x00777BF0)(this, msg); }
void CGInterface::ShowBlueNotify(std::wstring* msg) { reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B580)(this, msg); }
void CGInterface::ShowGreenNotify(std::wstring* msg) { reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B5B0)(this, msg); }
PHP Code:
void ShowPinkNotify(std::wstring* msg); void ShowBlueNotify(std::wstring* msg); void ShowGreenNotify(std::wstring* msg);
|
|
|
05/06/2020, 00:28
|
#3
|
elite*gold: 0
Join Date: Apr 2016
Posts: 201
Received Thanks: 47
|
Quote:
Originally Posted by khaleed2010
PHP Code:
void CGInterface::ShowPinkNotify(std::wstring* msg) { reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x00777BF0)(this, msg); }
void CGInterface::ShowBlueNotify(std::wstring* msg) { reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B580)(this, msg); }
void CGInterface::ShowGreenNotify(std::wstring* msg) { reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B5B0)(this, msg); }
PHP Code:
void ShowPinkNotify(std::wstring* msg); void ShowBlueNotify(std::wstring* msg); void ShowGreenNotify(std::wstring* msg);
|
@ ebi you may find @ 's
interesting
|
|
|
05/06/2020, 06:46
|
#4
|
elite*gold: 0
Join Date: Feb 2017
Posts: 186
Received Thanks: 119
|
thanks for helping me, but i want to know something wrong with my code .
|
|
|
05/06/2020, 08:52
|
#5
|
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,473
|
Quote:
Originally Posted by sonzenbi
thanks for helping me, but i want to know something wrong with my code .
|
The code doesn't look wrong, just not pretty.
Blue = CGInterface::ShowMessage_Warning
Blue2 = CTextStringManager::GetString
Blue3 = g_CTextStringManager
_ecx = g_pCGInterface
Code:
push msg;
mov ecx, g_tsm;
call GetString;
mov ecx, g_interface;
push eax;
call ShowMessage_Warning;
1. How are you calling it? What string are you putting into it? GetString only works for these UIIT_BLAH_BLAH-translation-tokens.
2. Can you run it in a debugger and check where it crashes (address and stack)?
|
|
|
05/06/2020, 11:00
|
#6
|
elite*gold: 0
Join Date: Feb 2017
Posts: 186
Received Thanks: 119
|
Quote:
Originally Posted by florian0
The code doesn't look wrong, just not pretty.
Blue = CGInterface::ShowMessage_Warning
Blue2 = CTextStringManager::GetString
Blue3 = g_CTextStringManager
_ecx = g_pCGInterface
Code:
push msg;
mov ecx, g_tsm;
call GetString;
mov ecx, g_interface;
push eax;
call ShowMessage_Warning;
1. How are you calling it? What string are you putting into it? GetString only works for these UIIT_BLAH_BLAH-translation-tokens.
2. Can you run it in a debugger and check where it crashes (address and stack)?
|
Sadly, I have no knowledge of C ++ maybe a little bit
The only thing I can do was try again and again
I sent the source code to you via private messenger, it would be better if you see it.
Thank you for spending the time helping me
|
|
|
05/06/2020, 12:21
|
#7
|
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,473
|
GetString only works with these UIIT_BLAH_BLAH. You are passing a string that should be displayed to it. Thats not going to work.
Code:
const wchar_t* killmsg = Convert(" [ " + killname + " ] " + " §ˇ KŐt LiÔu " + " [ " + Mobname + " ] ");
SroPP::Game::Blue((killmsg));
If the string given to GetString is not found in the translation database, an empty string is returned. But that shouldn't crash your client. No idea why it happens unless you open your client in x32dbg and check where it crashes.
Anyhow: ShowMessage_Warning expects a std::wstring in VC80's ABI format. You need to put your message into that structure and pass it to ShowMessage_Warning. Using GetString is not going work for you in this case.
|
|
|
05/06/2020, 16:33
|
#8
|
elite*gold: 0
Join Date: Feb 2017
Posts: 186
Received Thanks: 119
|
It seems, i'm having trouble with the basic knowledge
I will try to take advantage of your suggestions
|
|
|
05/06/2020, 18:46
|
#9
|
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,473
|
Quote:
Originally Posted by sonzenbi
It seems, i'm having trouble with the basic knowledge
I will try to take advantage of your suggestions
|
I made a guide for handling strings in Silkroad:
Maybe this helps you understanding strings.
|
|
|
|
Similar Threads
|
Show in-game notifications - by writing code
07/28/2022 - SRO Hacks, Bots, Cheats & Exploits - 15 Replies
Hello beloved, dead community,
i recently achieved something i want to share with you.
Video demonstration: https://www.youtube.com/watch?v=AEr1UM2_Tjk
Behind the scenes: https://florian0.wordpress.com/2017/12/07/silkroad -online-simple-access-to-ui-elements/
Sending notifications by code
|
[HOW TO] MSVCR110.dll fehlt BEHEBEN | [MSVCR120.dll MSVCP110.dll MSVCP100.dll etc]
03/25/2014 - Tutorials - 2 Replies
Hier ist ein Youtube Video:
MSVCR100.dll feht BEHEBEN / MSVCR110.dll fehlt MSVCR120.dll MSVCP110.dll MSVCP100.dll MSVCP120.dll - YouTube
Aber den ganzen Kram könnt ihr auch als Text haben:
Viele von euch kennen bestimmt das Problem das ne dll auf dem PC fehlt und das Programme dann nicht laufen. Hier ist die Lösung:
Schaut erstmal nach, welche Microsoft Redistributables auf eurem PC installiert sind. Geht hierzu auf Start > Sytemsteuerung > Programme > Programme und Funktionen
und...
|
All times are GMT +1. The time now is 08:08.
|
|