Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi vs. 'C'

Status
Not open for further replies.

gforrest

Programmer
Apr 26, 2000
39
0
0
CA
Hi,
Does anyone have a chart that shows Delphi variables and their equivalent values in 'C'?

e.g. 'Word' in Delphi equates to 'unit' in 'C'. Both are 4 bytes unsigned

'SmallInt' in Delphi equates to 'sint' in 'C'. Both are 4 bytes signed.

I'm using a Record in Delphi to talk to a 'C' structure but I'm having difficulty getting a Record layout that is the same size as the Structure. Part of the problem is the size of the variables.

Thanks.
 
Wow, the company that I know of that has this chart went bankrupt several years ago? Tek-Tips rules prohibit me from firectly selling this information to you. (Besides, I think I left it in storage somewhere). Meanwhile, have you considered the Variant datatype in Delphi? If I understasnd my manuals correctly, this datatype accepts values in any datatype.
 
Variants occupy 16 bytes of memory. If the 'C' variable associated with my Delphi record variable is less than or greater than 16 bytes they will be different sizes and won't map properly.
 
Search For a program called Head Conv or head convert. It shows all the types for delphi and c I think. It's used to convert c header files into delphi units so there may be docs on the info you need.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top