CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > Managed C++ and C++/CLI
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Managed C++ and C++/CLI Discuss Managed C++ and .NET-specific questions related to C++.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old August 2nd, 2005, 10:58 AM
    BrucePataki BrucePataki is offline
    Junior Member
     
    Join Date: Jul 2005
    Posts: 9
    BrucePataki is an unknown quantity at this point (<10)
    Exclamation Access violation reading location

    I am creating an MFC application with activeX document server support. The application runs perfectly

    fine when i run as a standalone application. But when i run the application in Internet explorer,
    it opens however opening a form from the top menubar, it gives an error "access violation reading

    location" having error code 0xC0000005 (Running in standalone mode does not give this error).

    I have used global pointers to the objects I need.
    In application class, i have declared a object as

    TestClass* tm; //tm is a global pointer to TestClass

    In application class, InitInstance() function i initialize the pointer as

    tm = new TestClass();

    AND i call the following code on Menu click as

    {
    tm->doModal();
    }

    I get the access violation error when i call DoModal().
    I have to use tm as a global pointer to TestClass since using
    local pointer has not worked. If you have any workaround, please help.

    Thanks.

    Bruce
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > Managed C++ and C++/CLI


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 08:03 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009