Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29559 Discussions

moving from win32 to X 64 - Peekapp - CreateThread

jmloriot
Beginner
848 Views

I have been using peekapp on win32 and it worked very well

Now moving to X64 there is the error :


Compiling with Intel® Fortran Compiler 2025.2.1 [Intel(R) 64]...
PEEK.F90
C:\CASAL\PEEK.F90(66): error #6284: There is no matching specific function for this generic function reference. [CREATETHREAD]
C:\CASAL\PEEK.F90(180): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [PEEKAPPMODULE]
C:\CASAL\PEEK.F90(218): error #6404: This name does not have a type, and must have an explicit type. [USERPEEKCHAR]
C:\CASAL\PEEK.F90(218): error #6341: A logical data type is required in this context. [USERPEEKCHAR]
ifx: error #10298: problem during post processing of parallel object compilation
compilation aborted for C:\CASAL\PEEK.F90 (code 1)

 

Attached is my peekapp routine

Is Createthread a only win32 routine ?

how to make it work on X64 ?

Thank for your help

 

0 Kudos
1 Solution
andrew_4619
Honored Contributor III
823 Views

Looking at the CreateThread function on msdn https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread I will done that args 1 3 5 and 6 would be 64bit 

 

ThreadHandle = CreateThread( 0, 0, GetCharProc, %loc(saveunit), CREATE_SUSPENDED, j )

!so add:
USE IFWINTY, only: handle
Integer(handle) :: J
ThreadHandle = CreateThread( 0_handle, 0, GetCharProc, %loc(saveunit), CREATE_SUSPENDED, j )

 so as a first guess with no testing the above should help 

View solution in original post

0 Kudos
2 Replies
andrew_4619
Honored Contributor III
824 Views

Looking at the CreateThread function on msdn https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread I will done that args 1 3 5 and 6 would be 64bit 

 

ThreadHandle = CreateThread( 0, 0, GetCharProc, %loc(saveunit), CREATE_SUSPENDED, j )

!so add:
USE IFWINTY, only: handle
Integer(handle) :: J
ThreadHandle = CreateThread( 0_handle, 0, GetCharProc, %loc(saveunit), CREATE_SUSPENDED, j )

 so as a first guess with no testing the above should help 

0 Kudos
jmloriot
Beginner
794 Views

Thank you Sir !

It complles ok now,

I did not get that the first parameter which is optinal needs to be a handle

 

0 Kudos
Reply