CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007

    Question 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")
    Exit While
    Catch ex As Exception
    strException = ex.ToString()
    iCount += 1
    End Try
    End While

    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)
    Exit Sub
    End If

    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.

    Meaning as:
    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.

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.