
11.11.2022, 18:39
|
|
Участник форума
Регистрация: 16.08.2017
Сообщений: 110
С нами:
4600979
Репутация:
83
|
|
Read text from showdialog and other compressed strings on 03dl, reading textlen was corrupting the text
чтение текста из showdialog и других сжатых строк в 03dl, чтение textlen разрывает текст
C++:
Код:
case
RPC_ShowDialog
:
{
traceLastFunc
(
"RPC_ShowDialog"
)
;
//UINT16 wDialogID, UINT8 bDialogStyle, UINT8 bTitleLength, char[] szTitle, UINT8 bButton1Len, char[] szButton1, UINT8 bButton2Len, char[] szButton2, CSTRING szInfo
BitStream
bsData
(
rpcParams
->
input
,
rpcParams
->
numberOfBitsOfData
/
8
,
false
)
;
WORD dialogId
;
uint8_t
style
,
titleLen
,
button1Len
,
button2Len
;
char
title
[
257
]
,
button1
[
257
]
,
button2
[
257
]
,
text
[
4096
]
;
bsData
.
Read
(
dialogId
)
;
bsData
.
Read
(
style
)
;
bsData
.
Read
(
titleLen
)
;
bsData
.
Read
(
title
,
titleLen
)
;
title
[
titleLen
]
=
'\0'
;
bsData
.
Read
(
button1Len
)
;
bsData
.
Read
(
button1
,
button1Len
)
;
button1
[
button1Len
]
=
'\0'
;
bsData
.
Read
(
button2Len
)
;
bsData
.
Read
(
button2
,
button2Len
)
;
button2
[
button2Len
]
=
'\0'
;
bsData
.
Write
(
0
)
;
bsData
.
Read
(
text
)
;
text
[
0
]
=
'\0'
;
stringCompressor
->
DecodeString
(
text
,
4096
,
&
bsData
)
;
addMessageToChatWindow
(
"Decoded: %s "
,
text
)
;
}
|
|
|