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

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Posts
    68

    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
    MessageFilter.Register()
    While iCount <= 10
    Try
    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()
    System.Threading.Thread.Sleep(2000)
    iCount += 1
    End Try
    End While
    MessageFilter.Revoke()

    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
    Join Date
    May 2002
    Posts
    10,943

    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
  •  





Click Here to Expand Forum to Full Width

Featured