Solved

Converting C typedef statement to Delphi

Posted on 2004-04-16
2
439 Views
Last Modified: 2012-05-04
I have a simple question....is this C typedef to Delphi conversion correct?

Original C typedef statements:

typedef uint32 BioAPI_GUI_MESSAGE, *BioAPI_GUI_MESSAGE_PTR;
typedef uint8 BioAPI_GUI_PROGRESS, *BioAPI_GUI_PROGESS_PTR;
typedef sint32 BioAPI_BIR_HANDLE, *BioAPI_BIR_HANDLE_PTR;

Delphi equalviant statements:
type
  BioAPI_GUI_MESSAGE = Cardinal;
  BioAPI_GUI_MESSAGE_PTR = Pointer;

type
  BioAPI_GUI_PROGRESS = Byte;
  BioAPI_GUI_PROGESS_PTR = Pointer;

type
  BioAPI_BIR_HANDLE = Integer;
  BioAPI_BIR_HANDLE_PTR = Pointer;
0
Comment
Question by:rwcochran
2 Comments
 
LVL 7

Accepted Solution

by:
sftweng earned 30 total points
ID: 10843547
It looks OK to me with the exception that I might make the *_PTR definitions type-specific to the underlying data. E.g.,

  BioAPI_GUI_MESSAGE_PTR = ^BioAPI_GUI_MESSAGE
0
 

Author Comment

by:rwcochran
ID: 10845440
Thanks!
0

Featured Post

Technology Partners: 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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

685 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