I have nothing to say about your injection code, .. but you dll code has the following problem IMHO:

printf tries to output into the console window, but TextPad has no consol, so this output is just waisted