setwindowlong

How do I pinvoke to GetWindowLongPtr and SetWindowLongPtr on 32-bit platforms?

最后都变了- 提交于 2019-11-26 06:47:49
问题 I want to P/Invoke to GetWindowLongPtr and SetWindowLongPtr, and I\'m seeing conflicting information about them. Some sources say that, on 32-bit platforms, GetWindowLongPtr is just a preprocessor macro that calls GetWindowLong, and GetWindowLongPtr doesn\'t exist as an entry point in user32.dll. For example: The pinvoke.net entry for SetWindowLongPtr has a static method that checks IntPtr.Size and then calls either SetWindowLong or SetWindowLongPtr, with a comment saying that \"legacy OSes