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

  • SEARCH
  • Home
  • 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 7615221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:35:31+00:00 2026-05-31T02:35:31+00:00

I wanted to write a unicode version of std::exception and std::runtime_error. So I thought

  • 0

I wanted to write a unicode version of std::exception and std::runtime_error.
So I thought what better way then to just take implementations from the C++ Standard Library and alter them to support unicode.

So I pulled up the exception and stdexcept headers in Visual C++, copied the code, made my changes.

The thing is I couldn’t get it to link unless I removed the _CRTIMP_PURE.
I also removed the _EXCEPTION_INLINE __CLR_OR_THIS_CALL prefix from all the member functions.

It’s working but I’m very curious what all those things did.
_EXCEPTION_INLINE it literally defined right above it as #define _EXCEPTION_INLINE, and my googling skills can’t find any documentation on what they do.

So, does anyone know what these are meant to do? And why it wound’t link until I removed the _CRTIMP_PURE prefix from the class?

  • 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-31T02:35:32+00:00Added an answer on May 31, 2026 at 2:35 am

    These aren’t really anything mysterious (but it might be a bit pf a pain to track down where they’re defined – but only a little). They’re defined in headers that are part of the library, and they take on different definitions depending on how the compiler is configured for the current run. In particular, these macros seem to be concerned mostly with whether or not the current run is configured for /clr:pure.

    _CRTIMP_PURE is defined to __declspec(dllimport) if you’re linking against the DLL version of the C runtime (and not building with /clr:pure), and defined to nothing otherwise.

    If your library isn’t a DLL (or if it won’t necessarily be a DLL whenever the DLL runtime is configured), then you shouldn’t use it. You probably shouldn’t use it anyway, because you’d need to define it differently when building your library than when your library is being used (that’s what Microsoft does when they build the C runtime libraries).

    __CLR_OR_THIS_CALL is used by Microsoft’s libraries to declare a function with __clrcall if you’re building with /clr:pure (indicating these functions will only be called by managed code – the compiler can perform certain optimizations in that case it seems).

    Finally, _EXCEPTION_INLINE is used to make the member functions of class exception inline if building with /clr:pure.

    So the bottom line is, don’t use __CLR_OR_THIS_CALL or _EXCEPTION_INLINE unless you plan to support /clr for your library, and you probably shouldn’t use _CRTIMP_PURE in your implementation, but probably should use something similar of your own making and under your own control.

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

Sidebar

Related Questions

Just wanted to write some recursion but can't check if the child is in
I wanted to write a snippet of ruby that would take a string and
I just wanted to write some text on picture (possibly with some simple effects
I wanted to write multiple threads under one class and found one way of
I wanted to write a function that would take an object and convert it
I wanted to write two one-line functions which will trim white spaces from left
I wanted to write a program which writes to multiple files simultaneously; thought it
I wanted to write a code that would delete a given character from a
I wanted to write something basic in assembly under Windows. I'm using NASM, but
I wanted to write a regex to count the number of spaces/tabs/newline in a

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.