- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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 kopiert
11 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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!!
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
ok, thanks!!
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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!!
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite