xtran888
asked on
Function prototype definition
The funciton is defined as:
LONG WINAPI InterlockedCompareExchange (
__inout LONG volatile *Destination,
__in LONG Exchange,
__in LONG Comperand
);
In Visual 6.0, I use it as:
int nRet = (int)::InterlockedCompareE xchange((P VOID*)pI, (PVOID)nNew, (PVOID)nOld);
Compiler has no complain.
In Visual 2005, Compiler complains as such:
1>d:\develop\3.0\commonlib s\base\asm .h(47) : error C2664: 'InterlockedCompareExchang e' : cannot convert parameter 1 from 'PVOID *' to 'volatile LONG *'
What should I do?
Thanks,
XT
LONG WINAPI InterlockedCompareExchange
__inout LONG volatile *Destination,
__in LONG Exchange,
__in LONG Comperand
);
In Visual 6.0, I use it as:
int nRet = (int)::InterlockedCompareE
Compiler has no complain.
In Visual 2005, Compiler complains as such:
1>d:\develop\3.0\commonlib
What should I do?
Thanks,
XT
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.