HelpConvert System.IntPtr To System.Runtime.InteropServices.HandleRef

Posts 1–7 of 7 · Page 1 of 1
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:

Code:
Argument 1: cannot convert from 'System.IntPtr' to 'System.Runtime.InteropServices.HandleRef'
This is ma code:
Code:
GetWindowRect(handle, out rect);
("handle" is the red marked wrong code)
This is ma DLLImport:
Code:
[DllImport("user32.dll")]
    [return: MarshalAs(UnmanagedType.Bool)]
    static extern bool GetWindowRect(HandleRef hWnd, out RECT lpRect);
I ned halp ples I beg u

You forgot to upload attachment.
Quote Originally Posted by Silentalt View Post
You forgot to upload attachment.
Attachment of wat? ;-;
Quote Originally Posted by Recigy View Post
Attachment of wat? ;-;
Didn't read the thread, thought it was a release,

Quote Originally Posted by Recigy View Post
Code:
[DllImport("user32.dll")]
    [return: MarshalAs(UnmanagedType.Bool)]
    static extern bool GetWindowRect(HandleRef hWnd, out RECT lpRect);
should be

Code:
[DllImport("user32.dll")]
    [return: MarshalAs(UnmanagedType.Bool)]
    static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
Simple, no?
Quote Originally Posted by Silentalt View Post
Didn't read the thread, thought it was a release,



should be

Code:
[DllImport("user32.dll")]
    [return: MarshalAs(UnmanagedType.Bool)]
    static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
Simple, no?
No, looks easier than it is
Quote Originally Posted by Recigy View Post
No, looks easier than it is
So is everything resolved?
Quote Originally Posted by Silentalt View Post
So is everything resolved?
No it's not
Have been struggling with this for weeks, I think that I'll just keep the external esp hack on 1 size and that's 1920x1080
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?