You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.
The issue is the function BitBlt wants IntPtr as input while the functions GetWindowDC and CreateCompatibleDC both return a SafeDCHandle.
Is there an overload for GetWindowDC and CreateCompatibleDC that return an IntPtr instead? Or can I make BitBlt to somehow accept the SafeDCHandles?
Before using this package I would use the code below. But this package sound really great. Safes a lot of time defining all the windows library functions you want to use.
[DllImport("gdi32.dll")]
public static extern IntPtr CreateCompatibleDC(IntPtr hdc);
The text was updated successfully, but these errors were encountered:
I suspect BitBlt should take SafeDCHandle as well. I'll send a PR to do this.
In the meantime you can always get the IntPtr from a SafeHandle using DangerousGetHandle(). Check the documentation on SafeHandle to learn how to use it safely for this.
I was wondering if I was missing some overload functions or I'm implementing this wrong.
Will first post the relevant code:
The issue is the function BitBlt wants IntPtr as input while the functions GetWindowDC and CreateCompatibleDC both return a SafeDCHandle.
Is there an overload for GetWindowDC and CreateCompatibleDC that return an IntPtr instead? Or can I make BitBlt to somehow accept the SafeDCHandles?
Before using this package I would use the code below. But this package sound really great. Safes a lot of time defining all the windows library functions you want to use.
The text was updated successfully, but these errors were encountered: