[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 450
  • Last Modified:

Converting C typedef statement to Delphi

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
rwcochran
Asked:
rwcochran
1 Solution
 
sftwengCommented:
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
 
rwcochranAuthor Commented:
Thanks!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now