CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Threaded View

  1. #6
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,867

    Re: What's going on with InterlockedAnd ???

    Thanks guys. I changed my code to look like this:-

    Code:
    #include <windows.h>
    
    int main (int argc, char *argv[])
    {
    LONG x=0, y=2, z=3;
    
    	x = InterlockedExchangeAdd (&y, z);
    	x = _InterlockedAnd (&y, 4);
    
    	return 0;
    }
    But essentially I still get the same error:-

    HelloWorld.cpp(12) : error C3861: '_InterlockedAnd': identifier not found
    I've even stripped out all preprocessor directives except for these - but the error still persists:-

    Code:
    WIN32
    _WIN32
    _WINDOWS
    _MBCS
    _DEBUG
    DEBUG
    [Edit...] Sorry, I missed out the #pragma. It now works after adding that
    Last edited by John E; December 2nd, 2012 at 04:38 AM.
    "A problem well stated is a problem half solved.” - Charles F. Kettering

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured