I have an application that can be run several times at the same time on Windows.
In this application, we first call GlobalAllocPtr () to allocate memory, as shown below:
LPSlcDataMgr lpMgr = (LPSlcDataMgr)GlobalAllocPtr(GHND, sizeof(TSlcDataMgr));
We tested on two machines (both XP professional 2002, one SP2, the other SP3), but in SP3 our applications will crash randomly
After the study, we found:
- in SP3, it
GlobalAllocPtr()always returns the same address for different application processes. - but on SP2 this is normal, it returns a different address for each process.
Is it possible that GlobalAllocPtr()the same address on WinXP SP3 returns a direct or indirect cause of our failure?
Thanks in advance.
source
share