summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWither OrNot2025-04-03 22:22:33 +0000
committerWither OrNot2025-04-03 22:22:33 +0000
commit17a7c90245ccd45b6e32d8bbe01a1a3eddeeae4d (patch)
tree5cbd3d5482d47648bfcf57f797e477d72f0697ea
parent84a0c754a353cfcee721a2c78769cc4a87b35cc1 (diff)
downloadTSforge-17a7c90245ccd45b6e32d8bbe01a1a3eddeeae4d.zip
miscellaneous fixes
-rw-r--r--LibTSforge/Activators/AVMA4K.cs2
-rw-r--r--LibTSforge/Common.cs9
-rw-r--r--LibTSforge/SPP/SPPUtils.cs4
-rw-r--r--LibTSforge/TokenStore/TokenStoreModern.cs1
-rw-r--r--TSforgeCLI/Program.cs2
5 files changed, 12 insertions, 6 deletions
diff --git a/LibTSforge/Activators/AVMA4K.cs b/LibTSforge/Activators/AVMA4K.cs
index ec09daf..2127652 100644
--- a/LibTSforge/Activators/AVMA4K.cs
+++ b/LibTSforge/Activators/AVMA4K.cs
@@ -8,7 +8,7 @@ namespace LibTSforge.Activators
{
public static void Activate(PSVersion version, bool production, Guid actId)
{
- if (version != PSVersion.WinModern)
+ if (version != PSVersion.WinModern && version != PSVersion.WinBlue)
{
throw new NotSupportedException("AVMA licenses are not available for this product.");
}
diff --git a/LibTSforge/Common.cs b/LibTSforge/Common.cs
index b9c274a..4d61770 100644
--- a/LibTSforge/Common.cs
+++ b/LibTSforge/Common.cs
@@ -183,6 +183,12 @@ namespace LibTSforge
public static class Utils
{
+ [DllImport("kernel32.dll")]
+ public static extern uint GetSystemDefaultLCID();
+
+ [DllImport("kernel32.dll")]
+ public static extern bool Wow64EnableWow64FsRedirection(bool Wow64FsEnableRedirection);
+
public static string DecodeString(byte[] data)
{
return Encoding.Unicode.GetString(data).Trim('\0');
@@ -193,9 +199,6 @@ namespace LibTSforge
return Encoding.Unicode.GetBytes(str + '\0');
}
- [DllImport("kernel32.dll")]
- public static extern uint GetSystemDefaultLCID();
-
public static uint CRC32(byte[] data)
{
const uint polynomial = 0x04C11DB7;
diff --git a/LibTSforge/SPP/SPPUtils.cs b/LibTSforge/SPP/SPPUtils.cs
index 1a6ef62..5621305 100644
--- a/LibTSforge/SPP/SPPUtils.cs
+++ b/LibTSforge/SPP/SPPUtils.cs
@@ -33,7 +33,7 @@ namespace LibTSforge.SPP
bool stopped = false;
- for (int i = 0; stopped == false && i < 360; i++)
+ for (int i = 0; stopped == false && i < 1080; i++)
{
try
{
@@ -48,7 +48,7 @@ namespace LibTSforge.SPP
}
catch (InvalidOperationException ex)
{
- Logger.WriteLine("Warning: Stopping sppsvc failed, retrying. Details:" + ex.Message);
+ Logger.WriteLine("Warning: Stopping sppsvc failed, retrying. Details: " + ex.Message);
System.Threading.Thread.Sleep(500);
continue;
}
diff --git a/LibTSforge/TokenStore/TokenStoreModern.cs b/LibTSforge/TokenStore/TokenStoreModern.cs
index cfb35d0..ee51e7a 100644
--- a/LibTSforge/TokenStore/TokenStoreModern.cs
+++ b/LibTSforge/TokenStore/TokenStoreModern.cs
@@ -30,6 +30,7 @@ namespace LibTSforge.TokenStore
BinaryReader reader = new BinaryReader(TokensFile);
do
{
+ reader.ReadUInt32();
nextBlock = reader.ReadUInt32();
for (int i = 0; i < ENTRIES_PER_BLOCK; i++)
diff --git a/TSforgeCLI/Program.cs b/TSforgeCLI/Program.cs
index 865e51d..86945d5 100644
--- a/TSforgeCLI/Program.cs
+++ b/TSforgeCLI/Program.cs
@@ -35,6 +35,8 @@ namespace TSforgeCLI
{
Logger.WriteLine("TSforge (c) MASSGRAVE 2025");
+ Utils.Wow64EnableWow64FsRedirection(false);
+
try
{
if (args.Length == 0)