Post by David ErikssonPost by Mark EllisPost by David ErikssonPost by Mark EllisHi All
General inquiry, does anyone know why CeReadRecordProps and
CeWriteRecordProps for rapi1 are inside an #if SIZEOF_VOID_P == 4 ?
After a brief browse I can't see anything obvious that would break. I
also can't see this defined anywhere.
SIZEOF_VOID_P is defined in rapi_config.h (generated by the configure
script, i.e. AC_CHECK_SIZEOF(void *) in configure.ac.in)
If this #define is of my making, I think that it is because it is very
important that CEVALUNION.lpwstr is read and written as a 32-bit value
and same for CEVALUNION.blob.lpb
Thanks David, that should give me something to think about for a while.
For the sake of clarity: this would of course only be an issue on
platforms where a pointer is 64-bit.
I was expecting the problem here to be that interesting bit of pointer
arithmetic, but it seems not.
On 64 bit, CEVALUNION is 16 bytes long, because CEBLOB is 16 bytes.
CEVALUNION over the wire is 8 bytes. I guess the problem is because
CEBLOB is a struct of 2 members, each member gets allocated on 64 bit
boundaries, hence a 16 byte struct, even though they don't need this
much space.
Compiler quirks aren't my strength, do you know how to force this to the
correct size ?
Mark