- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can i use Process32First in VF program. My linker doesn't recognize it.
I have added the Use DFWIN statement at the beginning.
I have added the Use DFWIN statement at the beginning.
Link Copied
11 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The appropriate C header Thelp32.h apparently wasn't translated to Fortran in VF. See this discussion, which uses Psapi functions for a similar task (I think that Steve has a full translation of Psapi.h somewhere).
You can also do the translation of necessary interfaces, types and constants from Thelp32.h yourself -- it's a bit tedious task though (on a brigher side, it is in Kernel32.lib so you don't have to do the dynamic binding)... Actually, Steve, why are so many APIs missing from the VF Windows headers?
You can also do the translation of necessary interfaces, types and constants from Thelp32.h yourself -- it's a bit tedious task though (on a brigher side, it is in Kernel32.lib so you don't have to do the dynamic binding)... Actually, Steve, why are so many APIs missing from the VF Windows headers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why? Because we haven't found the time to figure out what changed and do the additions. Actuall, we did some work for the upcoming 10.0 in this regard but in no way is it comprehensive. We'll keep at it. It helps if you let us know what's missing that you want to use.
10.0 will include PSAPI.
10.0 will include PSAPI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to use CreateToolhelp32Snapshot, Process32First / Next and the structure PROCESSENTRY32.
Actually I need to terminate a process by name. I don't know if this can be done in other way using VF.
Thanks a lot for the answers!!
Actually I need to terminate a process by name. I don't know if this can be done in other way using VF.
Thanks a lot for the answers!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See the link I previously gave -- the relevant thread is titled "Win API", I can't manage to link it directly. It provides a sample code for enumerating processes and their modules using PSAPI -- you can easily adapt it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've tried the code in your page, but i have another question.
When i try to terminate a process using terminateprocess i get an error '5' which means "access is denied". I dont know if i'm missin something
When i try to terminate a process using terminateprocess i get an error '5' which means "access is denied". I dont know if i'm missin something
- 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
Heh, yes
. As a well-designed (cough) operating system, Windows doesn't provide a "license to kill" to ordinary user-mode processes. Normally, a process may kill its children, but I don't know if killing other processes is allowable. Let me try...
...It seems that it's possible, though, at least for other user-mode processes -- you just have to add PROCESS_TERMINATE flag to the flags of OpenProcess.
![Hot smiley [(H)]](/isn/Community/en-US/emoticons/emotion-11.gif)
...It seems that it's possible, though, at least for other user-mode processes -- you just have to add PROCESS_TERMINATE flag to the flags of OpenProcess.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot!!
I have an old version of Visual Fortran (Compaq Visual Fortran 6.6). But i think i'm goint to get the newest version of Intel VF soon.
Any way, the code in xeffort was perfect for my needs.
Thanks again!!
I have an old version of Visual Fortran (Compaq Visual Fortran 6.6). But i think i'm goint to get the newest version of Intel VF soon.
Any way, the code in xeffort was perfect for my needs.
Thanks again!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Wouldn't it be useful for some Jr. software engineer to be tasked with writing a C/C++ header file to IVF interface conversion tool? Automation would seem like the way to go.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim,
We actually used some automation back in CVF 6.1. But it only gets you part way there, and there is a LOT of manual cleanup needed, with some intelligence required when the C declaration is a pointer, and the C headers don't have INTENT.
What we probably will do is use automation to at least let us know what we're missing, but it's actually faster, believe it or not, for someone (like me) to just sit down and hand-translate a bunch of definitions.
We actually used some automation back in CVF 6.1. But it only gets you part way there, and there is a LOT of manual cleanup needed, with some intelligence required when the C declaration is a pointer, and the C headers don't have INTENT.
What we probably will do is use automation to at least let us know what we're missing, but it's actually faster, believe it or not, for someone (like me) to just sit down and hand-translate a bunch of definitions.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page