Advertisement
Guest User

Untitled

a guest
May 7th, 2019
7,460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.79 KB | None | 0 0
  1. //
  2. // Author: Jonathan Blow
  3. // Version: 2
  4. // Date: 7 May, 2019 (update to original version released on 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. wchar_t *read_from_the_registry(HKEY key, wchar_t *value_name) {
  250. // Returns NULL if read failed.
  251. // Otherwise returns a wide string allocated via 'malloc'.
  252.  
  253. //
  254. // If the registry data changes between the first and second calls to RegQueryValueExW,
  255. // we may fail to get the entire key, even though it told us initially that our buffer length
  256. // would be big enough. The only solution is to keep looping until we don't fail.
  257. //
  258.  
  259. DWORD required_length;
  260. auto rc = RegQueryValueExW(key, value_name, NULL, NULL, NULL, &required_length);
  261. if (rc != 0) return NULL;
  262.  
  263. wchar_t *value;
  264. DWORD length;
  265. while (1) {
  266. length = required_length + 2; // The +2 is for the maybe optional zero later on. Probably we are over-allocating.
  267. value = (wchar_t *)malloc(length + 2); // This second +2 is for crazy situations where there are race conditions or the API doesn't do what we want!
  268. if (!value) return NULL;
  269.  
  270. DWORD type;
  271. rc = RegQueryValueExW(key, value_name, NULL, &type, (LPBYTE)value, &length); // We know that version is zero-terminated...
  272. if (rc == ERROR_MORE_DATA) {
  273. free(value);
  274. required_length = length;
  275. continue;
  276. }
  277.  
  278. if ((rc != 0) || (type != REG_SZ)) {
  279. // REG_SZ because we only accept strings here!
  280. free(value);
  281. return NULL;
  282. }
  283.  
  284. break;
  285. }
  286.  
  287. // The documentation says that if the string for some reason was not stored
  288. // with zero-termination, we need to manually terminate it. Sigh!!
  289.  
  290. auto num_wchars = length / 2;
  291. value[num_wchars] = 0; // If the string was already zero-terminated, this just puts an extra 0 after (since that 0 was counted in 'length'). If it wasn't, this puts a 0 after the nonzero characters we got.
  292.  
  293. return value;
  294. }
  295.  
  296. void win10_best(wchar_t *short_name, wchar_t *full_name, Version_Data *data) {
  297. // Find the Windows 10 subdirectory with the highest version number.
  298.  
  299. int i0, i1, i2, i3;
  300. auto success = swscanf_s(short_name, L"%d.%d.%d.%d", &i0, &i1, &i2, &i3);
  301. if (success < 4) return;
  302.  
  303. if (i0 < data->best_version[0]) return;
  304. else if (i0 == data->best_version[0]) {
  305. if (i1 < data->best_version[1]) return;
  306. else if (i1 == data->best_version[1]) {
  307. if (i2 < data->best_version[2]) return;
  308. else if (i2 == data->best_version[2]) {
  309. if (i3 < data->best_version[3]) return;
  310. }
  311. }
  312. }
  313.  
  314. // we have to copy_string and free here because visit_files free's the full_name string
  315. // after we execute this function, so Win*_Data would contain an invalid pointer.
  316. if (data->best_name) free(data->best_name);
  317. data->best_name = _wcsdup(full_name);
  318.  
  319. if (data->best_name) {
  320. data->best_version[0] = i0;
  321. data->best_version[1] = i1;
  322. data->best_version[2] = i2;
  323. data->best_version[3] = i3;
  324. }
  325. }
  326.  
  327. void win8_best(wchar_t *short_name, wchar_t *full_name, Version_Data *data) {
  328. // Find the Windows 8 subdirectory with the highest version number.
  329.  
  330. int i0, i1;
  331. auto success = swscanf_s(short_name, L"winv%d.%d", &i0, &i1);
  332. if (success < 2) return;
  333.  
  334. if (i0 < data->best_version[0]) return;
  335. else if (i0 == data->best_version[0]) {
  336. if (i1 < data->best_version[1]) return;
  337. }
  338.  
  339. // we have to copy_string and free here because visit_files free's the full_name string
  340. // after we execute this function, so Win*_Data would contain an invalid pointer.
  341. if (data->best_name) free(data->best_name);
  342. data->best_name = _wcsdup(full_name);
  343.  
  344. if (data->best_name) {
  345. data->best_version[0] = i0;
  346. data->best_version[1] = i1;
  347. }
  348. }
  349.  
  350. void find_windows_kit_root(Find_Result *result) {
  351. // Information about the Windows 10 and Windows 8 development kits
  352. // is stored in the same place in the registry. We open a key
  353. // to that place, first checking preferntially for a Windows 10 kit,
  354. // then, if that's not found, a Windows 8 kit.
  355.  
  356. HKEY main_key;
  357.  
  358. auto rc = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots",
  359. 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY | KEY_ENUMERATE_SUB_KEYS, &main_key);
  360. if (rc != S_OK) return;
  361. defer { RegCloseKey(main_key); };
  362.  
  363. // Look for a Windows 10 entry.
  364. auto windows10_root = read_from_the_registry(main_key, L"KitsRoot10");
  365. if (windows10_root) {
  366. defer { free(windows10_root); };
  367. Version_Data data = {0};
  368. auto windows10_lib = concat(windows10_root, L"Lib");
  369. defer { free(windows10_lib); };
  370.  
  371. visit_files_w(windows10_lib, &data, win10_best);
  372. if (data.best_name) {
  373. result->windows_sdk_version = 10;
  374. result->windows_sdk_root = data.best_name;
  375. return;
  376. }
  377. }
  378.  
  379. // Look for a Windows 8 entry.
  380. auto windows8_root = read_from_the_registry(main_key, L"KitsRoot81");
  381.  
  382. if (windows8_root) {
  383. defer { free(windows8_root); };
  384.  
  385. auto windows8_lib = concat(windows8_root, L"Lib");
  386. defer { free(windows8_lib); };
  387.  
  388. Version_Data data = {0};
  389. visit_files_w(windows8_lib, &data, win8_best);
  390. if (data.best_name) {
  391. result->windows_sdk_version = 8;
  392. result->windows_sdk_root = data.best_name;
  393. return;
  394. }
  395. }
  396.  
  397. // If we get here, we failed to find anything.
  398. }
  399.  
  400.  
  401. bool find_visual_studio_2017_by_fighting_through_microsoft_craziness(Find_Result *result) {
  402. // The name of this procedure is kind of cryptic. Its purpose is
  403. // to fight through Microsoft craziness. The things that the fine
  404. // Visual Studio team want you to do, JUST TO FIND A SINGLE FOLDER
  405. // THAT EVERYONE NEEDS TO FIND, are ridiculous garbage.
  406.  
  407. // For earlier versions of Visual Studio, you'd find this information in the registry,
  408. // similarly to the Windows Kits above. But no, now it's the future, so to ask the
  409. // question "Where is the Visual Studio folder?" you have to do a bunch of COM object
  410. // instantiation, enumeration, and querying. (For extra bonus points, try doing this in
  411. // a new, underdeveloped programming language where you don't have COM routines up
  412. // and running yet. So fun.)
  413. //
  414. // If all this COM object instantiation, enumeration, and querying doesn't give us
  415. // a useful result, we drop back to the registry-checking method.
  416.  
  417. auto rc = CoInitializeEx(NULL, COINIT_MULTITHREADED);
  418. // "Subsequent valid calls return false." So ignore false.
  419. // if rc != S_OK return false;
  420.  
  421. GUID my_uid = {0x42843719, 0xDB4C, 0x46C2, {0x8E, 0x7C, 0x64, 0xF1, 0x81, 0x6E, 0xFD, 0x5B}};
  422. GUID CLSID_SetupConfiguration = {0x177F0C4A, 0x1CD3, 0x4DE7, {0xA3, 0x2C, 0x71, 0xDB, 0xBB, 0x9F, 0xA3, 0x6D}};
  423.  
  424. ISetupConfiguration *config = NULL;
  425. auto hr = CoCreateInstance(CLSID_SetupConfiguration, NULL, CLSCTX_INPROC_SERVER, my_uid, (void **)&config);
  426. if (hr != 0) return false;
  427. defer { config->Release(); };
  428.  
  429. IEnumSetupInstances *instances = NULL;
  430. hr = config->EnumInstances(&instances);
  431. if (hr != 0) return false;
  432. if (!instances) return false;
  433. defer { instances->Release(); };
  434.  
  435. while (1) {
  436. ULONG found = 0;
  437. ISetupInstance *instance = NULL;
  438. auto hr = instances->Next(1, &instance, &found);
  439. if (hr != S_OK) break;
  440.  
  441. defer { instance->Release(); };
  442.  
  443. BSTR bstr_inst_path;
  444. hr = instance->GetInstallationPath(&bstr_inst_path);
  445. if (hr != S_OK) continue;
  446. defer { SysFreeString(bstr_inst_path); };
  447.  
  448. auto tools_filename = concat(bstr_inst_path, L"\\VC\\Auxiliary\\Build\\Microsoft.VCToolsVersion.default.txt");
  449. defer { free(tools_filename); };
  450.  
  451. FILE *f = nullptr;
  452. auto open_result = _wfopen_s(&f, tools_filename, L"rt");
  453. if (open_result != 0) continue;
  454. if (!f) continue;
  455. defer { fclose(f); };
  456.  
  457. LARGE_INTEGER tools_file_size;
  458. auto file_handle = (HANDLE)_get_osfhandle(_fileno(f));
  459. BOOL success = GetFileSizeEx(file_handle, &tools_file_size);
  460. if (!success) continue;
  461.  
  462. 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).
  463. wchar_t *version = (wchar_t *)malloc(version_bytes);
  464. defer { free(version); };
  465.  
  466. auto read_result = fgetws(version, version_bytes, f);
  467. if (!read_result) continue;
  468.  
  469. auto version_tail = wcschr(version, '\n');
  470. if (version_tail) *version_tail = 0; // Stomp the data, because nobody cares about it.
  471.  
  472. auto library_path = concat(bstr_inst_path, L"\\VC\\Tools\\MSVC\\", version, L"\\lib\\x64");
  473. 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!
  474.  
  475. if (os_file_exists(library_file)) {
  476. auto link_exe_path = concat(bstr_inst_path, L"\\VC\\Tools\\MSVC\\", version, L"\\bin\\Hostx64\\x64");
  477. result->vs_exe_path = link_exe_path;
  478. result->vs_library_path = library_path;
  479. return true;
  480. }
  481.  
  482. /*
  483. Ryan Saunderson said:
  484. "Clang uses the 'SetupInstance->GetInstallationVersion' / ISetupHelper->ParseVersion to find the newest version
  485. and then reads the tools file to define the tools path - which is definitely better than what i did."
  486.  
  487. So... @Incomplete: Should probably pick the newest version...
  488. */
  489. }
  490.  
  491. // If we get here, we didn't find Visual Studio 2017. Try earlier versions.
  492. return false;
  493. }
  494.  
  495. void find_visual_studio_by_fighting_through_microsoft_craziness(Find_Result *result) {
  496. bool found_visual_studio_2017 = find_visual_studio_2017_by_fighting_through_microsoft_craziness(result);
  497. if (found_visual_studio_2017) return;
  498.  
  499. HKEY vs7_key;
  500. auto rc = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7", 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &vs7_key);
  501.  
  502. if (rc != S_OK) return;
  503. defer { RegCloseKey(vs7_key); };
  504.  
  505. // Hardcoded search for 4 prior Visual Studio versions. Is there something better to do here?
  506. wchar_t *versions[] = { L"14.0", L"12.0", L"11.0", L"10.0" };
  507. const int NUM_VERSIONS = sizeof(versions) / sizeof(versions[0]);
  508.  
  509. for (int i = 0; i < NUM_VERSIONS; i++) {
  510. auto v = versions[i];
  511.  
  512. auto buffer = read_from_the_registry(vs7_key, v);
  513. if (!buffer) continue;
  514.  
  515. defer { free(buffer); };
  516.  
  517. auto lib_path = concat(buffer, L"VC\\Lib\\amd64");
  518.  
  519. // Check to see whether a vcruntime.lib actually exists here.
  520. auto vcruntime_filename = concat(lib_path, L"\\vcruntime.lib");
  521. defer { free(vcruntime_filename); };
  522.  
  523. if (os_file_exists(vcruntime_filename)) {
  524. result->vs_exe_path = concat(buffer, L"VC\\bin\\amd64");
  525. result->vs_library_path = lib_path;
  526. return;
  527. }
  528.  
  529. free(lib_path);
  530. }
  531.  
  532. // If we get here, we failed to find anything.
  533. }
  534.  
  535.  
  536. Find_Result find_visual_studio_and_windows_sdk() {
  537. Find_Result result;
  538.  
  539. find_windows_kit_root(&result);
  540.  
  541. if (result.windows_sdk_root) {
  542. result.windows_sdk_um_library_path = concat(result.windows_sdk_root, L"\\um\\x64");
  543. result.windows_sdk_ucrt_library_path = concat(result.windows_sdk_root, L"\\ucrt\\x64");
  544. }
  545.  
  546. find_visual_studio_by_fighting_through_microsoft_craziness(&result);
  547.  
  548. return result;
  549. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement