shetlandbob
Programmer
Hello,
Ok this is a complete shot in the dark to see if anyone can assist?
First I am running someone else's code, he left the work last week!!
I've got a project which comiles and executes (debug and release) on the development machine, however when I copy it to another machine, which will be the main machine to execute it, the project fails.
I have copied across all librarys and "ocx" files (i also had to install many other development programs and they all work fine).
I even went as far as installing a version of Visual Studio.Net on the main machine. The project still fails to execute in debug or release.
I get as assertion error in file "occmgr.cpp". the line it fails on is:
The line it fails on in my host code is during the initInstance routine, shown below - the line in red is the one it fails on.
I also get the following in the debug window:
I have registered (all that it will allow) all dll's.
Does anyone have an ideas/suggestions/good luck messages that might give me some inspiration???
Much appreciated if you do!!!
Ok this is a complete shot in the dark to see if anyone can assist?
First I am running someone else's code, he left the work last week!!
I've got a project which comiles and executes (debug and release) on the development machine, however when I copy it to another machine, which will be the main machine to execute it, the project fails.
I have copied across all librarys and "ocx" files (i also had to install many other development programs and they all work fine).
I even went as far as installing a version of Visual Studio.Net on the main machine. The project still fails to execute in debug or release.
I get as assertion error in file "occmgr.cpp". the line it fails on is:
Code:
ASSERT(pTemp->m_hWnd);
Code:
BOOL CDAQMANApp::InitInstance()
{
[green]// Initialize OLE libraries[/green]
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
AfxEnableControlContainer();
[green]// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
[/green]
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
[green]//********* MUST BE IN ALL COM CLIENTS *********[/green]
CoInitialize(NULL);
[green]// Parse the command line to see if launched as OLE server[/green]
if (RunEmbedded() || RunAutomated())
{
[green]// Register all OLE server (factories) as running. This enables the
// OLE libraries to create objects from other applications.[/green]
COleTemplateServer::RegisterAll();
}
else
{
[green]// When a server application is launched stand-alone, it is a good idea
// to update the system registry in case it has been damaged.[/green]
COleObjectFactory::UpdateRegistryAll();
}
[green]//SetPriorityClass(this, REALTIME_PRIORITY_CLASS);[/green]
CDAQMANDlg dlg(NULL);
m_pMainWnd = &dlg;
[red]int nResponse = dlg.DoModal();[/red]
if (nResponse == IDOK)
{
[green]// TODO: Place code here to handle when the dialog is
// dismissed with OK[/green]
}
else if (nResponse == IDCANCEL)
{
[green]// TODO: Place code here to handle when the dialog is
// dismissed with Cancel[/green]
}
[green]// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.[/green]
return FALSE;
}
I also get the following in the debug window:
Code:
'DAQMAN.exe': Unloaded 'C:\WINNT\SYSTEM32\MSIMG32.DLL'
CoCreateInstance of OLE control {DC4020D7-462B-4296-97DB-F5E306BA4CA5} failed.
>>> Result code: 0x80040154
>>> Is the control is properly registered?
Unhandled exception at 0x7c1a9b1e (mfc71d.dll) in DAQMAN.exe: User breakpoint.
The program '[2228] DAQMAN.exe: Native' has exited with code 0 (0x0).
I have registered (all that it will allow) all dll's.
Does anyone have an ideas/suggestions/good luck messages that might give me some inspiration???
Much appreciated if you do!!!