c - why is this function failing? -
I'm trying to understand the windows hook by writing some keyboard hooks. I have a function:
< Pre> bool WriteToFile (WPARAM keycode, char * fileName) {ofstream fout ("filename"); If (fout.is_open ()) {if (keycode & gt; = 0x030 & key code & lt; 0x039) fout & lt; & Lt; (Keycode - 0x030); Fout.close (); Back true; } And fout.close (); return false; }
... that I try to call from here but it almost always fails. Why?
LRESULT callback KBHackPrak (int nodod, varm usage, LAPRM LPR) {if (nCode> 0) {WriteToFile (WPAMAM, "log.TTT"); // Why this function always fails) and then return the ColonXHackX (H-Content Hook, Encoded, WPAMM, LPAMM); }
I think this is because you want to make the file & ldquo; Trying to open a file called filename & rdquo ;; I think you are writing a keylogger to read it: to go to the end of the file using ios_base
bool WriteToFile (WPARAM keycode, char * fileName) {// Cause Output: App Offline Fount (filename, ios_base:: app); If (fout.is_open ()) {if (keycode & gt; = 0x030 & key code & lt; 0x039) fout & lt; & Lt; (Keycode - 0x030); Fout.close (); Back true; } And fout.close (); return false; }
Comments
Post a Comment