[Fortran] syntaxhighlighter_viewsource syntaxhighlighter_copycode
program eee
implicit none
integer:: res
call SYSTEM ("C:\windows\system32\calc.exe")
end program eee
[Fortran] syntaxhighlighter_viewsource syntaxhighlighter_copycode
use kernel32
use , intrinsic :: ISO_C_Binding
Type( T_STARTUPINFO) ::stStartUp
Type(T_PROCESS_INFORMATION ) ::stProcInfo
integer i
Call GetStartupInfo( stStartUp )
i = CreateProcess( 0 , "c:\windows\system32\notepad.exe"//c_null_char , 0 , 0 , 1 , 0 , 0 , 0 , LOC( stStartUp ) , LOC(stProcInfo) )
read(*,*)
i = TerminateProcess( stProcInfo%hProcess , 0 )
end