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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:09:09+00:00 2026-06-09T13:09:09+00:00

I need to translate structured exceptions manually, using the current translator. How do I

  • 0

I need to translate structured exceptions manually, using the current translator.

How do I ‘get’ the value someone has set by _set_se_translator?

  • 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-09T13:09:11+00:00Added an answer on June 9, 2026 at 1:09 pm

    Better (new) way

    I didn’t realize this at first, but the SE translator is thread-local, not process-wide.

    So this is actually the best (and easiest) solution:

    _se_translator_function _get_se_translator(void) {
        _se_translator_function translator = _set_se_translator(NULL);  // temporary
        _set_se_translator(translator);  // Restore the old value
        return translator;
    }
    

    Hacky (old) way

    There is no direct way to do this, but if you’re going to risk some incompatibility and delve into the Visual C runtime’s internals, you can hack up a solution like this:

    _se_translator_function __cdecl _get_se_translator(void) {
        unsigned char const *p = (unsigned char const *)(&__uncaught_exception);
        struct _tiddata {
            unsigned long _tid;
            void *_thandle;
            int _terrno; unsigned long _tdoserrno;
            unsigned int _fpds;
            unsigned long _holdrand;
            char *_token; wchar_t *_wtoken;
            unsigned char *_mtoken;
            char *_errmsg; wchar_t *_werrmsg;
            char *_namebuf0; wchar_t *_wnamebuf0;
            char *_namebuf1; wchar_t *_wnamebuf1;
            char *_asctimebuf; wchar_t *_wasctimebuf;
            void *_gmtimebuf;
            char *_cvtbuf;
            unsigned char _con_ch_buf[5];
            unsigned short _ch_buf_used;
            void *_initaddr; void *_initarg;
            void *_pxcptacttab;
            void *_tpxcptinfoptrs;
            int _tfpecode;
            void *ptmbcinfo; void *ptlocinfo;
            int _ownlocale;
            unsigned long _NLG_dwCode;
            void *_terminate; void *_unexpected;
            _se_translator_function _translator;
        };
        if (p[0] == 0x48) /* sub RSP, 0x28 */ { p += 4; }  // x64 only
        if (p[0] == 0xE8) /* call _getpid */ { ++p; }  // must be true
        void const *_getptd = p + *(long *)p + sizeof(long);
        return ((struct _tiddata *(__cdecl *)(void))_getptd)()->_translator;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to translate a value in the range 1-320 to it's equivalent value
I need to translate what is commented within the method, to assembler. I have
I need to translate the a carbon method into cocoa into and I am
We need to translate some of our UI to English, and the question arises:
I have this link which i need to translate in a php variable. http://www.facebook.com/dialog/apprequests?app_id=346824075388300&to=1149862205&message=Facebook+Dialogs+are+so+easy%21&redirect_uri=http%3A%2F%2Fpenelope-ns.net%2Ffb%2F
I have a task where I need to translate a DataTable to a two-dimensional
I need your help to translate a query into pyes. This query is working
I have a OCaml library with lots of classes I need some translator to
I need to translate a piece of C code into Delphi/Pascal code, however I'm
I need to translate this C code to MIPS assembly. Here is the C

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.