0xC0000005: Access violation at location 0x00000000f41b1a6e on calling SetWindowPos
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: 0xC0000005: Access violation at location 0x00000000f41b1a6e on calling SetWindowPos

  1. #1
    Join Date
    Jan 2013
    Posts
    1

    0xC0000005: Access violation at location 0x00000000f41b1a6e on calling SetWindowPos

    I am migrating my WIN32 application to WIN64 application. I have compiled the code for x64 platform. While running this application in debug mode I am getting the error message as
    "First-chance exception at 0xf41b1a6e in xxx.exe: 0xC0000005: Access violation at location 0x00000000f41b1a6e."
    This exception occurs when I execute below code.
    SetWindowPos (lpI->hTop, NULL, 0, 0, cx, cy, SWP_NOZORDER | SWP_NOACTIVATE);

    Please help me to resolve this issue.

    Thanks
    Sayaji

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    5,977

    Re: 0xC0000005: Access violation at location 0x00000000f41b1a6e on calling SetWindow

    I wonder, what kind of help could be provided here. Do you really need an advice like this: Press Retry button and inspect the structure behind lpI pointer? And then understand from the other code who and when puts there the problem value?
    Last edited by Igor Vartanov; January 1st, 2013 at 05:21 AM.
    Best regards,
    Igor

  3. #3
    Join Date
    Apr 1999
    Posts
    27,427

    Re: 0xC0000005: Access violation at location 0x00000000f41b1a6e on calling SetWindow

    Quote Originally Posted by sayajirao View Post
    Please help me to resolve this issue.
    As Igor mentioned, why not debug the application?

    How do we (or you) know if lpI is pointing to a valid window? We don't know, but you should know by debugging your application and seeing what's there.

    Regards,

    Paul McKenzie

  4. #4
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,023

    Re: 0xC0000005: Access violation at location 0x00000000f41b1a6e on calling SetWindow

    Are you sure that "lpI->hTop" doesn't need to point to 0x00000000f41b1a6f?
    Now seriously, what lpI->hTop is supposed to be?
    Last edited by ovidiucucu; January 3rd, 2013 at 03:03 PM.
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center