Показать сообщение отдельно

  #95  
Старый 05.02.2025, 10:55
Blaburger
Познающий
Регистрация: 04.02.2025
Сообщений: 35
С нами: 671491

Репутация: 0
По умолчанию

Цитата:
Сообщение от BIT_hack  

Код на с++ Visual Studio 2022

C++:


Код:
// Тип функции RequestAuthLogin
typedef
int
(
__fastcall
*
RequestAuthLoginFn
)
(
UNetworkHandler
*
,
int
,
const
wchar_t
*
,
const
wchar_t
*
,
int
)
;
.
.
.
.
.
.
.
.
.
// Вызов функции авторизации из игры
requestAuthLoginFn
(
*
unetwork
,
0
,
login
.
c_str
(
)
,
password
.
c_str
(
)
,
0
)
;
Since the function RequestAuthLogin exported from dll with __thiscall the more correct code will be

C++:


Код:
typedef
int
(
__thiscall
*
RequestAuthLoginFn
)
(
UNetworkHandler
*
,
const
wchar_t
*
,
const
wchar_t
*
,
int
)
;
requestAuthLoginFn
(
*
unetwork
,
login
.
c_str
(
)
,
password
.
c_str
(
)
,
0
)
;
The __fastcall calling convention also works (with an additional parameter) as Microsoft's implementation in MSVC is very similar to __thiscall.
 
Ответить с цитированием