Solved

Converting C typedef statement to Delphi

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

816 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

13 Experts available now in Live!

Get 1:1 Help Now