Skybuck Flying
2011-06-12 00:07:57 UTC
Hello,
I come across the following C/C++ code which is a bit unfamiliar to me:
const void *SomeField2; // *
typedef struct SomeStructureName1 {
int SomeField1;
const void *SomeField2; // *
int SomeField3;
} SomeStructureName2;
It seems like a "constant void pointer type"
How to translate this structure to Delphi ?
My guess would be:
type
SomeStructureName1 = record
SomeField1 : integer;
SomeField2 : pointer;
SomeField3 : integer;
end;
SomeStructureName2 = SomeStructureName1;
Also is it just a "syntax" difference or is there a binary difference
between
1. void *
vs
2. const void *
?
Bye,
Skybuck.
I come across the following C/C++ code which is a bit unfamiliar to me:
const void *SomeField2; // *
typedef struct SomeStructureName1 {
int SomeField1;
const void *SomeField2; // *
int SomeField3;
} SomeStructureName2;
It seems like a "constant void pointer type"
How to translate this structure to Delphi ?
My guess would be:
type
SomeStructureName1 = record
SomeField1 : integer;
SomeField2 : pointer;
SomeField3 : integer;
end;
SomeStructureName2 = SomeStructureName1;
Also is it just a "syntax" difference or is there a binary difference
between
1. void *
vs
2. const void *
?
Bye,
Skybuck.