Code: Select all

```
Gdip_CreateBitmapFromClipboard()
{
if !DllCall("OpenClipboard", Ptr, 0)
return -1
if !DllCall("IsClipboardFormatAvailable", "uint", 8)
return -2
```

Code: Select all

```
Gdip_CreateBitmapFromClipboard()
{
if !DllCall("IsClipboardFormatAvailable", "uint", 8)
return -2
if !DllCall("OpenClipboard", Ptr, 0)
return -1
```

Code: Select all

```
pBitmap := Gdip_CreateBitmapFromClipboard()
if (pBitmap = -2)
DllCall("CloseClipboard")
```