As the title says i am getting this error when trying to do the following...
DWORD nWritten = 0;
::WriteProcessMemory(GetCurrentProcess(), hookTarget, hookBytes, HLength, &nWritten);
Console::WriteLine(nWritten.ToInt32);
You just need to cast the DWORD
:
System::Console::WriteLine((System::Int32)nWritten);
Here DWORD
is native, but you were trying to use a managed method on that, which won't work.