コード例 #1
0
        public void ChatAppendChar(int addr, byte b)
        {
            byte[] keyStrokeBytes = BitConverter.GetBytes((uint)b);
            MemFunctions.MemWriteBytes(_client.Handle, addr + 2, keyStrokeBytes);

            //Run the opcode
            IntPtr threadHandle = MemFunctions.CreateRemoteThread(_client.Handle, _appendCharOpcodeAddress);

            //Wait for opcode to be done
            MemFunctions.WaitForSingleObject(threadHandle);
            //Close the thread
            MemFunctions.CloseProcess(threadHandle);
        }
コード例 #2
0
        private void SetChatText(string str)
        {
            if (_setChatTextOpcodeAddress == 0)
            {
                LoadSetChatTextOpcode();
            }
            UpdateSetChatTextOpcode(str);

            //Run the opcode
            IntPtr threadHandle = MemFunctions.CreateRemoteThread(_client.Handle, _setChatTextOpcodeAddress);

            //Wait for opcode to be done
            MemFunctions.WaitForSingleObject(threadHandle);
            //Close the thread
            MemFunctions.CloseProcess(threadHandle);
        }
コード例 #3
0
        private void SendChat()
        {
            // If opcode has already been loaded into client memory, don't load it again.
            if (_sendChatOpcodeAddress == 0)
            {
                LoadSendChatOpcode();
            }

            //Run the opcode
            IntPtr threadHandle = MemFunctions.CreateRemoteThread(_client.Handle, _sendChatOpcodeAddress);

            //Wait for opcode to be done
            MemFunctions.WaitForSingleObject(threadHandle);
            //Close the thread
            MemFunctions.CloseProcess(threadHandle);
        }