Re: What are Win2000 Diferance
- Posted by David Cuny <dcuny at LANSET.COM> Oct 01, 2002
- 417 views
Ron Tarrant wrote: > Which results are you guys talking about? I've never run into this > (at least, if I did, I didn't recognize it). Under Win95, most pointers returned in Win32Lib tended to be low memory addresses. So if you wrote a code like: int myVar myVar = getSomeWin32Pointer() under Win95, it would tend to work, because the addresses returned were small enough that they would fit into an int. It happened to me quite often: I'd test a program under Win95 and it would run fine, but under WinNT, it would crash. The error under WinNT would be attempting to store a large address into an int. That's because WinNT (and WinMe, Win2000 and even Wine under Linux) would tend to hand back pointer addresses that were too large to store in an int. The proper way to code the example would have been to use an atom instead of an int: atom myVar So basically, it was *always* an error to use an int, but because Win95 tended to parcel out lower memory addresses, it was less likely to crash under Win95. -- David Cuny -- David Cuny