Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 856
  • Last Modified:

psapi problem(not found)

I have Delphi 4 installed on W2k computer.I want to use some function like EnumProcess,EnumProcessModule,GetModuleFileNameEx but when i add psapi to uses library,delphi tell me that not found file psapi.dcu.I know that psapi.dll exist in system32 folder, but what must to do ?
0
Amadeus2003
Asked:
Amadeus2003
1 Solution
 
Amadeus2003Author Commented:
thanks
0
 
MotazCommented:
DLLs are not like Units, it requires special linking:

First determine what is the function or procedure name and it which directory, then put this line in your form code (Unit1.pas) befor Implementation:

function Sum(a, b: Integer): Integer; stdcall; external 'psapi.dll';
0
 
Lukasz LachCommented:
noname.vel.pl/psapi.pas
0
 
steve_hskCommented:
Hi Amadeus ...

This may be off the mark, but with all standard PAS libraries that delphi includes in it's installation, it is more normally a problem with the Environment and Project settings.

It may be worth doing a search for the PSAPI.PAS (not the DLL) on your drive, and then re-adding this path explicitly to :

- Tools >> Environment Options >> Library >> Library Path
- Project >> Project Options >> Search Path

and trying to compile again. Make sure you add this properley, and close the dialog boxes and re-open to ensure the path has remained there.

Hope this helps,
Steve
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now