Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7783391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:49:32+00:00 2026-06-01T19:49:32+00:00

I use the following code to access a VSS item: Dim sItem As String

  • 0

I use the following code to access a VSS item:

Dim sItem As String = "$/MyVssProject/InexistentFile.txt"
Dim oItem As SourceSafeTypeLib.VSSItem = Nothing
Try
  oItem = m_oSourceSafe.VSSItem(sItem)
Catch ex As Runtime.InteropServices.COMException
  MsgBox(ex.Message, MsgBoxStyle.Exclamation)
Catch ex As Exception
  MsgBox(ex.Message, MsgBoxStyle.Exclamation)
End Try

The problem I face is when I try to get an instance to a file that doesn’t exist in the VSSDB, thus leading to a COMException, which basically wouldn’t be of a problem (I would expect).
In fact the exception occurs, but instead of proceeding with the catch code, the debug cursor stays on the line “oItem = m_oSourceSafe.VSSItem(sItem)”, showing a dialog with title “COMException crossed a native/managed boundary.

From here the execution doesn’t proceed, until I change the content of sItem to an existing file.

Why does the exception not get caught, and how can I achieve it?

Environment: VS2010 with .Net 2.0 on WinXP SP3 x86

Thanks mates!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:49:34+00:00Added an answer on June 1, 2026 at 7:49 pm

    I found out how to catch:

    In the project’s settings, on the “Debug” tab, select “Enable unmanaged code debugging”. From now on you should be able to chatch the exception.

    The disadvantage of this though is, that it is no longer possible to edit code while stepping through the code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To access a memo on my form,I use the following code public string TextValue
With CLLocationManager I can use the following code to determine if I can access
I've got the following code that I am trying to use to access a
I use the following code try to create an array of string vectors, I
I use the following code to render a template to a string that I
I currently use the following code to retrieve and decompress string data from Amazon
I want to use the following code to access the state of the keyboard
I want to access a model attribute in Javascript. I use the following code:
I use the following code to Invoke and access properties on my from from
I am trying to use the following code to export tables from access to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.