psapi problem(not found)

Posted on 2003-03-07
Medium Priority
Last Modified: 2012-08-13
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 ?
Question by:Amadeus2003
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Author Comment

ID: 8089202

Expert Comment

ID: 8089238
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';

Accepted Solution

Lukasz Lach earned 200 total points
ID: 8089263

Expert Comment

ID: 8089375
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,

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month12 days, 5 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question