Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

urgent help on api

Posted on 2001-09-05
10
Medium Priority
?
272 Views
Last Modified: 2010-04-06
how to call api in delphi

please help asap

rajni
0
Comment
Question by:rajniyadav
[X]
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
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 6456794
what api?
there are millions..

alot are defined already in the .pas/.dcu files in your delphi dir.

some are not for instance:
if you add shellapi to the uses section  you can call:
shellexecute(handle,'open',pchar('somefile'),nil,nil,sw_normal);
0
 

Author Comment

by:rajniyadav
ID: 6456805
inthe

i want to call window's api

do u know how to do that in delphi
0
 

Author Comment

by:rajniyadav
ID: 6456823
i want to know the product id or some unique number
to identify a machine do you any other way of doing this.

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:inthe
ID: 6456873
>>i want to call window's api
>>do u know how to do that in delphi

you have to be new to delphi so im wondering did you get any book with your delphi version?
i think you need to read one on delphi or browse the help files a bit...

here is some very good sites to get you started:
http://delphi.about.com/cs/beginners/
http://www.delphi3000.com/
http://www.torry.net/

they do have answers to your particular problem but you should understand what your doing before doing it ..
 
running before walking can be dangerous ;-)
0
 
LVL 6

Accepted Solution

by:
Stuart_Johnson earned 75 total points
ID: 6456892
Hi Barry :)

rajni: You can use the registry go get the product ID for Windows.  Look in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion.  The key string you are looking for is ProductID

If you don't know how to use the registry, try this:

function GetProductID: string;
begin
  Result := ''; {the default result if value not found}
  with TRegistry.Create do
    try
      RootKey := HKEY_LOCAL_MACHINE;
      if OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion', false) then
        if ValueExits('ProductID') then
          Result := ReadString('ProductID');
      CloseKey;
    finally
      free;
    end; {try..finally}
end; {GetProductID}

Is this what you are trying to achieve?  If not, please give more details.

Regards.

Stuart.
0
 

Expert Comment

by:ComTech
ID: 6460824
rajniyadav, is this by any chance this is a homework assignment?

Please answer my question.

Thank you,
Community Support Moderator
0
 

Expert Comment

by:Tech_Ed
ID: 6461593
rajniyadav,

You appear to have two accounts here at Experts Exchange, although the site rules and guidelines permit you to have only one account. Please advise which account you wish to keep open and I will close the other.

Tech_Ed
Community Support Administrator
0
 

Author Comment

by:rajniyadav
ID: 6462073
this is not my home assissment
and i have only one account
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 6462524
rajniyadav,

Are you going to tell us if any of the suggestions have helped at all?
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 6752963
I take it this question was autograded as there have been no comments posted for this question for months.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

721 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