Jump to content

Simple Ingame Browser Update (IE 7 to IE 11)


Recommended Posts

I noticed embedded ingame browser is compatibility mode IE 7 by default, looked aroud the net and it seems that there's not so much detailed information about it. The best way would be to get your hands on chromium or something like that, but its a rather time sinking activity and since internet explorer emulated version can be easily changed with a new registry key i opted toward this solution. However (apparently, I actually searched very few sites) it seems that noone has ever mentioned it thus I decided to share the know-how with you. If anyone is interested this is a very simple example (very raw i suggest to at very least modify it):

In UserInterface.cpp before bool Main(HINSTANCE hInstance, LPSTR lpCmdLine)

void SetInternetRegKey()
{
	LONG status;
	HKEY hKey;

	status = RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION"), 0, KEY_ALL_ACCESS, &hKey);
	if ((status == ERROR_SUCCESS) && (hKey != NULL))
	{
		DWORD standard = 11000;
		DWORD version;
		DWORD size = sizeof(version);
		DWORD type = REG_DWORD;
		status = RegQueryValueEx(hKey, TEXT("YOURCLIENTEXECUTABLEFILE.EXTENSION"), NULL, &type, (BYTE*)&version, &size);
		if (status != ERROR_SUCCESS)
		{
			status = RegSetValueEx(hKey, TEXT("YOURCLIENTEXECUTABLEFILE.EXTENSION"), NULL, REG_DWORD, (BYTE*)&standard, sizeof(standard));
			if (status != ERROR_SUCCESS)
			{

			}
		}
		RegCloseKey(hKey);
	}
}
then in bool Main at the beginning add SetInternetRegKey();
bool Main(HINSTANCE hInstance, LPSTR lpCmdLine)
{
	SetInternetRegKey();      <--------- here

This will add a registry value for FEATURE_BROWSER_EMULATION (YOURCLIENTEXECUTABLEFILE.EXTENSION, 11000) which will tell browser to emulate IE 11 at the launch of the executable and only once. As I said above this is very raw and won't autodetect latest avaible IE and many other lacks which you can clearly see. All documentation about IE registry key for version/svcVersion can be found here https://support.microsoft.com/en-us/help/969393/information-about-internet-explorer-versions
Do your homework (just a few hours i think) and you will have your nice and clean browser emulation to latest avaible IE version or use it as it is and have a poor compatibilty still working IE11 browser. Hope you find this useful, Have a nice day.

  • Metin2 Dev 7
  • Confused 1
  • Good 3
  • Love 15
Link to comment
Share on other sites

1 hour ago, OtherChoice said:

I noticed embedded ingame browser is compatibility mode IE 7 by default, looked aroud the net and it seems that there's not so much detailed information about it. The best way would be to get your hands on chromium or something like that, but its a rather time sinking activity and since internet explorer emulated version can be easily changed with a new registry key i opted toward this solution. However (apparently, I actually searched very few sites) it seems that noone has ever mentioned it thus I decided to share the know-how with you. If anyone is interested this is a very simple example (very raw i suggest to at very least modify it):


In UserInterface.cpp before bool Main(HINSTANCE hInstance, LPSTR lpCmdLine)

void SetInternetRegKey()
{
	LONG status;
	HKEY hKey;

	status = RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION"), 0, KEY_ALL_ACCESS, &hKey);
	if ((status == ERROR_SUCCESS) && (hKey != NULL))
	{
		DWORD standard = 11000;
		DWORD version;
		DWORD size = sizeof(version);
		DWORD type = REG_DWORD;
		status = RegQueryValueEx(hKey, TEXT("YOURCLIENTEXECUTABLEFILE.EXTENSION"), NULL, &type, (BYTE*)&version, &size);
		if (status != ERROR_SUCCESS)
		{
			status = RegSetValueEx(hKey, TEXT("YOURCLIENTEXECUTABLEFILE.EXTENSION"), NULL, REG_DWORD, (BYTE*)&standard, sizeof(standard));
			if (status != ERROR_SUCCESS)
			{

			}
		}
		RegCloseKey(hKey);
	}
}
then in bool Main at the beginning add SetInternetRegKey();
bool Main(HINSTANCE hInstance, LPSTR lpCmdLine)
{
	SetInternetRegKey();      <--------- here

This will add a registry value for FEATURE_BROWSER_EMULATION (YOURCLIENTEXECUTABLEFILE.EXTENSION, 11000) which will tell browser to emulate IE 11 at the launch of the executable and only once. As I said above this is very raw and won't autodetect latest avaible IE and many other lacks which you can clearly see. All documentation about IE registry key for version/svcVersion can be found here https://support.microsoft.com/en-us/help/969393/information-about-internet-explorer-versions
Do your homework (just a few hours i think) and you will have your nice and clean browser emulation to latest avaible IE version or use it as it is and have a poor compatibilty still working IE11 browser. Hope you find this useful, Have a nice day.

And what is the difference between the two versions? I know the 11 is newer then 7 but is this the fix for load newer pages? 

  • Metin2 Dev 1
  • Good 1
Link to comment
Share on other sites

@Kori It will load any page that Internet Explorer 11 would (just open it, visit a web page and if you can display that embedded browser will as well). The differences between 7 and 11 are huge that I can't simply include them in a message (if you want to have a deep look into it check microsoft changelogs since version 7).

  • Love 2
Link to comment
Share on other sites

  • 1 month later...

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.