D
DapperDanH
I have a unexplainable but easily replicable problem.
I am developing a C# MSProject 2003 addin using the PIA.
In the OnStartupComplete method, I am subscribing to the following MSProject
application events:
applicationObject.ProjectBeforeTaskChange+=new
MSP._EProjectApp2_ProjectBeforeTaskChangeEventHandler(mspApp_ProjectBeforeTaskChange);
applicationObject.ProjectBeforeTaskNew+=new
MSP._EProjectApp2_ProjectBeforeTaskNewEventHandler(mspApp_ProjectBeforeTaskNew);
applicationObject.ProjectBeforeResourceChange+=new
MSP._EProjectApp2_ProjectBeforeResourceChangeEventHandler(mspApp_ProjectBeforeResourceChange);
applicationObject.ProjectBeforeResourceNew+=new
MSP._EProjectApp2_ProjectBeforeResourceNewEventHandler(mspApp_ProjectBeforeResourceNew);
applicationObject.NewProject +=new
MSP._EProjectApp2_NewProjectEventHandler(mspApp_NewProject);
applicationObject.ProjectAssignmentNew+=new
MSP._EProjectApp2_ProjectAssignmentNewEventHandler(mspApp_ProjectAssignmentNew);
applicationObject.ProjectBeforeAssignmentChange+=new
MSP._EProjectApp2_ProjectBeforeAssignmentChangeEventHandler(mspApp_ProjectBeforeAssignmentChange);
The addin compiles and works great.
The issue is with other applications that run outside of MSProject and try
to instantiate MSProject like:
mspApp = new MSP.Application();
This code will fail. If i remove the code in my Addin that subscribes to
the events, it works. Even stranger is that outside apps that use
Process.Start("winproj.exe"); fail as well.
This is very easy to replicate. Anyone help?
Thanks,
Dan
I am developing a C# MSProject 2003 addin using the PIA.
In the OnStartupComplete method, I am subscribing to the following MSProject
application events:
applicationObject.ProjectBeforeTaskChange+=new
MSP._EProjectApp2_ProjectBeforeTaskChangeEventHandler(mspApp_ProjectBeforeTaskChange);
applicationObject.ProjectBeforeTaskNew+=new
MSP._EProjectApp2_ProjectBeforeTaskNewEventHandler(mspApp_ProjectBeforeTaskNew);
applicationObject.ProjectBeforeResourceChange+=new
MSP._EProjectApp2_ProjectBeforeResourceChangeEventHandler(mspApp_ProjectBeforeResourceChange);
applicationObject.ProjectBeforeResourceNew+=new
MSP._EProjectApp2_ProjectBeforeResourceNewEventHandler(mspApp_ProjectBeforeResourceNew);
applicationObject.NewProject +=new
MSP._EProjectApp2_NewProjectEventHandler(mspApp_NewProject);
applicationObject.ProjectAssignmentNew+=new
MSP._EProjectApp2_ProjectAssignmentNewEventHandler(mspApp_ProjectAssignmentNew);
applicationObject.ProjectBeforeAssignmentChange+=new
MSP._EProjectApp2_ProjectBeforeAssignmentChangeEventHandler(mspApp_ProjectBeforeAssignmentChange);
The addin compiles and works great.
The issue is with other applications that run outside of MSProject and try
to instantiate MSProject like:
mspApp = new MSP.Application();
This code will fail. If i remove the code in my Addin that subscribes to
the events, it works. Even stranger is that outside apps that use
Process.Start("winproj.exe"); fail as well.
This is very easy to replicate. Anyone help?
Thanks,
Dan