I'm confused.
Here's the definition of InterlockedCompareExchange from my installation of
VC6, in file
whatever\VC98\Include\WINBASE.h
WINBASEAPI
PVOID
WINAPI
InterlockedCompareExchange (
PVOID *Destination,
PVOID Exchange,
PVOID Comperand
);
This matches the parameter types, and builds just fine. So the question is,
is there some other definition of InterlockedCompareExchange floating
around, and if so, when and where, and how can we avoid picking it up? I
couldn't find any other.
There's another problem too. The call to InterlockedComparExchange should
not be used, but we should be building the inline assembly code instead.
There's some problem with the DEVENV_VCPP setting, which I'll look into.
The main reason for avoiding InterlockedCompareExchange is that it does not
exist on Windows 95, but only on Win 98 and NT or better. The assembly code
relies on a 486 or better processor. Blowing off 386 processors is a safer
bet than blowing off Win 95.
----- Original Message -----
From: Abhijit Savarkar <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 19, 2000 11:54 PM
Subject: Xerces-C-src_1_0_1 win32 build error
> Hello,
>
> I am new to apache XML parser and have downloaded source code from xml
> apache site
>
> When I try to build the same on my Win NT4.0 VC6.0 it gives following
error
>
> xerces-c-src_1_0_1\src\util\platforms\win32\win32platformutils.cpp(630) :
> error C2664: 'InterlockedCompareExchange' : cannot convert parameter 1
from
> 'void ** ' to 'long *'
>
> The code segment it refers to is
>
> <function name>
>
> // Miscellaneous synchronization methods
> // ---------------------------------------------------
> void*
> XMLPlatformUtils::compareAndSwap( void** toFill
> , const void* const newValue
> , const void* const toCompare)
>
> <affected lines>
>
> //
> // Note we have to cast off the constness of some of these because
> // the system APIs are not C++ aware in all cases.
> //
> return (void*)::InterlockedCompareExchange
> (
> toFill
> , (void*)newValue
> , (void*)toCompare
> )
>
>