| 407 | |
| 408 | |
| 409 | void BuildTextMessage(uint64_t* ptr, const std::string& text, const std::string& wxid) |
| 410 | { |
| 411 | uintptr_t base = GetWeixinDllBase(); |
| 412 | |
| 413 | // 对齐原始布局 |
| 414 | ptr[0] = base + offset::txt_message_vtbl; |
| 415 | ptr[1] = 0x200000005LL; |
| 416 | |
| 417 | |
| 418 | WeixinCall init_text_st = (WeixinCall)(base + offset::txt_message_ctr); |
| 419 | |
| 420 | TextMessage* msg = reinterpret_cast<TextMessage*>(ptr + 2); |
| 421 | init_text_st(reinterpret_cast<uint64_t>(msg)); |
| 422 | |
| 423 | SetWeixinString(&msg->receiver, wxid); |
| 424 | SetWeixinString(&msg->content, text); |
| 425 | msg->msg_len = text.length(); |
| 426 | msg->type = 1; |
| 427 | } |
| 428 | |
| 429 | void BuildSendParam2_Text(uint64_t* a1) |
| 430 | { |
no test coverage detected