You're getting the address of ntdll.dll!LdrLoadDll in the address space of the local process. You need the address in the address space of the remote process.
You need to run GetProcAddress() from the remote process and somehow send the address to the local process. I'm not aware of a way to obtain the addresses of modules loaded from another process, though it may be possible.
The program that I'm trying to writeprocessmemory to seems to block it. Thinking with a kernel driver or something.
I have no idea how to prevent this. Any help would be great.
Pm me if you don't want anyone to see or what ever. Willing to help out anyone that helps me out.
You could inject a DLL into the process and send the address over a pipe. If you're going that route, though, it's easier to do the writing from the injected DLL and skip the pipe and WriteProcessMemory() altogether.