How to make [DebuggerNonUserCode] hide an exception from the debugger in simple test case?

Mystery solved. It is indeed a known issue that is new to MSVS 2015 because of added exception handling optimizations. https://blogs.msdn.microsoft.com/visualstudioalm/2016/02/12/using-the-debuggernonusercode-attribute-in-visual-studio-2015/# There is a workaround posted on that link to disable the optimizations and enable the old behavior. Hopefully they will eventually be able to revive the support for this including the optimizations. reg add … Read more

Detecting text changes in Word 2016 from VSTO add-in

Everthing should work fine if you don’t use a low-level hook in your VSTO add-in. [DllImport(“kernel32”, CharSet = CharSet.Auto, SetLastError = true)] public static extern int GetCurrentThreadId(); const int WH_KEYBOARD = 2; private static IntPtr SetHook(HookProcedure procedure) { var threadId = (uint)SafeNativeMethods.GetCurrentThreadId(); return SetWindowsHookEx(WH_KEYBOARD, procedure, IntPtr.Zero, threadId); } Please note that you probably also need … Read more

VS2015 – Change TypeScript Version

Here’s the solution to upgrading TypeScript in Visual Studios 2015: Download the TypeScript EXE release from the following website: http://www.microsoft.com/en-us/download/details.aspx?id=48593 Click the details to view other releases: In this case I want to download 1.6.0 Beta Download the exe and install onto computer. Create a new TypeScript Cordova project in VS2015. VS2015 may ask if … Read more

VS 2015 compiling cocos2d-x 3.3 error “fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration”

Until now, Many libraries & programs used snprintf() function by defining it as _snprintf(), since _snprintf() was supported. #define snprintf _snprintf Finally, Visual Studio 14 defines snprintf()! Since, snprintf() is now officially supported. We should never #define it. Doing it will overshadow new snprintf() function defined in stdio.h. To restrict that, this is added in … Read more