Hi to all!
This is my first message.
I have a code like this:
SUBROUTINE MyProc (counter)
USE DFMT
!DEC$ ATTRIBUTES VALUE :: counter
integer*4 counter
! Subroutine work goes here.
Call exitthread(0) ! Exit code is 0.
END
SUBROUTINE other (arg1,arg2)
USE DFMT
integer*4 ind_thread
ind_thread=LOC(MyProc)
hThread1 = CreateThread (0, 0,ind_thread,LOC(arg),0,LOC(thread_id))
...
END
I'm trying to use CreateThread function to launch a subroutine of my program in another thread, but the compiler gives an error in the CreateThread function.
The error says this way:"Error: This actual argument must be the name of a procedure and not a data object. [IND_THREAD]"
I tryed to put "MyProc" instead of ind_thread in the 3rd parameter of CreateThread but the error still remains.
Am I wrong in using LOC function? Do you think I have to add some "USE" statements?
Thank you all in advice!
This is my first message.
I have a code like this:
SUBROUTINE MyProc (counter)
USE DFMT
!DEC$ ATTRIBUTES VALUE :: counter
integer*4 counter
! Subroutine work goes here.
Call exitthread(0) ! Exit code is 0.
END
SUBROUTINE other (arg1,arg2)
USE DFMT
integer*4 ind_thread
ind_thread=LOC(MyProc)
hThread1 = CreateThread (0, 0,ind_thread,LOC(arg),0,LOC(thread_id))
...
END
I'm trying to use CreateThread function to launch a subroutine of my program in another thread, but the compiler gives an error in the CreateThread function.
The error says this way:"Error: This actual argument must be the name of a procedure and not a data object. [IND_THREAD]"
I tryed to put "MyProc" instead of ind_thread in the 3rd parameter of CreateThread but the error still remains.
Am I wrong in using LOC function? Do you think I have to add some "USE" statements?
Thank you all in advice!