#603 wrong InterlockedCompareExchange definition

WSL
closed
nobody
None
rejected
Invalid
2013-01-25
2004-07-09
No

In the MSDN it says:

LONG InterlockedCompareExchange(
LONG volatile* Destination,
LONG Exchange,
LONG Comperand
);

But in the winbase.h of MSVC6 it is:

PVOID
WINAPI
InterlockedCompareExchange (
PVOID *Destination,
PVOID Exchange,
PVOID Comperand
);

and

WINBASEAPI
PVOID
WINAPI
InterlockedCompareExchange (
PVOID *Destination,
PVOID Exchange,
PVOID Comperand
);

It works fine casting the long pointers to void
pointers, if you call the function.

Discussion

  • Oliver Stöneberg

    Logged In: YES
    user_id=591019

    Note to myself:

    if( _MSC_VER > 1200 )
    use long vars and Destination is "volatile"
    else
    use void vars

    Patch will be posted on monday.

     
  • Dimitri Papadopoulos

    • status: open --> closed-rejected
     
  • Dimitri Papadopoulos

    Logged In: YES
    user_id=52414

    Mmmh... Maybe MSVC6 is wrong! Have you tried a recent SDK
    instead?

    If you can reproduce the problem with recent a SDK, then I
    would recommend asking Microsoft to fix the MSDN
    documentation. I've tried that and they answer rapidly when
    you submit a comment from an MSDN page. Then reopen this
    issue, either with a pointer to the new MSDN documentation,
    or with the reply you got from Microsoft.

     
  • Earnie Boyd

    Earnie Boyd - 2013-01-25
    • status: closed-rejected --> closed
    • resolution: --> rejected
    • category: --> Invalid
    • milestone: --> WSL
     
  • Earnie Boyd

    Earnie Boyd - 2013-01-25
    • labels: w32api (deprecated use WSL) -->
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks