Skip to content

Instantly share code, notes, and snippets.

@Dantali0n
Created March 7, 2017 13:08
Show Gist options
  • Save Dantali0n/9cbab11b089f96d3382fe2509e5bc668 to your computer and use it in GitHub Desktop.
Save Dantali0n/9cbab11b089f96d3382fe2509e5bc668 to your computer and use it in GitHub Desktop.
Disable visual studio 2015 and higher telemetry
#include <clocale>
#include <windows.h>
#include <shellapi.h>
// Disable telemetry added in Visual Studio 2015
#if defined(_MSC_VER) && _MSC_VER >= 1900
extern "C" {
void _cdecl __vcrt_initialize_telemetry_provider() { }
void _cdecl __telemetry_main_invoke_trigger() { }
void _cdecl __telemetry_main_return_trigger() { }
void _cdecl __vcrt_uninitialize_telemetry_provider() { }
};
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment