fix code review notes by delaying creation of second instance processing thread; fix confused variables in message

This commit is contained in:
Dmitry Jemerov
2013-03-08 21:19:15 +01:00
parent 4f916577e7
commit 794d4944d1
2 changed files with 8 additions and 5 deletions
@@ -124,8 +124,8 @@ bool FindJVMInEnvVar(const char* envVarName, bool& result)
else
{
char buf[_MAX_PATH];
sprintf_s(buf, "The environment variable %s (with the value of %s) does not point to a valid JVM installation",
envVarValue, jvmPath);
sprintf_s(buf, "The environment variable %s (with the value of %s) does not point to a valid JVM installation.",
envVarName, envVarValue);
MessageBoxA(NULL, buf, "Error Launching IntelliJ Platform", MB_OK);
result = false;
}
@@ -553,7 +553,6 @@ bool CheckSingleInstance()
{
hFileMapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, FILE_MAPPING_SIZE,
mappingName.c_str());
hSingleInstanceWatcherThread = CreateThread(NULL, 0, SingleInstanceThread, NULL, 0, NULL);
return true;
}
else
@@ -704,6 +703,9 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
if (!LoadVMOptions()) return 1;
if (!LoadJVMLibrary()) return 1;
if (!CreateJVM()) return 1;
hSingleInstanceWatcherThread = CreateThread(NULL, 0, SingleInstanceThread, NULL, 0, NULL);
if (!RunMainClass()) return 1;
jvm->DestroyJavaVM();
@@ -716,3 +718,4 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
return 0;
}
@@ -64,7 +64,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>C:\Java\jdk1.6.0_41\include;C:\Java\jdk1.6.0_41\include\win32;$(IncludePath)</IncludePath>
<IncludePath>C:\Java\jdk1.6.0_43\include;C:\Java\jdk1.6.0_43\include\win32;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
@@ -72,7 +72,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>C:\Java\jdk1.6.0_41\include;C:\Java\jdk1.6.0_41\include\win32;$(IncludePath)</IncludePath>
<IncludePath>C:\Java\jdk1.6.0_43\include;C:\Java\jdk1.6.0_43\include\win32;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>