Convert System.IntPtr To System.Runtime.InteropServices.HandleRef
Working on an external ESP hack for BO2 in C#
But ehh I'm getting this error message:
This is ma code:
("handle" is the red marked wrong code)
This is ma DLLImport:
I ned halp ples I beg u 

But ehh I'm getting this error message:
Code:
Argument 1: cannot convert from 'System.IntPtr' to 'System.Runtime.InteropServices.HandleRef'
Code:
GetWindowRect(handle, out rect);
This is ma DLLImport:
Code:
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetWindowRect(HandleRef hWnd, out RECT lpRect);


