So Im requesting help with hooking and named pipes in plain C language.

I need to hook CreateFile and WriteFile and report via Named pipe to Named Pipe server process (GsControl in my case).
The named pipe server is setup so Im looking only at the client implementation here.
I need to implement it without any 3rd libraries and in plain C.

I think I should go with hooking by IAT and as IPC mechanism using named pipes as it seems easier and is sufficient for my needs, though open to other techniques if you suggest I should.
No need to cover injecting mechanism as GsP is allready loaded at start time into the target process. (here gameserver)

Would like to go step by step and at the end of this thread hopefully have this working.