-
August 16th, 2006, 12:08 PM
#1
Why would CreateObject() fail
and give me "Fail to create empty document" message?
-
August 16th, 2006, 12:56 PM
#2
Re: Why would CreateObject() fail
Debug your App, step in in the code to see what could be the cause and where (in which module).
-
August 16th, 2006, 12:59 PM
#3
Re: Why would CreateObject() fail
I did and after stepping into the function of ProcessShellCommand(cmdInfo) it is failing inside the function CreateObject.
Code:
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
{
pSystemLog->LogMessage("Failure in ProcessShellCommand dispatch for command line arguments.",LOG_LEVEL_ERROR);
return FALSE;
}
Code:
CObject* CRuntimeClass::CreateObject()
{
if (m_pfnCreateObject == NULL)
{
TRACE(traceAppMsg, 0,
_T("Error: Trying to create object which is not ")
_T("DECLARE_DYNCREATE \nor DECLARE_SERIAL: %hs.\n"),
m_lpszClassName);
return NULL;
}
CObject* pObject = NULL;
TRY
{
pObject = (*m_pfnCreateObject)();
}
END_TRY
return pObject;
}
All of this is causing the application to get an error message "Failed to create empty document"
-
August 16th, 2006, 10:42 PM
#4
Re: Why would CreateObject() fail
Have you modified something/anything in the Doc,View or the frame class ??
Can you post the project here ?
Regards,
Ramkrishna Pawar
-
April 16th, 2007, 02:12 PM
#5
Re: Why would CreateObject() fail
Hello
I know this is too old to help but for future reference:
When I get a fail to create it is usually because I have deleted something
from a dialog without deleting the associated variable .
Unlike your example I usually get an nID error inside the MS assert codes
which will point to something in the rc file. Any references to the number and to the associated pneumonic (ID_Button) have to be removed.
Best Regards
"trampling out the vintage"
-
April 16th, 2007, 02:15 PM
#6
Re: Why would CreateObject() fail
Originally Posted by JohnDavidHanna
Hello
I know this is too old to help but for future reference:
When I get a fail to create it is usually because I have deleted something
from a dialog without deleting the associated variable .
Unlike your example I usually get an nID error inside the MS assert codes
which will point to something in the rc file. Any references to the number and to the associated pneumonic (ID_Button) have to be removed.
Best Regards
That pretty clearly isn't the case here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|