SHARE
TWEET

microsoft_craziness.h

a guest Sep 1st, 2018 11,619 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. // Author:   Jonathan Blow
  3. // Version:  1
  4. // Date:     31 August, 2018
  5. //
  6. // This code is released under the MIT license, which you can find at
  7. //
  8. //          https://opensource.org/licenses/MIT
  9. //
  10. //
  11. //
  12. // See the comments for how to use this library just below the includes.
  13. //
  14.  
  15.  
  16. #include <windows.h>
  17. #include <stdlib.h>
  18. #include <string.h>
  19. #include <assert.h>
  20. #include <stdio.h>
  21. #include <sys/stat.h>
  22.  
  23. #include <stdint.h>
  24. #include <io.h>         // For _get_osfhandle
  25.  
  26.  
  27. //
  28. // HOW TO USE THIS CODE
  29. //
  30. // The purpose of this file is to find the folders that contain libraries
  31. // you may need to link against, on Windows, if you are linking with any
  32. // compiled C or C++ code. This will be necessary for many non-C++ programming
  33. // language environments that want to provide compatibility.
  34. //
  35. // We find the place where the Visual Studio libraries live (for example,
  36. // libvcruntime.lib), where the linker and compiler executables live
  37. // (for example, link.exe), and where the Windows SDK libraries reside
  38. // (kernel32.lib, libucrt.lib).
  39. //
  40. // We all wish you didn't have to worry about so many weird dependencies,
  41. // but we don't really have a choice about this, sadly.
  42. //
  43. // I don't claim that this is the absolute best way to solve this problem,
  44. // and so far we punt on things (if you have multiple versions of Visual Studio
  45. // installed, we return the first one, rather than the newest). But it
  46. // will solve the basic problem for you as simply as I know how to do it,
  47. // and because there isn't too much code here, it's easy to modify and expand.
  48. //
  49. //
  50. // Here is the API you need to know about:
  51. //
  52.  
  53. struct Find_Result {
  54.     int windows_sdk_version;   // Zero if no Windows SDK found.
  55.  
  56.     wchar_t *windows_sdk_root              = NULL;
  57.     wchar_t *windows_sdk_um_library_path   = NULL;
  58.     wchar_t *windows_sdk_ucrt_library_path = NULL;
  59.    
  60.     wchar_t *vs_exe_path = NULL;
  61.     wchar_t *vs_library_path = NULL;
  62. };
  63.  
  64. Find_Result find_visual_studio_and_windows_sdk();
  65.  
  66. void free_resources(Find_Result *result) {
  67.     free(result->windows_sdk_root);
  68.     free(result->windows_sdk_um_library_path);
  69.     free(result->windows_sdk_ucrt_library_path);
  70.     free(result->vs_exe_path);
  71.     free(result->vs_library_path);
  72. }
  73.  
  74. //
  75. // Call find_visual_studio_and_windows_sdk, look at the resulting
  76. // paths, then call free_resources on the result.
  77. //
  78. // Everything else in this file is implementation details that you
  79. // don't need to care about.
  80. //
  81.  
  82. //
  83. // This file was about 400 lines before we started adding these comments.
  84. // You might think that's way too much code to do something as simple
  85. // as finding a few library and executable paths. I agree. However,
  86. // Microsoft's own solution to this problem, called "vswhere", is a
  87. // mere EIGHT THOUSAND LINE PROGRAM, spread across 70 files,
  88. // that they posted to github *unironically*.
  89. //
  90. // I am not making this up: https://github.com/Microsoft/vswhere
  91. //
  92. // Several people have therefore found the need to solve this problem
  93. // themselves. We referred to some of these other solutions when
  94. // figuring out what to do, most prominently ziglang's version,
  95. // by Ryan Saunderson.
  96. //
  97. // I hate this kind of code. The fact that we have to do this at all
  98. // is stupid, and the actual maneuvers we need to go through
  99. // are just painful. If programming were like this all the time,
  100. // I would quit.
  101. //
  102. // Because this is such an absurd waste of time, I felt it would be
  103. // useful to package the code in an easily-reusable way, in the
  104. // style of the stb libraries. We haven't gone as all-out as some
  105. // of the stb libraries do (which compile in C with no includes, often).
  106. // For this version you need C++ and the headers at the top of the file.
  107. //
  108. // We return the strings as Windows wide character strings. Aesthetically
  109. // I don't like that (I think most sane programs are UTF-8 internally),
  110. // but apparently, not all valid Windows file paths can even be converted
  111. // correctly to UTF-8. So have fun with that. It felt safest and simplest
  112. // to stay with wchar_t since all of this code is fully ensconced in
  113. // Windows crazy-land.
  114. //
  115. // One other shortcut I took is that this is hardcoded to return the
  116. // folders for x64 libraries. If you want x86 or arm, you can make
  117. // slight edits to the code below, or, if enough people want this,
  118. // I can work it in here.
  119. //
  120.  
  121. // Defer macro/thing.
  122.  
  123. #define CONCAT_INTERNAL(x,y) x##y
  124. #define CONCAT(x,y) CONCAT_INTERNAL(x,y)
  125.  
  126. template<typename T>
  127. struct ExitScope {
  128.     T lambda;
  129.     ExitScope(T lambda):lambda(lambda){}
  130.     ~ExitScope(){lambda();}
  131.     ExitScope(const ExitScope&);
  132.   private:
  133.     ExitScope& operator =(const ExitScope&);
  134. };
  135.  
  136. class ExitScopeHelp {
  137.   public:
  138.     template<typename T>
  139.         ExitScope<T> operator+(T t){ return t;}
  140. };
  141.  
  142. #define defer const auto& CONCAT(defer__, __LINE__) = ExitScopeHelp() + [&]()
  143.  
  144.  
  145. // COM objects for the ridiculous Microsoft craziness.
  146.  
  147. struct DECLSPEC_UUID("B41463C3-8866-43B5-BC33-2B0676F7F42E") DECLSPEC_NOVTABLE ISetupInstance : public IUnknown
  148. {
  149.     STDMETHOD(GetInstanceId)(_Out_ BSTR* pbstrInstanceId) = 0;
  150.     STDMETHOD(GetInstallDate)(_Out_ LPFILETIME pInstallDate) = 0;
  151.     STDMETHOD(GetInstallationName)(_Out_ BSTR* pbstrInstallationName) = 0;
  152.     STDMETHOD(GetInstallationPath)(_Out_ BSTR* pbstrInstallationPath) = 0;
  153.     STDMETHOD(GetInstallationVersion)(_Out_ BSTR* pbstrInstallationVersion) = 0;
  154.     STDMETHOD(GetDisplayName)(_In_ LCID lcid, _Out_ BSTR* pbstrDisplayName) = 0;
  155.     STDMETHOD(GetDescription)(_In_ LCID lcid, _Out_ BSTR* pbstrDescription) = 0;
  156.     STDMETHOD(ResolvePath)(_In_opt_z_ LPCOLESTR pwszRelativePath, _Out_ BSTR* pbstrAbsolutePath) = 0;
  157. };
  158.  
  159. struct DECLSPEC_UUID("6380BCFF-41D3-4B2E-8B2E-BF8A6810C848") DECLSPEC_NOVTABLE IEnumSetupInstances : public IUnknown
  160. {
  161.     STDMETHOD(Next)(_In_ ULONG celt, _Out_writes_to_(celt, *pceltFetched) ISetupInstance** rgelt, _Out_opt_ _Deref_out_range_(0, celt) ULONG* pceltFetched) = 0;
  162.     STDMETHOD(Skip)(_In_ ULONG celt) = 0;
  163.     STDMETHOD(Reset)(void) = 0;
  164.     STDMETHOD(Clone)(_Deref_out_opt_ IEnumSetupInstances** ppenum) = 0;
  165. };
  166.  
  167. struct DECLSPEC_UUID("42843719-DB4C-46C2-8E7C-64F1816EFD5B") DECLSPEC_NOVTABLE ISetupConfiguration : public IUnknown
  168. {
  169.     STDMETHOD(EnumInstances)(_Out_ IEnumSetupInstances** ppEnumInstances) = 0;
  170.     STDMETHOD(GetInstanceForCurrentProcess)(_Out_ ISetupInstance** ppInstance) = 0;
  171.     STDMETHOD(GetInstanceForPath)(_In_z_ LPCWSTR wzPath, _Out_ ISetupInstance** ppInstance) = 0;
  172. };
  173.  
  174.  
  175. // The beginning of the actual code that does things.
  176.  
  177. struct Version_Data {
  178.     int32_t best_version[4];  // For Windows 8 versions, only two of these numbers are used.
  179.     wchar_t *best_name;
  180. };
  181.  
  182. bool os_file_exists(wchar_t *name) {
  183.     // @Robustness: What flags do we really want to check here?
  184.    
  185.     auto attrib = GetFileAttributesW(name);
  186.     if (attrib == INVALID_FILE_ATTRIBUTES) return false;
  187.     if (attrib & FILE_ATTRIBUTE_DIRECTORY) return false;
  188.  
  189.     return true;
  190. }
  191.  
  192. wchar_t *concat(wchar_t *a, wchar_t *b, wchar_t *c = nullptr, wchar_t *d = nullptr) {
  193.     // Concatenate up to 4 wide strings together. Allocated with malloc.
  194.     // If you don't like that, use a programming language that actually
  195.     // helps you with using custom allocators. Or just edit the code.
  196.    
  197.     auto len_a = wcslen(a);
  198.     auto len_b = wcslen(b);
  199.  
  200.     auto len_c = 0;
  201.     if (c) len_c = wcslen(c);
  202.    
  203.     auto len_d = 0;
  204.     if (d) len_d = wcslen(d);
  205.    
  206.     wchar_t *result = (wchar_t *)malloc((len_a + len_b + len_c + len_d + 1) * 2);
  207.     memcpy(result, a, len_a*2);
  208.     memcpy(result + len_a, b, len_b*2);
  209.  
  210.     if (c) memcpy(result + len_a + len_b, c, len_c * 2);
  211.     if (d) memcpy(result + len_a + len_b + len_c, d, len_d * 2);
  212.        
  213.     result[len_a + len_b + len_c + len_d] = 0;
  214.  
  215.     return result;
  216. }
  217.  
  218. typedef void (*Visit_Proc_W)(wchar_t *short_name, wchar_t *full_name, Version_Data *data);
  219. bool visit_files_w(wchar_t *dir_name, Version_Data *data, Visit_Proc_W proc) {
  220.  
  221.     // Visit everything in one folder (non-recursively). If it's a directory
  222.     // that doesn't start with ".", call the visit proc on it. The visit proc
  223.     // will see if the filename conforms to the expected versioning pattern.
  224.  
  225.     auto wildcard_name = concat(dir_name, L"\\*");
  226.     defer { free(wildcard_name); };
  227.    
  228.     WIN32_FIND_DATAW find_data;
  229.     auto handle = FindFirstFileW(wildcard_name, &find_data);
  230.     if (handle == INVALID_HANDLE_VALUE) return false;
  231.  
  232.     while (true) {
  233.         if ((find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && (find_data.cFileName[0] != '.')) {
  234.             auto full_name = concat(dir_name, L"\\", find_data.cFileName);
  235.             defer { free(full_name); };
  236.          
  237.             proc(find_data.cFileName, full_name, data);
  238.         }
  239.        
  240.         auto success = FindNextFileW(handle, &find_data);
  241.         if (!success) break;
  242.     }
  243.  
  244.     FindClose(handle);
  245.    
  246.     return true;
  247. }
  248.  
  249.  
  250. wchar_t *find_windows_kit_root(HKEY key, wchar_t *version) {
  251.     // Given a key to an already opened registry entry,
  252.     // get the value stored under the 'version' subkey.
  253.     // If that's not the right terminology, hey, I never do registry stuff.
  254.    
  255.     DWORD required_length;
  256.     auto rc = RegQueryValueExW(key, version, NULL, NULL, NULL, &required_length);
  257.     if (rc != 0)  return NULL;
  258.  
  259.     DWORD length = required_length + 2;  // The +2 is for the maybe optional zero later on. Probably we are over-allocating.
  260.     wchar_t *value = (wchar_t *)malloc(length);
  261.     if (!value) return NULL;
  262.  
  263.     rc = RegQueryValueExW(key, version, NULL, NULL, (LPBYTE)value, &length);  // We know that version is zero-terminated...
  264.     if (rc != 0)  return NULL;
  265.  
  266.     // The documentation says that if the string for some reason was not stored
  267.     // with zero-termination, we need to manually terminate it. Sigh!!
  268.  
  269.     if (value[length]) {
  270.         value[length+1] = 0;
  271.     }
  272.    
  273.     return value;
  274. }
  275.  
  276. void win10_best(wchar_t *short_name, wchar_t *full_name, Version_Data *data) {
  277.     // Find the Windows 10 subdirectory with the highest version number.
  278.    
  279.     int i0, i1, i2, i3;
  280.     auto success = swscanf_s(short_name, L"%d.%d.%d.%d", &i0, &i1, &i2, &i3);
  281.     if (success < 4) return;
  282.  
  283.     if (i0 < data->best_version[0]) return;
  284.     else if (i0 == data->best_version[0]) {
  285.         if (i1 < data->best_version[1]) return;
  286.         else if (i1 == data->best_version[1]) {
  287.             if (i2 < data->best_version[2]) return;
  288.             else if (i2 == data->best_version[2]) {
  289.                 if (i3 < data->best_version[3]) return;
  290.             }
  291.         }
  292.     }
  293.  
  294.     // we have to copy_string and free here because visit_files free's the full_name string
  295.     // after we execute this function, so Win*_Data would contain an invalid pointer.
  296.     if (data->best_name) free(data->best_name);
  297.     data->best_name = _wcsdup(full_name);
  298.            
  299.     if (data->best_name) {
  300.         data->best_version[0] = i0;
  301.         data->best_version[1] = i1;
  302.         data->best_version[2] = i2;
  303.         data->best_version[3] = i3;
  304.     }
  305. }
  306.  
  307. void win8_best(wchar_t *short_name, wchar_t *full_name, Version_Data *data) {
  308.     // Find the Windows 8 subdirectory with the highest version number.
  309.  
  310.     int i0, i1;
  311.     auto success = swscanf_s(short_name, L"winv%d.%d", &i0, &i1);
  312.     if (success < 2) return;
  313.  
  314.     if (i0 < data->best_version[0]) return;
  315.     else if (i0 == data->best_version[0]) {
  316.         if (i1 < data->best_version[1]) return;
  317.     }
  318.  
  319.     // we have to copy_string and free here because visit_files free's the full_name string
  320.     // after we execute this function, so Win*_Data would contain an invalid pointer.
  321.     if (data->best_name) free(data->best_name);
  322.     data->best_name = _wcsdup(full_name);
  323.  
  324.     if (data->best_name) {
  325.         data->best_version[0] = i0;
  326.         data->best_version[1] = i1;
  327.     }
  328. }
  329.  
  330. void find_windows_kit_root(Find_Result *result) {
  331.     // Information about the Windows 10 and Windows 8 development kits
  332.     // is stored in the same place in the registry. We open a key
  333.     // to that place, first checking preferntially for a Windows 10 kit,
  334.     // then, if that's not found, a Windows 8 kit.
  335.    
  336.     HKEY main_key;
  337.  
  338.     auto rc = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots",
  339.                             0, KEY_QUERY_VALUE | KEY_WOW64_32KEY | KEY_ENUMERATE_SUB_KEYS, &main_key);
  340.     if (rc != S_OK) return;
  341.     defer { RegCloseKey(main_key); };
  342.  
  343.     // Look for a Windows 10 entry.
  344.     auto windows10_root = find_windows_kit_root(main_key, L"KitsRoot10");
  345.  
  346.     if (windows10_root) {
  347.         defer { free(windows10_root); };
  348.         Version_Data data = {0};
  349.         auto windows10_lib = concat(windows10_root, L"Lib");
  350.         defer { free(windows10_lib); };
  351.        
  352.         visit_files_w(windows10_lib, &data, win10_best);
  353.         if (data.best_name) {
  354.             result->windows_sdk_version = 10;
  355.             result->windows_sdk_root = data.best_name;
  356.             return;
  357.         }
  358.     }
  359.  
  360.     // Look for a Windows 8 entry.
  361.     auto windows8_root = find_windows_kit_root(main_key, L"KitsRoot81");
  362.  
  363.     if (windows8_root) {
  364.         defer { free(windows8_root); };
  365.        
  366.         auto windows8_lib = concat(windows8_root, L"Lib");
  367.         defer { free(windows8_lib); };
  368.  
  369.         Version_Data data = {0};
  370.         visit_files_w(windows8_lib, &data, win8_best);
  371.         if (data.best_name) {
  372.             result->windows_sdk_version = 8;
  373.             result->windows_sdk_root = data.best_name;
  374.             return;
  375.         }
  376.     }
  377.  
  378.     // If we get here, we failed to find anything.
  379. }
  380.  
  381.  
  382. void find_visual_studio_by_fighting_through_microsoft_craziness(Find_Result *result) {
  383.     // The name of this procedure is kind of cryptic. Its purpose is
  384.     // to fight through Microsoft craziness. The things that the fine
  385.     // Visual Studio team want you to do, JUST TO FIND A SINGLE FOLDER
  386.     // THAT EVERYONE NEEDS TO FIND, are ridiculous garbage.
  387.  
  388.     // For earlier versions of Visual Studio, you'd find this information in the registry,
  389.     // similarly to the Windows Kits above. But no, now it's the future, so to ask the
  390.     // question "Where is the Visual Studio folder?" you have to do a bunch of COM object
  391.     // instantiation, enumeration, and querying. (For extra bonus points, try doing this in
  392.     // a new, underdeveloped programming language where you don't have COM routines up
  393.     // and running yet. So fun.)
  394.     //
  395.     // If all this COM object instantiation, enumeration, and querying doesn't give us
  396.     // a useful result, we drop back to the registry-checking method.
  397.    
  398.     auto rc = CoInitialize(NULL);
  399.     // "Subsequent valid calls return false." So ignore false.
  400.     // if rc != S_OK  return false;
  401.  
  402.     GUID my_uid                   = {0x42843719, 0xDB4C, 0x46C2, {0x8E, 0x7C, 0x64, 0xF1, 0x81, 0x6E, 0xFD, 0x5B}};
  403.     GUID CLSID_SetupConfiguration = {0x177F0C4A, 0x1CD3, 0x4DE7, {0xA3, 0x2C, 0x71, 0xDB, 0xBB, 0x9F, 0xA3, 0x6D}};
  404.  
  405.     ISetupConfiguration *config = NULL;
  406.     auto hr = CoCreateInstance(CLSID_SetupConfiguration, NULL, CLSCTX_INPROC_SERVER, my_uid, (void **)&config);
  407.     if (hr != 0)  return;
  408.     defer { config->Release(); };
  409.  
  410.     IEnumSetupInstances *instances = NULL;
  411.     hr = config->EnumInstances(&instances);
  412.     if (hr != 0)     return;
  413.     if (!instances)  return;
  414.     defer { instances->Release(); };
  415.  
  416.     while (1) {
  417.         ULONG found = 0;
  418.         ISetupInstance *instance = NULL;
  419.         auto hr = instances->Next(1, &instance, &found);
  420.         if (hr != S_OK) break;
  421.  
  422.         defer { instance->Release(); };
  423.        
  424.         BSTR bstr_inst_path;
  425.         hr = instance->GetInstallationPath(&bstr_inst_path);
  426.         if (hr != S_OK)  continue;
  427.         defer { SysFreeString(bstr_inst_path); };
  428.        
  429.         auto tools_filename = concat(bstr_inst_path, L"\\VC\\Auxiliary\\Build\\Microsoft.VCToolsVersion.default.txt");
  430.         defer { free(tools_filename); };
  431.  
  432.         FILE *f = nullptr;
  433.         auto open_result = _wfopen_s(&f, tools_filename, L"rt");
  434.         if (open_result != 0) continue;
  435.         if (!f) continue;
  436.         defer { fclose(f); };
  437.  
  438.         LARGE_INTEGER tools_file_size;
  439.         auto file_handle = (HANDLE)_get_osfhandle(_fileno(f));
  440.         BOOL success = GetFileSizeEx(file_handle, &tools_file_size);
  441.         if (!success) continue;
  442.  
  443.         auto version_bytes = (tools_file_size.QuadPart + 1) * 2;  // Warning: This multiplication by 2 presumes there is no variable-length encoding in the wchars (wacky characters in the file could betray this expectation).
  444.         wchar_t *version = (wchar_t *)malloc(version_bytes);
  445.         defer { free(version); };
  446.  
  447.         auto read_result = fgetws(version, version_bytes, f);
  448.         if (!read_result) continue;
  449.  
  450.         auto version_tail = wcschr(version, '\n');
  451.         if (version_tail)  *version_tail = 0;  // Stomp the data, because nobody cares about it.
  452.  
  453.         auto library_path = concat(bstr_inst_path, L"\\VC\\Tools\\MSVC\\", version, L"\\lib\\x64");
  454.         auto library_file = concat(library_path, L"\\vcruntime.lib");  // @Speed: Could have library_path point to this string, with a smaller count, to save on memory flailing!
  455.  
  456.         if (os_file_exists(library_file)) {
  457.             auto link_exe_path = concat(bstr_inst_path, L"\\VC\\Tools\\MSVC\\", version, L"\\bin\\Hostx64\\x64");
  458.             result->vs_exe_path     = link_exe_path;
  459.             result->vs_library_path = library_path;
  460.             return;
  461.         }
  462.  
  463.         /*
  464.            Ryan Saunderson said:
  465.            "Clang uses the 'SetupInstance->GetInstallationVersion' / ISetupHelper->ParseVersion to find the newest version
  466.            and then reads the tools file to define the tools path - which is definitely better than what i did."
  467.  
  468.            So... @Incomplete: Should probably pick the newest version...
  469.         */
  470.     }
  471.    
  472.     // If we get here, we didn't find Visual Studio 2017. Try earlier versions.
  473.  
  474.     HKEY vs7_key;
  475.     rc = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7", 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &vs7_key);
  476.  
  477.     if (rc != S_OK)  return;
  478.     defer { RegCloseKey(vs7_key); };
  479.  
  480.     // Hardcoded search for 4 prior Visual Studio versions. Is there something better to do here?
  481.     wchar_t *versions[] = { L"14.0", L"12.0", L"11.0", L"10.0" };
  482.     const int NUM_VERSIONS = sizeof(versions) / sizeof(versions[0]);
  483.  
  484.     for (int i = 0; i < NUM_VERSIONS; i++) {
  485.         auto v = versions[i];
  486.  
  487.         DWORD dw_type;
  488.         DWORD cb_data;
  489.  
  490.         auto rc = RegQueryValueExW(vs7_key, v, NULL, &dw_type, NULL, &cb_data);
  491.         if ((rc == ERROR_FILE_NOT_FOUND) || (dw_type != REG_SZ)) {
  492.             continue;
  493.         }
  494.  
  495.         auto buffer = (wchar_t *)malloc(cb_data);
  496.         if (!buffer)  return;
  497.         defer { free(buffer); };
  498.        
  499.         rc = RegQueryValueExW(vs7_key, v, NULL, NULL, (LPBYTE)buffer, &cb_data);
  500.         if (rc != 0)  continue;
  501.  
  502.         // @Robustness: Do the zero-termination thing suggested in the RegQueryValue docs?
  503.        
  504.         auto lib_path = concat(buffer, L"VC\\Lib\\amd64");
  505.  
  506.         // Check to see whether a vcruntime.lib actually exists here.
  507.         auto vcruntime_filename = concat(lib_path, L"\\vcruntime.lib");
  508.         defer { free(vcruntime_filename); };
  509.  
  510.         if (os_file_exists(vcruntime_filename)) {
  511.             result->vs_exe_path     = concat(buffer, L"VC\\bin");
  512.             result->vs_library_path = lib_path;
  513.             return;
  514.         }
  515.        
  516.         free(lib_path);
  517.     }
  518.  
  519.     // If we get here, we failed to find anything.
  520. }
  521.  
  522.  
  523. Find_Result find_visual_studio_and_windows_sdk() {
  524.     Find_Result result;
  525.  
  526.     find_windows_kit_root(&result);
  527.  
  528.     if (result.windows_sdk_root) {
  529.         result.windows_sdk_um_library_path   = concat(result.windows_sdk_root, L"\\um\\x64");
  530.         result.windows_sdk_ucrt_library_path = concat(result.windows_sdk_root, L"\\ucrt\\x64");
  531.     }
  532.  
  533.     find_visual_studio_by_fighting_through_microsoft_craziness(&result);
  534.  
  535.     return result;
  536. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top