File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9664,7 +9664,23 @@ struct VM {
96649664#else
96659665 BOOL isNativeVhdBoot = 0 ;
96669666
9667- if (IsNativeVhdBoot (&isNativeVhdBoot)) {
9667+ const HMODULE hModule = GetModuleHandleA (" Kernel32.dll" );
9668+ if (!hModule)
9669+ return false ;
9670+
9671+ const char * functionNames[] = { " IsNativeVhdBoot" };
9672+ void * functionPointers[1 ] = { nullptr };
9673+
9674+ util::GetFunctionAddresses (hModule, functionNames, functionPointers, 1 );
9675+
9676+ typedef BOOL (WINAPI *IsNativeVhdBoot)(PBOOL NativeVhdBoot);
9677+
9678+ IsNativeVhdBoot pIsNativeVhdBoot = nullptr ;
9679+ pIsNativeVhdBoot = reinterpret_cast <IsNativeVhdBoot>(functionPointers[0 ]);
9680+ if (!pIsNativeVhdBoot)
9681+ return false ;
9682+
9683+ if ( pIsNativeVhdBoot (&isNativeVhdBoot)) {
96689684 return isNativeVhdBoot == 1 ;
96699685 }
96709686
@@ -10890,7 +10906,7 @@ struct VM {
1089010906 const brand_element_t &a,
1089110907 const brand_element_t &b
1089210908 ) {
10893- return a.second < b.second ;
10909+ return a.second > b.second ;
1089410910 });
1089510911
1089610912 std::string ret_str = brands::NULL_BRAND;
You can’t perform that action at this time.
0 commit comments