- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
command_line(1:len_trim(command_line)) // " "C, &
NULL_security_attributes, &
NULL_security_attributes, &
.FALSE., &
dwCreate, &
NULL, &
null_character, &
startup_info,process_info)
....
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TerminateProcess(process_info%hProcess, iWhatever)
Note that it should be used only as the last resort -- is there by any chance a friendlier way to close it? Is it a GUI process or a console one?
Side note: you should call CloseHandle(process_info%hProcess) and CloseHandle(process_info%hThread) when you don't need them.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In this case, the "nice" way to close it is to send WM_CLOSE message to GNUPlot's window:
i = SendMessage(hGnuPlot, WM_CLOSE, 0, 0)
However, obtaining handle to the window hGnuPlot can be tricky. You can use:
a) FindWindow API if you know the window's title (i.e. it's always the same & unique), or,
b) a bit more bulletproof, EnumThreadWindows(process_info.dwThreadID, YourEnumProc, LOC(hGnuPlot)). In LOGICAL YourEnumProc(hWnd, hGnuPlot), where hWnd should have VALUE attribute, test whether
IF (IAND(GetWindowLong(hWnd, GWL_STYLE), WS_OVERLAPPED) /= 0) THEN
hGnuPlot = hWnd
YourEnumProc = .FALSE.
ELSE
YourEnumProc = .TRUE.
END IF
In other words, the window with WS_OVERLAPPED style within the GnuPlot's main thread is the one.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a gnuPlot feature that you need that is missing from the AV product?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But try running one of the AV Fortran samples when you get a chance.
(such as: /Program Files/Intel/Fortran/Array Visualizer/Samples/Fortran/Simple)
One nice feature (which I don't think you can do from gnuPlot or Excel), is that as your program runs you can save the graphs+data to a file. The file can be opened later in the Viewer for off-line viewing.
John
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page