|
@@ -213,6 +213,10 @@ TYPE
|
|
|
EDI*, ESI*, EBX*, EDX*, ECX*, EAX*: LONGINT;
|
|
|
BP*, PC*, CS*, FLAGS*, SP*, SS*: LONGINT; (* whereas BP is EBP and SP is ESP *)
|
|
|
END;
|
|
|
+
|
|
|
+ Wow64Context*= RECORD (Context)
|
|
|
+ extension: ARRAY 512 (* MaxWOW64Extension *) OF CHAR;
|
|
|
+ END;
|
|
|
|
|
|
ExceptionRecordPtr* = POINTER TO ExceptionRecord;
|
|
|
ExceptionRecord* = RECORD
|
|
@@ -539,6 +543,9 @@ VAR
|
|
|
(** The GetThreadContext function retrieves the context of the specified thread. *)
|
|
|
GetThreadContext-: PROCEDURE {WINAPI} ( hThread: HANDLE;
|
|
|
VAR lpContext: Context ): BOOL;
|
|
|
+ (** The GetThreadContext function retrieves the context of the specified thread. *)
|
|
|
+ Wow64GetThreadContext-: PROCEDURE {WINAPI} ( hThread: HANDLE;
|
|
|
+ VAR lpContext: Wow64Context ): BOOL;
|
|
|
(** The GetThreadPriority function returns the priority value for the specified thread. This value, together with
|
|
|
the priority class of the thread's process, determines the thread's base-priority level. *)
|
|
|
GetThreadPriority-: PROCEDURE {WINAPI} ( hThread: HANDLE ): LONGINT;
|
|
@@ -718,6 +725,8 @@ VAR
|
|
|
Sleep-: PROCEDURE {WINAPI} ( dwMilliseconds: LONGINT );
|
|
|
(** The SuspendThread function suspends the specified thread. *)
|
|
|
SuspendThread-: PROCEDURE {WINAPI} ( hThread: HANDLE ): LONGINT;
|
|
|
+ (** The SuspendThread function suspends the specified thread. *)
|
|
|
+ Wow64SuspendThread-: PROCEDURE {WINAPI} ( hThread: HANDLE ): LONGINT;
|
|
|
(** The SystemTimeToFileTime function converts a system time to a file time. *)
|
|
|
SystemTimeToFileTime-: PROCEDURE {WINAPI} ( VAR lpSystemTime: SystemTime;
|
|
|
VAR lpFileTime: FileTime ): BOOL;
|
|
@@ -754,6 +763,10 @@ VAR
|
|
|
(** Method used to write text to the Console. *)
|
|
|
OutputString*: PROCEDURE ( CONST a: ARRAY OF CHAR );
|
|
|
|
|
|
+ (** methods to store the GC context before temporarily escaping to Windows -- required because GetContext does not work correctly any more *)
|
|
|
+ (* entered here for interface compatibility only *)
|
|
|
+ LeaveA2*, ReenterA2*: PROCEDURE;
|
|
|
+
|
|
|
hInstance-: HINSTANCE; (* init by linker/loader *)
|
|
|
isEXE-: BOOLEAN;
|
|
|
|
|
@@ -878,7 +891,7 @@ VAR
|
|
|
GetProcAddress(mod, "GetTempFileNameA",SYSTEM.VAL(ADDRESS,GetTempFileName));
|
|
|
GetProcAddress(mod, "GetTempPathA",SYSTEM.VAL(ADDRESS,GetTempPath));
|
|
|
GetProcAddress(mod, "GetThreadContext",SYSTEM.VAL(ADDRESS,GetThreadContext));
|
|
|
- GetProcAddress(mod, "GetThreadPriority",SYSTEM.VAL(ADDRESS,GetThreadPriority));
|
|
|
+ GetProcAddress(mod, "Wow64GetThreadContext",SYSTEM.VAL(ADDRESS,Wow64GetThreadContext)); GetProcAddress(mod, "GetThreadPriority",SYSTEM.VAL(ADDRESS,GetThreadPriority));
|
|
|
GetProcAddress(mod, "GetThreadTimes",SYSTEM.VAL(ADDRESS,GetThreadTimes));
|
|
|
GetProcAddress(mod, "GetTickCount",SYSTEM.VAL(ADDRESS,GetTickCount));
|
|
|
GetProcAddress(mod, "GetWindowsDirectoryA",SYSTEM.VAL(ADDRESS,GetWindowsDirectory));
|
|
@@ -939,6 +952,7 @@ VAR
|
|
|
GetProcAddress(mod, "SetupComm",SYSTEM.VAL(ADDRESS,SetupComm));
|
|
|
GetProcAddress(mod, "Sleep",SYSTEM.VAL(ADDRESS,Sleep));
|
|
|
GetProcAddress(mod, "SuspendThread",SYSTEM.VAL(ADDRESS,SuspendThread));
|
|
|
+ GetProcAddress(mod, "Wow64SuspendThread",SYSTEM.VAL(ADDRESS,Wow64SuspendThread));
|
|
|
GetProcAddress(mod, "SystemTimeToFileTime",SYSTEM.VAL(ADDRESS,SystemTimeToFileTime));
|
|
|
GetProcAddress(mod, "TerminateThread",SYSTEM.VAL(ADDRESS,TerminateThread));
|
|
|
GetProcAddress(mod, "TlsAlloc",SYSTEM.VAL(ADDRESS,TlsAlloc));
|