Solved

Converting C typedef statement to Delphi

Posted on 2004-04-16
2
433 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now