October 3rd, 2012, 03: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 10:19 PM.
October 9th, 2012, 12:21 PM
Re: System.AccessViolationException when launching MS Project in German Win7 OS
Have you taken a look at this?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Click Here to Expand Forum to Full Width