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 5931887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:45:29+00:00 2026-05-22T14:45:29+00:00

Say a C program might trigger an exception of opcode 0xCC How can I

  • 0

Say a C program might trigger an exception of opcode 0xCC
How can I catch it?

I tried:

__try   
    {

  ...some code

    }

__except(GetExceptionCode()==EXCEPTION_EXECUTE_HANDLER)     
{ 
     _tprintf(_T("Error\n"),i);

      return 0;
}

This is not working for me. What am I doing wrong?
Thanks!

  • 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-05-22T14:45:29+00:00Added an answer on May 22, 2026 at 2:45 pm

    You’re not checking for the right exception code.

    int 3 throws EXCEPTION_SINGLE_STEP.

    You handle it this way :

    __try 
    {
        // some code that might cause an int3
    }
    __except(GetExceptionCode() == EXCEPTION_SINGLE_STEP ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) 
    {
        // error handling of int3
    }
    

    EDIT: Please note that a code running with a debugger attached will not see the exception, because the debugger handles it and clears it before passing the hand back to the code.

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

Sidebar

Related Questions

I'm attempting to display some text in my program using (say) Windows GDI and
I'm attempting to display some text in my program using (say) Windows GDI and
How to design a C/C++ program so that it can save some data after
How might I create a C# program to decide how, say, sad a person
When say 3 programs (executables) are loaded into memory the layout might look something
Let's say my program is always passed a string of characters that represents a
I am talking about windows GUI programs. Say a program-window has a dialog box
Say I have a C program which is broken to a set of *.c
Say I make a program that keeps track of the days I worked and
Say I launch a program from the program I make. Is it possible 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.