Code: [Select all] [Download] GeSHi © Codebox Plus

Gdip_CreateBitmapFromClipboard()

{

if !DllCall("OpenClipboard", Ptr, 0)

return -1

if !DllCall("IsClipboardFormatAvailable", "uint", 8)

return -2

should be this:

Code: [Select all] [Download] GeSHi © Codebox Plus

Gdip_CreateBitmapFromClipboard()

{

if !DllCall("IsClipboardFormatAvailable", "uint", 8)

return -2

if !DllCall("OpenClipboard", Ptr, 0)

return -1

A workaround is:

Code: [Select all] [Download] GeSHi © Codebox Plus

pBitmap := Gdip_CreateBitmapFromClipboard()

if (pBitmap = -2)

DllCall("CloseClipboard")

Otherwise you risk the clipboard being made unavailable, as happened to me. Cheers.