daily uodate on 20240626 by nitload youmu

This commit is contained in:
Nitload
2024-06-26 07:33:12 +08:00
parent b2cb0cbddf
commit 8f9f1c4012
44 changed files with 722 additions and 383 deletions
@@ -41,12 +41,20 @@ namespace StgSharp
{
public static unsafe partial class StgSharp
{
private static int _mainThreadID = -1;
static byte[] _currentHash;
private static bool _inited;
internal const int ssdSegmentLength = 16;
public static int MainThreadID
{
get => _mainThreadID == -1 ?
throw new InvalidOperationException("StgSharp environment is not inited. " +
"Main thread id is not available") :_mainThreadID;
}
public static byte[] CurrentAssemblyHash
{
get
+2 -2
View File
@@ -42,6 +42,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
#if Windows
@@ -64,8 +65,6 @@ namespace StgSharp
VK
}
public static partial class StgSharp
{
@@ -89,6 +88,7 @@ namespace StgSharp
InternalIO.InternalWriteLog(
$"Program {Assembly.GetEntryAssembly()!.FullName} Started.",
LogType.Info);
_mainThreadID = Environment.CurrentManagedThreadId;
}
public static void LogError(Exception ex)