I'm using madCodeHook to inject into processes and send messages back to my front end. When the messages are all text or one number it's fine, but if I want to combine them (like "Injected into hWnd:" + hWnd) then the only way I know to do it is create a stringstream, run << on all the data I want, create a char array buffer to run stringstream::read on, and then send the buffer to the IpcSendMessage function.
Now, if that sounds like the best way to do it, here's the main question. (if not, i'd love your ideas)
What I'm shooting for is a class that will handle all this for me. If I could imitate the stream classes (such as std::cout<<"asdf"<<123<<".";) then I could create a class that would compile all the data into a stringstream, create the buffer inside the overloaded << operator and send off the message.
I do not know the syntax or if this is even possible.
Ideas, suggestions, constructive criticism are welcome.
Thanks