Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Revert unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Dec 23, 2019
1 parent edabcef commit 877db63
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/MSCorEE/MSCorEE.Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,14 @@ public static unsafe byte[] StrongNameTokenFromPublicKey(byte[] publicKeyBlob)
/// <remarks>
/// .NET Framework Versions: 4.5, 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0
/// </remarks>
public static unsafe string GetVersionFromProcess(SafeHandle hProcess)
public static string GetVersionFromProcess(SafeHandle hProcess)
{
const int insaneSize = 256 * 1024;
char[] versionChars = new char[32];
while (true)
{
int dwLength;
HResult hr;
fixed (char* versionCharsPtr = versionChars)
{
hr = GetVersionFromProcess(hProcess, versionCharsPtr, versionChars.Length, out dwLength);
}

HResult hr = GetVersionFromProcess(hProcess, versionChars, versionChars.Length, out dwLength);
if (hr.Succeeded)
{
return new string(versionChars, 0, dwLength);
Expand Down

0 comments on commit 877db63

Please sign in to comment.