File tree Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -87,26 +87,34 @@ class ContextActivator
8787 memset (&ackd, 0 , sizeof (ackd));
8888 ackd.cbSize = sizeof (ackd);
8989
90- // if CRT already present in some activation context then nothing to do
91- if ((*mFindActCtxSectionString )
92- (0 , NULL ,
93- ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
90+ const char * crtDll =
9491#if _MSC_VER == 1400
95- " msvcr80.dll" ,
92+ " msvcr80.dll" ;
9693#elif _MSC_VER == 1500
97- " msvcr90.dll" ,
94+ " msvcr90.dll" ;
9895#elif _MSC_VER == 1600
99- " msvcr100.dll" ,
96+ " msvcr100.dll" ;
10097#elif _MSC_VER == 1700
101- " msvcr110.dll" ,
98+ " msvcr110.dll" ;
10299#elif _MSC_VER == 1800
103- " msvcr120.dll" ,
100+ " msvcr120.dll" ;
104101#elif _MSC_VER >= 1900 && _MSC_VER <= 1930
105- " vcruntime140.dll" ,
102+ " vcruntime140.dll" ;
106103#else
107- #error Specify CRT DLL name here !
104+ " " ;
105+
106+ #define TO_STR (x ) #x
107+ #define ERRSTR (x ) " Unknown " #x " value: " TO_STR(x) " . Specify CRT DLL name here !"
108+
109+ static_assert (false , ERRSTR (_MSC_VER));
110+ // #error Specify CRT DLL name here !
108111#endif
109- &ackd))
112+
113+ // if CRT already present in some activation context then nothing to do
114+ if ((*mFindActCtxSectionString )
115+ (0 , NULL ,
116+ ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
117+ crtDll, &ackd))
110118 {
111119 return ;
112120 }
You can’t perform that action at this time.
0 commit comments