Hacker News new | past | comments | ask | show | jobs | submit login

Why was SetWindowLong (taking LONG) superseded by SetWindowLongPtr (taking LONG_PTR) on 64-bit versions of Windows?



Because SetWindowLong can be used to set a callback function, i.e. a 64-bit pointer - but LONG remains 32 bit on 64-bit Windows. Backward compatibility stipulated the need for a new function name




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: