Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8629843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:54:41+00:00 2026-06-12T08:54:41+00:00

in my MFC SDI application, i’m trying to override CDocument::DoSave to save my document.

  • 0

in my MFC SDI application, i’m trying to override CDocument::DoSave to save my document. I’m using a third part component (TxTextControl) to build a text control. When i save the document, the file is created, but after about one minute my app crashes rising read access error 0xFEEEFEEE, in ole32.dll.
This is my code, txtCtrl is my component:

BOOL CEditorTxDoc::DoSave(LPCTSTR lpszPathName, BOOL bReplace)
{
CString path, nome;
VARIANT vt1, vt2, vt3;
POSITION pos = GetFirstViewPosition();
CEditorTxView *pView = (CEditorTxView*)this->GetNextView(pos);

VariantInit(&vt1);
vt1.vt = VT_INT;
vt1.intVal = -1;
VariantInit(&vt2);
vt2.vt = VT_INT;
vt2.intVal = 3;
VariantInit(&vt3);
vt3.vt = VT_BOOL;
vt3.boolVal = FALSE;

if (lpszPathName == NULL) {
    CFileDialog fSaveDlg(FALSE);

    fSaveDlg.m_pOFN->lpstrFilter = _T("File Tx (*.tx)");
    fSaveDlg.m_pOFN->lpstrDefExt = _T("tx");
    fSaveDlg.m_pOFN->lpstrTitle = _T("Salva documento");
    fSaveDlg.m_pOFN->lpstrInitialDir = _T("c:");

    if(fSaveDlg.DoModal()==IDOK)
    {
        path = fSaveDlg.GetPathName();
        nome = fSaveDlg.GetFileName();

        pView->txtCtrl.Save(path, vt1, vt2, vt3);
        SetTitle(nome);
        SetModifiedFlag(FALSE);
        SetPathName(path);
    }
} else {
        pView->txtCtrl.Save(GetPathName(), vt1, vt2, vt3);
        SetModifiedFlag(FALSE);
}

return TRUE;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:54:42+00:00Added an answer on June 12, 2026 at 8:54 am

    Magic debug values:

    FEEEFEEE Used by Microsoft’s HeapFree() to mark freed heap memory

    That is, the problem comes up from the fact that the code deals with released memory as if it is still alive. To isolate the issue to specific code fragment, debug and use call stack information at the time of exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Single Document Interface (SDI) or Multiple Document Interface (MDI) MFC application, I created
I have an SDI application written in MFC. The frame is divided into 1
In a MFC SDI application containing a single CView , I pass the output
I have an MFC application that uses an ancient (circa 1999) third-party ActiveX control.
I am working on MFC SDI application, in which I include one C++ generic
I have created a MFC SDI application in Visual Studio 2010 and want to
When the user creates a new document in my SDI-application, I need to present
I have created a MFC SDI application, and the view is derived from CFormView,
I have to make changes to an existing Application developed using MFC. this application
I have a SDI MFC application which CMainFrame class is derived from CFrameWndEx. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.