October 3rd, 2012, 04:07 AM
System.AccessViolationException when launching MS Project in German Win7 OS
I have an application to launch MS Project application. The following piece of code is written to launch MS Project
Dim prjApp As MSProject.Application = Nothing
Dim iCount As Integer = 1
Dim strException As String = String.Empty
While iCount <= 10
prjApp = New MSProject.Application ' Exception is thrown is here
frmStart.WriteLog("modProject.vb: CreateProjectFile -> MS Project created in " & iCount.ToString() & " attempt")
Catch ex As Exception
strException = ex.ToString()
iCount += 1
If prjApp Is Nothing Then
frmStart.WriteLog("modProject.vb: CreateProjectFile -> Exit - Exception: " & strException)
MessageBox.Show("Exception while opening MS Project is: " + strException, "Error while opening MS Project", MessageBoxButtons.OK, MessageBoxIcon.Error)
The above piece of code works well in XP system(English and German) and Win7 English. But there is an exception on Win 7 German system. The exception is as follows:
Exception: System.AccessViolationException: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
An attempt was made to read or write protected memory. This is often an indication that other memory is corrupt.
Exception is thrown at the following line;
prjApp = New MSProject.Application
We have same installation and IT policies for German and English locations.
Please some help me in solving this issue.
Has any one encountered this type of issue.
Last edited by zuhrs; October 4th, 2012 at 11:19 PM.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!