- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
링크가 복사됨
11 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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!!
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
...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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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!!
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.