locked
Run-Time Check Failure #2 - Stack around the variable 'ps' was corrupted. RRS feed

  • Question

  • I am building my componant code(VC++)  with "x64" configuration option .
     
    When i was running my project ,once it come out from my custom function "StatusBarProcessWmPaint" ,i am getting the error

    "Run-Time Check Failure #2 - Stack around the variable 'ps' was corrupted."
     
    above function consist the following statements.
     
    PAINTSTRUCT ps;HDC hDC(BeginPaint(hwnd, &ps));
     
    Can Please guide me how to resolve the above error ?
     
    Is there any issue while using "PAINTSTRUCT " in x64  configuration,Since i dont face any problem with "Win32"

    configuration option.

    Tuesday, April 3, 2012 3:43 AM