From my reading i understand that the best to use is the "Ptr", because it covers all the rest ("UPtr" and "Int" and "Uint")
For example purposes, lets consider the following function:
Code: Select all
ImageToClipboard(Filename)
{
hbm := DllCall("LoadImage","uint",0,"str",Filename,"uint",0,"int",0,"int",0,"uint",0x10)
if !hbm
return
DllCall("OpenClipboard","uint",0)
DllCall("EmptyClipboard")
; Place the data on the clipboard. CF_BITMAP=0x2
if !DllCall("SetClipboardData","uint",0x2,"uint",hbm)
DllCall("DeleteObject","uint",hbm)
DllCall("CloseClipboard")
}
Now, lets focus in the following line in the above code:
Code: Select all
DllCall("DeleteObject","uint",hbm)
This line can be substitute with the following:
Code: Select all
DllCall( "DeleteObject", "Ptr", hbm )